use of android.widget.SimpleAdapter in project GT by Tencent.
the class GTDemoActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gt_demo);
showImg = (Button) findViewById(R.id.showimg);
showImg.setOnClickListener(showImage);
gridview = (GridView) findViewById(R.id.gridview);
saImageItems = new SimpleAdapter(getApplicationContext(), lstImageItem, R.layout.gt_gridview_item, new String[] { "img" }, new int[] { R.id.ItemImage });
}
use of android.widget.SimpleAdapter in project platform_frameworks_base by android.
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);
}
use of android.widget.SimpleAdapter in project JieCaoVideoPlayer by lipangit.
the class AutoTinyNormalActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(true);
getSupportActionBar().setDisplayUseLogoEnabled(false);
getSupportActionBar().setTitle("AutoTinyNormal");
setContentView(R.layout.activity_listview_content);
listView = (ListView) findViewById(R.id.listview);
headerLayout = (LinearLayout) getLayoutInflater().inflate(R.layout.header_auto_tiny_normal, null);
listView.addHeaderView(headerLayout);
JCVideoPlayerStandard jcVideoPlayerStandard = (JCVideoPlayerStandard) headerLayout.findViewById(R.id.jc_video);
jcVideoPlayerStandard.setUp("http://2449.vod.myqcloud.com/2449_22ca37a6ea9011e5acaaf51d105342e3.f20.mp4", JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, "嫂子坐这");
Picasso.with(this).load("http://cos.myqcloud.com/1000264/qcloud_video_attachment/842646334/vod_cover/cover1458036374.jpg").into(jcVideoPlayerStandard.thumbImageView);
Map<String, String> keyValuePair = new HashMap<>();
keyValuePair.put("key", "list item");
List<Map<String, String>> list = new ArrayList<>();
for (int i = 0; i < 50; i++) {
list.add(keyValuePair);
}
ListAdapter adapter = new SimpleAdapter(this, list, android.R.layout.simple_list_item_1, new String[] { "key" }, new int[] { android.R.id.text1 });
listView.setAdapter(adapter);
listView.setOnScrollListener(this);
}
use of android.widget.SimpleAdapter in project android_frameworks_base by DirtyUnicorns.
the class HwTests 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 DirtyUnicorns.
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