initialize the albums at resume, to act properly on images deletion

This commit is contained in:
tibbi 2016-02-29 20:27:51 +01:00
parent 9e219d7410
commit fdc2e17d39

View file

@ -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 {