Guest User

Untitled

a guest
Jul 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. LinearLayout col1 = (LinearLayout)findViewById(R.id.col1);
  2. Button btn = new Button(this);
  3. btn.setOnClickListener(new OnClickListener() {
  4. public void onClick(View v) {
  5. LinearLayout col1 = (LinearLayout)findViewById(R.id.col1);
  6. if(col1.getFocusedChild() != null) {
  7. Log.d(TAG, col1.getFocusedChild().toString());
  8. }
  9. }
  10. });
  11. col1.addChild(btn);
  12.  
  13. if(yourChildView.isFocussed){
  14. yourChildView.setFocussable(false);
  15. }
Add Comment
Please, Sign In to add comment