2

我有类似的情况

我使用setDescendantFocusability(FOCUS_BLOCK_DESCENDANTS)and setOnItemClickListener,但它们不起作用。

这是我的来源:

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.database_table_list);

    LBD conection = new LBD(this);
    conection.open();
    setting = conection.tblSettings();
    setting.create();

    urlLists = setting.selectRssTable();
    urlListView = (ListView) findViewById(R.id.listView1);
    uAdapter = new UrlArrayAdapter(DatabaseTable.this, urlListView,
            urlLists);

    urlListView.setAdapter(uAdapter);
    urlListView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
    urlListView.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view,
                int position, long id) {
            ((BaseAdapter) uAdapter).notifyDataSetChanged();
        }
    });
}

在此处输入图像描述

所有活跃的元素。

帮助我访问此链接

4

0 回答 0