Search in sources :

Example 1 with JCVideoPlayerStandard

use of fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard 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)

Aggregations

ListAdapter (android.widget.ListAdapter)1 SimpleAdapter (android.widget.SimpleAdapter)1 JCVideoPlayerStandard (fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1