Android :: Getting Dirty Region Inside Draw()
Oct 6, 2010
If I invalidate() a part of my custom view with a dirty rect parameter, how do I get the dirty rect inside the draw() method? The clipping rect of the canvas is not the same - in my experience, it's typically few times larger.
View 2 Replies
Mar 26, 2009
In my Java code I am setting the content of an ImageView to a Bitmap. However, before doing so I want to clip the Bitmap to a circular region. How would I go about this? I've been looking for some API that would let me set the alpha channel of the Bitmap to fully transparent for all pixels outside the circular region.
View 4 Replies
View Related
Apr 11, 2009
Is there any convenient method to draw a string (custom true type font) as big is possible inside a supplied rectangle or to calculate the font size of a paint object based on a string and some rectangle dimensions.
View 3 Replies
View Related
Jul 24, 2010
i have an activity and in the activity i have some buttons and textviews, and i would like to draw a rectangle with text inside. i saw some examples online but the all say to create my on view , override onDraw and the set this view as my layout, but i have my layout already.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView baramzona = (TextView) findViewById(R.id.TextView01);
baramzona.setText(R.string.baram_zona_textview);
final Button pocniparking = (Button) findViewById(R.id.ButtonStart);
final TextView momentalnazona = (TextView) findViewById(R.id.TextView02);
//momentalnazona.setText("Моментално се наоѓате во зоната");
pocniparking.setText(R.string.btn_Start_Parking);
pocniparking.setEnabled(false);
}
}
View 1 Replies
View Related
May 13, 2010
How to get the dirty(changed) properties(any controls subclasses of view) amongst a number of properties on a layout. Does android has a dirty flag to mark if the layout has any field that has a changed content?
View 2 Replies
View Related
Dec 8, 2009
So I just noticed while trying to send SMS via Handset using the speak feature that it will put #### instead of profanity, I can't even say dildo! C'mmon! that's a basic SMS word! Tried in google search, no good either. anyone know how I can make my Droid R- Rated?
View 25 Replies
View Related
Sep 5, 2010
In my android application I use this method in "draw" Overlay class for draw route on map. Can someone tell me if this method is good (in terms of performance) for route draw on map or I must to put code in Thread ??
I'm new to android.
public synchronized void draw(Canvas canvas, MapView mapView, boolean shadow) {
if (pointsAndTimes.isEmpty()) {
return;
}
Projection projection = mapView.getProjection();
Paint paint = new Paint();
paint.setARGB(250, 255, 0, 0);.............
View 1 Replies
View Related
Oct 30, 2010
I've been a couple of days trying to solve this thing but I can'f figure it out.The problem is, simple activity, with simple layout, ScrollView -> LinearLayout -> and a lot of buttons inside the layout (within the scroll content). Everything works just fine but one tricky thing. When I click a button let's say at the top of the scroll content and inmediatelly I scroll down to the bottom of the content and I click other button there, nothing happens until I click a second time and all come to normal again.This can be reproduced anytime and it's code independent (i've tried more than 20 scenarios). I've not much experience in android yet but looks like the scroll listener stops the onclick listener or something like that.
View 1 Replies
View Related
May 11, 2010
I've seen a lot of applications that utilize this view, but in my region (Israel) it seems to show a different view than what the Google Maps application shows. Google Maps shows everything you would expect from Google Maps except street view. However map view does not. It never shows streets and details, just a big blotch of gray. Satellite view works, but not with the best resolution the Maps application offers.Can anyone point me to documentation of this matter?
View 2 Replies
View Related
Feb 19, 2009
I want to judge whether the touch point(x, y) is in a region or not, the region is from a stardard rect by rotating specified degrees, from example, rotate 30 degrees. There is a class named Region in Android, but as I researched, it just supports standard rect, is there any other way to judge whether a point is in an acclivitous rect? How to do it?
View 10 Replies
View Related
Feb 19, 2010
We are using a WebView for eBooks whic have few (if any) links and do not see a good way to add a context menu in a region with text only - any bright ideas?
View 3 Replies
View Related
Jul 17, 2009
I have a Canvas backed by a bitmap that I want to invert the color for a rectangular region. The meaning of inversion is to flip the bits of all the colors pixels.
View 2 Replies
View Related
Jul 7, 2009
So I've been extremely frustrated by this for a long time now.I've posted before, but can't seem to find a good solution. My goal is to have something pretty much exactly like the installed application details page in the Android Market.I need a list of items displayed along with other content above the list, and would like the content above to scroll up along with the list (exactly like the application details does for the "My Review" and other descriptive info).Due to responses to my previous posts, I came to believe that it really wasn't possible to do this with a ListView.So rather than using a ListView, I refactored my code to use a simple LinearLayout and add individual View items to the list, thinking I could just set each View as clickable and add an OnClickListener to each View in the LinearLayout.That's not working at all though, and now I'm getting even more frustrated.If someone can help me get the OnClickListener working, then I think it'll work, but I do need a separator for the LinearLayout.How do I add a separator like the one used for ListView to my LinearLayout?
View 12 Replies
View Related
Jun 28, 2010
yeah unforunatley my phone hase been flawless since the 6/05 when I got if from Amazon, besides the pink hue of the screen, but I have noticed that I have lint/dirt between the screens you think there would be some kind of sealant or a gasket to keep this crap out of the screens, mine is just a few specks but they are really big specks and bugs the f-out of me so I emailed amazon yesterday and they are going to sent me a replacement, they said july 13th-july 20 it should be here, so hopefully the one I get is still the AMOLED screen not the new one they are talking about switch too.
View 7 Replies
View Related
May 11, 2013
The ROM that I use on my phone pretty much discourages dirty flashing updates [CM10.1 based]. So for the last 10 or so updates, I have clean wiped my HTC Rezound, then restored from a TitaniumBackup.
First I disabled compression of backups.
Then to restore I go to /sdcard/TitaniumBackup/ and run a bash command:
# for i in *.apk; do pm install "$i"; done
Then I go to TitaniumBackup, and every app is installed but doesn't have my data. So then I batch restore my data for my apps [Pretty much only user apps, except a few system things like SMS, WiFi networks]. But the problem is, recently, TitaniumBackup will quit halfway through a batch restore of "Data only." So I've been manually restoring data 1 by 1 for the apps that I need data to be saved across rom updates.
But then I thought, "Hey, why can't I just backup my /data/data/ folder?" but then I also thought that would probably be like a dirty flash.
View 5 Replies
View Related
May 29, 2010
I have my app in the market which is mainly for US based people as I dont have the database that is required for any other country.
So I am wondering if it is possible to restrict the app to be visible to and downloaded by only US based users.
View 2 Replies
View Related
Jun 7, 2010
I am taking a trip to Asia starting tomorrow. I wanted to know, does the GPS on the droid actually work globally as the name implies? And even if it does work, without service in that region google maps will most likely not work for directions, however is there a way or an app that can download maps of the region for the GPS to work off of?
View 6 Replies
View Related
Aug 30, 2012
i tried the Indonesian I8160DXLH2 firmware, i agree that its fast and stable and better RAM management, the only problem I face is the modem.bin.md5 from the Indonesian ROM wont flash on my phone or my phone responded "CUSTOM Modem Binary!" , so what I've done is I extracted the modem.bin.md5 from my i8160ZLSG1(hong kong variant) and rebuild a single package .tar.md5 flashable ROM, Odin flashed the ROM perfectly, but as soon as I enter the on screen set up, my SIM card is not detected and I have no access to GSM/3G networks, bluetooth and wifi works fine, all the software part works fine, stable and fast, also, the IMEI code will not show up, unless I revert back to the Hong Kong region specific ROM. I really like the Indonesian ROM because the Hong Kong firmware had severe scrolling problems in menus and apps.
PS: my phone is rooted, my sales code(CSC) is THL.
View 5 Replies
View Related
May 3, 2010
Did you guys notice how the speaker on the Milestone/Droid gets dirty, it's like a magnet for dust and lint, and once it's in there, it won't come out.I just found a little trick to clean it out:
1- Just grab a little amout of "fun-tak" or any other sticky putty.
2- Push it into the speaker hole, and the dust will come out with it when you remove it.
3- Rince and repeat
I was so glad to finally get it clean, that I had to share it.
View 2 Replies
View Related
Jun 21, 2010
I want to have a elmenent with a 2 color border outline. I can do a single color outline using the element, but this only allows me to draw a single line. I tried using 2 elements within my but that didnt work either. Is there a way to either draw a shape within a shape or draw 2 lines around my shape (which has rounded corners btw).
View 3 Replies
View Related
Nov 11, 2010
I'm trying to figure out how to draw on a bitmap in android, and keep a copy of these changed bitmaps for an undo function.
Bitmap b = ...
Paint p = new Paint();
canvas.drawBitmap(b, new Matrix(), null);
canvas.drawCircle(0,0,20,20);
//does Bitmap b have the circle drawn on it next time?
Or how do I get the bitmap after its been drawn on with the canvas(I want to preserve a stack of bitmaps with the changes applied by canvas drawing)? Maybe I'm going about this entirely wrong.
View 1 Replies
View Related
Sep 2, 2009
I'm new to openGL and I have done some first tests with drawing a triangle. Now I would like to draw a circle, which is filled with a texture, but I have no idea, how to do so.Can someone of you give me a hint?
View 5 Replies
View Related
Feb 16, 2010
I want to draw charts like pie charts to display stats in my Android app. As Android doesn't support Swing and AWT, i wonder how can i draw charts in Android? Please note that i don't want to use a third party tool.
View 6 Replies
View Related
Aug 4, 2010
I'm investigating the possiblity of writing an app for Android/iOS4/both that would use GPS in the background. I found the "Receiving Location Events in the Background" section of the iphone developer documentation, which recommends that I only register for "significant location change" events. I'm not aware of any such capability in the Android SDK, but it still seems like a good idea to do it this way if I can (so as not to drain the battery). My question is this: has anyone done any sort of benchmarking for this on and iPhone/Android phone? So far, I've seen a lot posts/documentation saying that listening for GPS events in the background is a VERY BAD THING and I should AVOID IT AT ALL COSTS, but I haven't been able to find any numbers for just how much power a background application listening on GPS changes would drain (i.e. % battery drain per time app is running in the background).
This information might be helpful for me (and possibly others too) because I might be able to poll less frequently or even register/unregister my GPS listener based on power drain. Essentially, I could try to put a ceiling on how much battery life my app could drain while in the background.
View 1 Replies
View Related
Sep 1, 2010
how to draw a line in android give example
View 1 Replies
View Related
Oct 28, 2010
I'm making an App that needs to be able to draw new graphics on top of the last set.
This is my current onDraw() method -
protected void onDraw(Canvas canvas) {
canvas.drawColor(Color.WHITE);
if(points.size() > 0) {
//do some stuff here - this is all working ok
canvas.drawLine(p1.x, p1.y, p2.x, p2.y, linePaint);
}
}
Basically, I need to draw the new graphics as a layer on top of the last, so what I'm looking for is a way to carry the image of the last canvas to the current. I have tried to figure it out myself using the canvas.setBitmap() method but it acts very funny.
View 2 Replies
View Related
Nov 13, 2010
I have some images that I want to put on top of each other on random order. If it possible using one ImageView or do I need to create multiple image views based on number of images?
View 2 Replies
View Related
Aug 17, 2010
I studied the Androidreference for hours now, but don't really get the clue how to draw something (Text, Bitmap, Path ....) on a ImageView.
Should I extend View and use the onDraw()-Method? If yes, how can I draw on my ImageView?
Or is there any other way to achieve my goal?
View 3 Replies
View Related
Oct 3, 2010
I have a set of views that are populated with data from an online database. The context menu has a "refresh" choice that re-reads the online database and updates some attributes of the views, like setText and setChecked for some buttons. After the various setTexts and such, I invalidate the Views. However, they are not immediately redrawn. In fact, they don't get redrawn at all unless something like a rotation happens to cause a redraw of the screen. How can I initiate an immediate redraw after the refresh is complete?
View 4 Replies
View Related
Aug 16, 2010
I've got a standard RelativeLayout laying out my Buttons and TextAreas. What I want to do now is be able to draw various sparks, flying cows etc. at arbitrary places on the screen on top of the whole thing. What's the best way to do this? Should I override onDraw() on the containing View and draw after calling super.onDraw()? Or is there some better way of drawing a layer on top?
View 1 Replies
View Related