androidviewswitcher

Current Image in a ViewSwitcher


is there a possibility to get the name/reference/id of the current displayed image in a ViewSwitcher?

switcher = (ViewSwitcher) findViewById(R.id.viewSwitcher);

[...]

@Override
public boolean onSingleTapUp(MotionEvent e) {
       Log.d(TAG, "tell me please, how to get the name/reference/id/etc of the currently displayed image, so i can start a specific action relating to the current image");
       return false;
}

Thanks!

Tobias


Solution

  • Use the 'edit' button above to make changes to your question post.

    As for your question, if you're using a ViewSwitcher, I think you can do with some sort of indicator to tell you which screen (which ViewGroup) is being displayed. Like an int or boolean that you're modifying when switch commands are called.