Search in sources :

Example 26 with SimpleAdapter

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

the class VectorDrawableTest method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Intent intent = getIntent();
    String path = intent.getStringExtra("com.android.test.hwui.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 27 with SimpleAdapter

use of android.widget.SimpleAdapter in project ABPlayer by winkstu.

the class VitamioListActivity method onCreate.

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

Example 28 with SimpleAdapter

use of android.widget.SimpleAdapter in project spring-data-document-examples by spring-projects.

the class RestListingActivity method onCreate.

//***************************************
// Activity methods
//***************************************
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    List<Map<String, String>> events = fetchRests();
    SimpleAdapter adapter = new SimpleAdapter(this, events, R.layout.rests_list_item, new String[] { "name", "city" }, new int[] { R.id.title, R.id.subtitle });
    this.setListAdapter(adapter);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter) HashMap(java.util.HashMap) Map(java.util.Map)

Example 29 with SimpleAdapter

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

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 30 with SimpleAdapter

use of android.widget.SimpleAdapter in project ByakuGallery by diegocarloslima.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setListAdapter(new SimpleAdapter(this, createData(), android.R.layout.simple_list_item_2, new String[] { "title", "subtitle" }, new int[] { android.R.id.text1, android.R.id.text2 }));
}
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