how to get the listview item's default "on-pressed" drawable resource id

by [EMAIL PROTECTED] » Sat, 29 Nov 2008 16:31:08 GMT

Sponsored Links
 how to get the listview item's default  "on-pressed" drawable resource
id? I mean the orange background image when the listview's item is


Other Threads

1. Undo Feature in Drawing App - Need best methodology, not looking for code


My application includes a drawing feature and I would like the add the
ability to "undo". The undo feature currently in place simply loads
the bitmap from the last saved file, so no matter how many changes
they make to their drawing "undo" will revert it back to the way it
was before any changes were made.

What I want to do now is make it more like the "undo" feature we are
used to in modern applications, so that it does not go back to the way
the file was when we first opened it, rather it goes back in various
steps during our editing (which can be quite numerous).

My idea is to save the current bitmap in a linked list after every
occurrence of finger down, finger up. Thus every time the user lifts
their finger from the screen the bitmap will be added to the linked
list. Then of course when "undo" is selected the bitmap at the top of
the stack will be loaded. The only problem is if the user makes 20,
30, 40+ changes to their drawing that is a lot of bitmaps to keep
references to, am I right? I see out of memory errors coming. Any
ideas for alternatives?

Thank you!



2. OnTouchListener does not translate during TranslationAnimation

Hello All - Here is my problem.  I have an ImageView that listens for
an onTouch Event so that when the ImageView is touched, it moves
across the screen.   This works, but afterward the onTouch Event is
fired when you touch the original location of the ImageView, rather
than the new translated location.

ie - I touch an image and it moves.   i touch it again and nothing
happens, BUT if i go and touch the part of the screen where the image
was originally the image will move again.

the simplified code is below.
thanks alot!


public void onCreate(Bundle savedInstanceState) {
        rl =  (RelativeLayout) findViewById(;

        ImageView iv = new ImageView(this);
        View.OnTouchListener otl = new View.OnTouchListener() {
                public boolean onTouch(View v, MotionEvent e) {
                        return true;

public void transAnimate(ImageView iv) {
        TranslateAnimation trans = new TranslateAnimation((float)0, (float)
Math.random() * 200,(float)0, (float) Math.random() * 360);


3. samsung galaxy mini

4. [WTA] Cara Mengaktifkan EVDO di Galaxy Tab CDMA Sprint

5. [id-androi] WTI : Motorola DROID X 2, DROID 3, and Targa to come after the BIONIC

6. [WTI] Penyerahan Dana Partisipasi id-android untukBro Rheza Christian.

7. Fwd: [mtiui_2010f] "Lomba Aplikasi ANDROID T-Market" Total Hadiah Ratusan Juta Rupiah !