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);