Java Code Examples for android.widget.ListView.setFocusable()

The following are Jave code examples for showing how to use setFocusable() of the android.widget.ListView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: GitHub   File: XScrollViewActivity.java   Source Code and License Vote up 6 votes
protected void initView() {
    mHandler = new Handler();

    mScrollView = (XScrollView) findViewById(R.id.scroll_view);
    mScrollView.setPullRefreshEnable(true);
    mScrollView.setPullLoadEnable(true);
    mScrollView.setAutoLoadEnable(true);
    mScrollView.setIXScrollViewListener(this);
    mScrollView.setRefreshTime(getTime());

    View content = LayoutInflater.from(this).inflate(R.layout.vw_scroll_view_content, null);

    if (null != content) {
        mListView = (ListView) content.findViewById(R.id.content_list);
        mListView.setFocusable(false);
        mListView.setFocusableInTouchMode(false);

        mAdapter = new ArrayAdapter<String>(this, R.layout.vw_list_item, mItems);
        mListView.setAdapter(mAdapter);
        measureHeight();
    }

    mScrollView.setView(content);
}
 
Example 2
Project: pivaa   File: AboutActivity.java   Source Code and License Vote up 5 votes
/**
 * Render custom item
 */
public void renderListView() {
    // get all records

    AboutJSONParser aboutJSONParser = new AboutJSONParser("vulnerabilities.json", getApplicationContext());
    ArrayList<AboutRecord> list = aboutJSONParser.parse();

    AboutAdapter adapter = new AboutAdapter(list, getApplicationContext());

    ListView listView = (ListView) findViewById(R.id.listview_about);
    listView.setFocusable(false);
    listView.setAdapter(adapter);

    this.setListViewHeightBasedOnChildren(listView, adapter);
}