KB-20071120-043

From Triled Wiki

Jump to: navigation, search

Edit grid_2.xml in samples/ApiDemos/res/layout, add LinearLayout with an EditText and put GridView into this layout.

When you run a grid sample the initial focus is on EditText, and if you try to select Grid with the pad, you will see a NullException.

[edit] Temporarily solution

Suggested by ddm (see [1]):

  1. Make some wrapper to GridView.
  2. Recreate GridView every time it loses focus
  3. Give focus back by "hands" throught wrapper, like GridView.requestFocus();
Personal tools