0

I write the android application optimized for D-Pad. I have several containers with widgets. The logic requires that user can select widgets in one specific container depending on application state. I there easy way to implement this logic?

Art Spasky
  • 1,635
  • 2
  • 17
  • 30

1 Answers1

0

At runtime, use View.setFocusable(boolean) for any view. To handle all the items in the container, run through their contents like

    for (int i = 0; i < layout.getChildCount(); i++) {
        View v = layout.getChildAt(i);
        v.setFocusable(false);
    }
larham1
  • 11,736
  • 5
  • 35
  • 26