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. Toast - I can't get it to work in Eclipse...

So I am slowly trying to figure out maps... I want to be able to click
on a point and pop up a message. Toast seemed the way to go. So I
added an "onTap" handler in my class that extends ItemizedOverlay (the
class is called HelloItemizedOverlay) and then tried to grab the Toast
example... But I am seeing Eclipse tell me that the line is in error
no matter what I do... My code is below - could someone tell me what i
am doing wrong?

protected boolean onTap(int index) {
        Toast.makeText(HelloItemizedOverlay.this, "TEST",
        return super.onTap(index);


2. AutoCompleteTextView update problem

Hi guys

I am completely stuck on this for a few days...any help will be super

I have an AutoCompleteTextView which I want to populate with artist
names based on what the user types. I have a method which makes a call
to the Musicbrainz API which takes a few seconds so I do that in a
separate thread.

The problem is that when I get the list of artist names back from
Musicbrainz, I try and update the ArrayAdapter with a Handler on the
UI thread (which is called from the Musicbrainz thread), but its only
on the next letter entered in the textview that the ArrayAdapter
changes are displayed to the user.

Here is my code:

public void onCreate(Bundle savedInstanceState) {
                AutoCompleteTextView actv = (AutoCompleteTextView) findViewById
                adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());


Tex{*filter*}cher tex{*filter*}cher = new Tex{*filter*}cher() {

                public void onTextChanged(CharSequence s, int start, int 
before, int
count) {
                        Thread t = new Thread() {
                                public void run() {
                                        ArrayList<String> names = 
(ArrayList<String>) getArtistStrings
                                        artistNames = names;

                public void beforeTextChanged(CharSequence s, int start, int 
int after) {

                public void afterTextChanged(Editable s) {

private String getInput() {
                EditText artistInput = (EditText) findViewById
                String artistSearchString = artistInput.getText().toString();
                return artistSearchString;

private void updateTextAdapter(List<String> data) {
                for (String artistName : data) {

        private Handler messageHandler = new Handler() {

                public void handleMessage(Message msg) {



3. Toast - I can't get it to work in Eclipse...

4. Issue with playing audio or video from Remote URL (RTSP/HTTP)

5. S/MIME and Digital Certificate Support on Androi

6. PGP on Androi

7. Process for CA to have Roots Include