-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#169: Introduced empty abstract BaseActivity as root of inheritance c…
…hain for all activities
- Loading branch information
Showing
13 changed files
with
221 additions
and
24 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
app/src/main/java/de/k3b/android/androFotoFinder/BaseActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2020 by k3b. | ||
* | ||
* This file is part of AndroFotoFinder / #APhotoManager. | ||
* | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/> | ||
*/ | ||
|
||
package de.k3b.android.androFotoFinder; | ||
|
||
import de.k3b.android.widget.ActivityWithAutoCloseDialogs; | ||
import de.k3b.android.widget.ActivityWithCallContext; | ||
import de.k3b.android.widget.BaseQueryActivity; | ||
import de.k3b.android.widget.FilePermissionActivity; | ||
import de.k3b.android.widget.LocalizedActivity; | ||
import de.k3b.android.widget.PermissionBaseActivity; | ||
|
||
/** | ||
* Nearly all activities are inherited from {@link BaseActivity}. | ||
* * {@link FilePermissionActivity} manage permission write to external-storage and to sdcard | ||
* * {@link PermissionBaseActivity} can Ask for permission | ||
* * {@link ActivityWithAutoCloseDialogs} Automatically closes pop-dialogs | ||
* * {@link LocalizedActivity} Change the locale (language) and translation of its content at runtime | ||
* * {@link ActivityWithCallContext} memorizes the activity call stack (parent Activities) for debugging purposes. | ||
* <p> | ||
* * {@link BaseQueryActivity} filtered collection of photos used by | ||
* ** {@link de.k3b.android.androFotoFinder.FotoGalleryActivity} | ||
* ** {@link de.k3b.android.androFotoFinder.locationmap.MapGeoPickerActivity} | ||
*/ | ||
public abstract class BaseActivity extends FilePermissionActivity { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/src/main/java/de/k3b/android/widget/FilePermissionActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2020 by k3b. | ||
* | ||
* This file is part of AndroFotoFinder / #APhotoManager. | ||
* | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/> | ||
*/ | ||
|
||
package de.k3b.android.widget; | ||
|
||
import android.Manifest; | ||
|
||
/** | ||
* Manage permission | ||
* * write to external-storage and | ||
* * write to sdcard/usbstick,.... | ||
*/ | ||
public abstract class FilePermissionActivity extends PermissionBaseActivity { | ||
private void t() { | ||
super.requestPermisson(Manifest.permission.WRITE_EXTERNAL_STORAGE, | ||
"To %s the app needs write permission.", | ||
(_this, result) -> onSaveChangesWithGrant(_this, result)); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.