From 27d49933b08222262d2f4f5c547cdf32ef8b14c7 Mon Sep 17 00:00:00 2001 From: jiajunhui <309812983@qq.com> Date: Fri, 16 Nov 2018 10:39:31 +0800 Subject: [PATCH] fixed demo --- .../java/com/kk/taurus/avplayer/ui/ViewPagerPlayActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/kk/taurus/avplayer/ui/ViewPagerPlayActivity.java b/app/src/main/java/com/kk/taurus/avplayer/ui/ViewPagerPlayActivity.java index e570af5e..0003bfac 100644 --- a/app/src/main/java/com/kk/taurus/avplayer/ui/ViewPagerPlayActivity.java +++ b/app/src/main/java/com/kk/taurus/avplayer/ui/ViewPagerPlayActivity.java @@ -124,6 +124,10 @@ public void permissionSuccess() { @Override public void onResult(VideoResult result) { List items = result.getItems(); + if(items==null||items.size()<=0){ + Toast.makeText(ViewPagerPlayActivity.this, "无本地视频", Toast.LENGTH_SHORT).show(); + return; + } Collections.sort(items, new MCompartor()); mItems.addAll(DataUtils.transList(items)); PlayPagerAdapter pagerAdapter = new PlayPagerAdapter(ViewPagerPlayActivity.this, mItems);