@Override public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.main); player=findViewById(R.id.player); if (player!=null) { player.setOnDragListener(this); } thumbnailLarge=findViewById(R.id.thumbnail_large); if (thumbnailLarge!=null) { thumbnailLarge.setOnDragListener(this); } setLayoutManager(new LinearLayoutManager(this)); adapter=new VideoAdapter(getRecyclerView()); setAdapter(adapter); getRecyclerView().requestFocus(); if (state!=null) { isInPermission= state.getBoolean(STATE_IN_PERMISSION, false); } if (hasFilesPermission()) { loadVideos(); } else if (!isInPermission) { isInPermission=true; ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_PERMS); } }
@Override public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.main); player=findViewById(R.id.player); if (player!=null) { player.setOnDragListener(this); } thumbnailLarge=findViewById(R.id.thumbnail_large); if (thumbnailLarge!=null) { thumbnailLarge.setOnDragListener(this); } setLayoutManager(new LinearLayoutManager(this)); adapter=new VideoAdapter(getRecyclerView()); setAdapter(adapter); getRecyclerView().requestFocus(); if (state!=null) { isInPermission= state.getBoolean(STATE_IN_PERMISSION, false); } if (hasFilesPermission()) { loadVideos(); } else if (!isInPermission) { isInPermission=true; ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_PERMS); } }
@Override public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.main); player=findViewById(R.id.player); if (player!=null) { player.setOnDragListener(this); } thumbnailLarge=findViewById(R.id.thumbnail_large); if (thumbnailLarge!=null) { thumbnailLarge.setOnDragListener(this); } setLayoutManager(new LinearLayoutManager(this)); adapter=new VideoAdapter(getRecyclerView()); setAdapter(adapter); getRecyclerView().requestFocus(); if (state!=null) { isInPermission= state.getBoolean(STATE_IN_PERMISSION, false); } if (hasFilesPermission()) { loadVideos(); } else if (!isInPermission) { isInPermission=true; ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_PERMS); } }
@Override public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.main); player=findViewById(R.id.player); if (player!=null) { player.setOnDragListener(this); } thumbnailLarge=findViewById(R.id.thumbnail_large); if (thumbnailLarge!=null) { thumbnailLarge.setOnDragListener(this); } setLayoutManager(new LinearLayoutManager(this)); adapter=new VideoAdapter(getRecyclerView()); setAdapter(adapter); getRecyclerView().requestFocus(); if (state!=null) { isInPermission= state.getBoolean(STATE_IN_PERMISSION, false); } if (hasFilesPermission()) { loadVideos(); } else if (!isInPermission) { isInPermission=true; ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_PERMS); } }
@Override public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.main);