Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LinearLayout col1 = (LinearLayout)findViewById(R.id.col1);
- Button btn = new Button(this);
- btn.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- LinearLayout col1 = (LinearLayout)findViewById(R.id.col1);
- if(col1.getFocusedChild() != null) {
- Log.d(TAG, col1.getFocusedChild().toString());
- }
- }
- });
- col1.addChild(btn);
- if(yourChildView.isFocussed){
- yourChildView.setFocussable(false);
- }
Add Comment
Please, Sign In to add comment