Image buttons

by Arun Mankad » Thu, 30 Oct 2008 17:49:19 GMT


Sponsored Links
 Can somebody tell me how o create buttons with images that have different
image for focused and clicked state

-- 
Arun Mankad

--~--~---------~--~----~------------~-------~--~----~



Image buttons

by Mark Hansen » Thu, 30 Oct 2008 21:03:51 GMT


 I ended up using ImageViews and making multiple images, I'd be curious
if there was a better way as well.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Image buttons

by Arun Mankad » Thu, 30 Oct 2008 21:25:47 GMT


 Hi Mark,

Can you plz explain How did u do that, I am a novice in Android, please help








-- 
Arun Mankad

--~--~---------~--~----~------------~-------~--~----~



Image buttons

by for android » Thu, 30 Oct 2008 21:38:57 GMT


  http://blog.pocketjourney.com/2008/04/30/android-tutorial-image-text-only-buttons/ 







--~--~---------~--~----~------------~-------~--~----~



Image buttons

by [EMAIL PROTECTED] » Fri, 31 Oct 2008 00:34:17 GMT


 You can extend View Class and Override Ondraw() method and put some
code which performs  what you want!!

--~--~---------~--~----~------------~-------~--~----~



Image buttons

by Sundog » Fri, 31 Oct 2008 00:35:41 GMT


 There is an alternative if you just want to highlight the image; use
setAlpha to ghost it. See Mahjongg Solitaire for how this looks.







--~--~---------~--~----~------------~-------~--~----~



Image buttons

by mathiastck » Fri, 31 Oct 2008 02:35:38 GMT


 Simplest way to do this is to create a custom drawable xml describe
what image to use for what state, described in this thread:




Other Threads

1. Android PDF library

Are there any android pdf libraries that are pretty well mature? ie
show images, etc? I am workig on an app that will basically allow
reading of PDFs and I wanted to check here to see if there is an
accepted means of doing this.

-- 

2. Creating a ListView and onListItemClick()

Hey group, I have just recently picked up android and ran into a
stumbling block. I have been able to set up a list view of contacts on
a phone, but have no idea how to create a new view from the item
clicked. Any help would be great! I have been looking for a solution
for the day, and can't seem to find anything I can comprehend, so any
help is great! Thanks!

package com.grey.gui;

import java.util.ArrayList;

import android.app.ListActivity;
import android.content.ContentResolver;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;

public class MainPage extends ListActivity {

        private ListAdapter adapter;
        private Cursor c;

        @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        ContentResolver cr = getContentResolver();
        c = cr.query(ContactsContract.Contacts.CONTENT_URI, null,
null, null,null);

        ArrayList<String> names = new ArrayList<String>();
         while(c.moveToNext()){
                 //String id =
c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));
                 String name =
c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
                 String number =
c.getString(c.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER));

                 if(number.equals("0")) continue;
                 names.add(name);
         }

         adapter = new ArrayAdapter<String>(this,
                 android.R.layout.simple_list_item_1, names);
        setListAdapter(adapter);
        getListView().setTextFilterEnabled(true);


}
        @Override
        public void onListItemClick(ListView l, View v, int position, long id)
{
                 super.onListItemClick(l, v, position, id);


            }

}

-- 

3. World War Tips n Trick

4. Layout with ScrollView and TextView

5. Infus Ratjun

6. Non-stretchable background images

7. Insert and delete SIM contacs working but it needs to be phone restart to update the changes