Search in sources :

Example 46 with SimpleAdapter

use of android.widget.SimpleAdapter in project NineOldAndroids by JakeWharton.

the class Demos method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Intent intent = getIntent();
    String path = intent.getStringExtra("com.example.android.apis.Path");
    if (path == null) {
        path = "";
    }
    setListAdapter(new SimpleAdapter(this, getData(path), android.R.layout.simple_list_item_1, new String[] { "title" }, new int[] { android.R.id.text1 }));
    getListView().setTextFilterEnabled(true);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter) Intent(android.content.Intent)

Example 47 with SimpleAdapter

use of android.widget.SimpleAdapter in project ViewPagerIndicator by JakeWharton.

the class ListSamples method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Intent intent = getIntent();
    String path = intent.getStringExtra("com.jakewharton.android.viewpagerindicator.sample.Path");
    if (path == null) {
        path = "";
    }
    setListAdapter(new SimpleAdapter(this, getData(path), android.R.layout.simple_list_item_1, new String[] { "title" }, new int[] { android.R.id.text1 }));
    getListView().setTextFilterEnabled(true);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter) Intent(android.content.Intent)

Example 48 with SimpleAdapter

use of android.widget.SimpleAdapter in project android-flip by openaphid.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setListAdapter(new SimpleAdapter(this, getData(), android.R.layout.simple_list_item_1, new String[] { "title" }, new int[] { android.R.id.text1 }));
    getListView().setScrollbarFadingEnabled(false);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter)

Example 49 with SimpleAdapter

use of android.widget.SimpleAdapter in project android_frameworks_base by ParanoidAndroid.

the class BiDiTestActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    mList = (ListView) findViewById(R.id.testlist);
    mList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    mList.setFocusableInTouchMode(true);
    final SimpleAdapter adapter = new SimpleAdapter(this, getTests(), R.layout.custom_list_item, new String[] { "title" }, new int[] { android.R.id.text1 });
    mList.setAdapter(adapter);
    mList.setOnItemClickListener(mOnClickListener);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter)

Example 50 with SimpleAdapter

use of android.widget.SimpleAdapter in project android_frameworks_base by ParanoidAndroid.

the class FileList method updateList.

protected void updateList() {
    setListAdapter(new SimpleAdapter(this, getData(), android.R.layout.simple_list_item_1, new String[] { "title" }, new int[] { android.R.id.text1 }));
    //.substring(mBaseLength-11); // show the word LayoutTests
    String title = mPath;
    setTitle(title);
    getListView().setSelection(mFocusIndex);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter)

Aggregations

SimpleAdapter (android.widget.SimpleAdapter)72 Intent (android.content.Intent)29 ListView (android.widget.ListView)18 HashMap (java.util.HashMap)15 View (android.view.View)12 AdapterView (android.widget.AdapterView)12 Map (java.util.Map)9 ImageView (android.widget.ImageView)6 TextView (android.widget.TextView)6 FragmentManager (android.support.v4.app.FragmentManager)4 ListFragment (android.support.v4.app.ListFragment)4 OnClickListener (android.view.View.OnClickListener)4 ArrayList (java.util.ArrayList)4 Context (android.content.Context)3 ViewGroup (android.view.ViewGroup)3 OnItemClickListener (android.widget.AdapterView.OnItemClickListener)3 ListAdapter (android.widget.ListAdapter)3 SharedPreferences (android.content.SharedPreferences)2 AssetManager (android.content.res.AssetManager)2 SQLException (android.database.SQLException)2