Android gallery onselecteditem


Last Updated:

  1. faisalloe

    faisalloe Member This Topic's Starter

    Joined:
    Jan 21, 2010
    Messages:
    17
    Likes Received:
    0
    I am using gallery widget i want to change selected image.

    Code (Text):
    1. @Override
    2.     public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
    3.     if(lastSeen != null){
    4.        lastSeen.setImageResource(unselected image);
    5.     }
    6.  
    7.     (ImageView(view)).setImageResource(selected image)
    8.     lastSeen = view;
    9. }

    When i run the following code and i use roller ball or arrow keys over device and if i try to scroll left to right or right to left focus goes out of gallery to next item over the screen what is that ?
     

    Advertisement

Share This Page

Loading...