use of android.widget.SimpleAdapter in project double-espresso by JakeWharton.
the class MainActivity method onCreate.
@Override
public 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().setTextFilterEnabled(true);
}
use of android.widget.SimpleAdapter in project android_frameworks_base by DirtyUnicorns.
the class MainActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
String path = intent.getStringExtra(EXTRA_PATH);
if (path == null) {
path = "";
} else {
// not root level, display where we are in the hierarchy
setTitle(path);
}
FragmentManager fm = getSupportFragmentManager();
if (fm.findFragmentById(android.R.id.content) == null) {
ListFragment listFragment = new TestListFragment();
listFragment.setListAdapter(new SimpleAdapter(this, getData(path), android.R.layout.simple_list_item_1, new String[] { "title" }, new int[] { android.R.id.text1 }));
fm.beginTransaction().add(android.R.id.content, listFragment).commit();
}
}
use of android.widget.SimpleAdapter in project VitamioBundle by yixia.
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 }));
}
use of android.widget.SimpleAdapter in project android_frameworks_base by ResurrectionRemix.
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);
}
use of android.widget.SimpleAdapter in project android_frameworks_base by crdroidandroid.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ListView lv = (ListView) findViewById(android.R.id.list);
lv.setDrawSelectorOnTop(true);
lv.setAdapter(new SimpleAdapter(this, SAMPLES, R.layout.item_layout, new String[] { KEY_NAME }, new int[] { android.R.id.text1 }));
lv.setOnItemClickListener(this);
getActionBar().setTitle("MainActivity");
}
Aggregations