button focus

by A N K ! T » Wed, 06 Oct 2010 13:58:11 GMT

Sponsored Links
 i have set background as transparent for the button ..
(button.setbacgroundcolor(Color.transparent) )...

now it is not showing focus on the same button..what to do..


 A N K ! T......


button focus

by Kumar Bibek » Wed, 06 Oct 2010 19:14:57 GMT

 Look at the state list drawables. Buttons and other widgets have a default
statelist drawable. If you are using your own drawable, (just a image), the
button doesn't know what to show when in different states. Rather than
setting a drawable(picture) as a background, you should be using a state
list drawable which specifies which images to use for different states.


Sponsored Links

button focus

by A N K ! T » Thu, 07 Oct 2010 13:21:03 GMT

 thanks it is very helpful....


Other Threads

1. Trouble with AssetManager

I am using this code to try to access my assets:
Resources res = context.getResources();
AssetManager assMan = res.getAssets();
String assets[] = assMan.list("Models");
InputStream is = assMan.open("Models/Ship.Obj");
 ObjLoader loader = new ObjLoader(is);
mVertexBuffer = loader.getVerts();
mIndexBuffer = loader.getIndex();
catch(IOException e)
// TODO Auto-generated catch block

When I look at the value of assets it contains "Ship.obj" (see attached
image) but when I try to open the file it throws the exception.  Does anyone
have any experience with this?


2. OutOfMemoryError when switching orientation

> I don't understand what's hogging the memory since the image is

The image is stored on the device, but you still have to load it in RAM.

There is nothing to clear out. You must be leaking something
somewhere. Make sure you are not keeping any static reference
(directly or indirectly) to an Activity or a Context for instance.
Keeping such a reference will cause your application to leak
everything on the first orientation change.

Romain Guy


3. How to set the max width of a spinner

4. IPhone Android & G1 Android

5. What is the difference between onOptionsItemSelected and onMenuItemSelected?

6. Question about the Android Market

7. call to determine current context?