initialize the albums at resume, to act properly on images deletion
This commit is contained in:
parent
9e219d7410
commit
fdc2e17d39
1 changed files with 9 additions and 0 deletions
|
@ -36,6 +36,15 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
tryloadGallery();
|
||||
}
|
||||
|
||||
private void tryloadGallery() {
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
|
||||
initializeGallery();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue