Search in sources :

Example 76 with SimpleAdapter

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 });
}
Also used : SimpleAdapter(android.widget.SimpleAdapter)

Example 77 with SimpleAdapter

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);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter)

Example 78 with SimpleAdapter

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);
}
Also used : HashMap(java.util.HashMap) JCVideoPlayerStandard(fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard) ArrayList(java.util.ArrayList) SimpleAdapter(android.widget.SimpleAdapter) HashMap(java.util.HashMap) Map(java.util.Map) ListAdapter(android.widget.ListAdapter)

Example 79 with SimpleAdapter

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);
}
Also used : SimpleAdapter(android.widget.SimpleAdapter) Intent(android.content.Intent)

Example 80 with SimpleAdapter

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");
}
Also used : ListView(android.widget.ListView) SimpleAdapter(android.widget.SimpleAdapter)

Aggregations

SimpleAdapter (android.widget.SimpleAdapter)133 HashMap (java.util.HashMap)52 ListView (android.widget.ListView)38 Intent (android.content.Intent)34 Map (java.util.Map)33 View (android.view.View)28 ArrayList (java.util.ArrayList)28 AdapterView (android.widget.AdapterView)27 TextView (android.widget.TextView)26 ViewGroup (android.view.ViewGroup)13 ListAdapter (android.widget.ListAdapter)10 ImageView (android.widget.ImageView)8 Spanned (android.text.Spanned)6 TtsSpan (android.text.style.TtsSpan)6 FrameLayout (android.widget.FrameLayout)6 Test (org.junit.Test)6 SuppressLint (android.annotation.SuppressLint)5 Context (android.content.Context)5 MotionEvent (android.view.MotionEvent)5 OnClickListener (android.view.View.OnClickListener)5