android - ScrollView Focus LinearLatout or others elements -


have activity scrollview when item selected, turn layout in view.visible, or vice versa, when select item bit down, state 3 image, losing half information, forcing user have move finger.

http://i.imgur.com/3cv03lg.png

the question is: how can linearlayout requestfocus?  

  • note: close layouts, need focus.

i've tried

google : android scrollview focus edittext / elements / layout / onclick focus scroll , not work .

save last opened linearlayout in variable , close after user open new. or show more code.

edit

use scrolltoview(view view, scrollview scrollview), view linearlayout. linearlayout take maximum possible space in scrollview

public static void scrolltoview(view view, scrollview scrollview) {         scrolltoview(view, scrollview, 0);     }       public static void scrolltoview(final view view, final scrollview scrollview, int count) {         if (view != null && view != scrollview) {             count += view.gettop();             scrolltoview((view) view.getparent(), scrollview, count);         } else if (scrollview != null) {             final int finalcount = count;              new handler().postdelayed(new runnable() {                 @override                 public void run() {                     scrollview.smoothscrollto(0, finalcount);                 }             }, 200);         }     } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -