properly open the video item at viewpager

This commit is contained in:
tibbi 2016-06-06 00:09:03 +02:00
parent e206fa92ca
commit b36d06aafa

View file

@ -249,6 +249,7 @@ public class ViewPagerActivity extends AppCompatActivity
private List<Media> getMedia() {
final List<Media> media = new ArrayList<>();
int j = 0;
for (int i = 0; i < 2; i++) {
Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
if (i == 1) {
@ -261,7 +262,6 @@ public class ViewPagerActivity extends AppCompatActivity
final Cursor cursor = getContentResolver().query(uri, columns, where, args, order);
final String pattern = Pattern.quote(directory) + "/[^/]*";
int j = 0;
if (cursor != null && cursor.moveToFirst()) {
final int pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA);
do {