-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
272 additions
and
12 deletions.
There are no files selected for viewing
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
27 changes: 27 additions & 0 deletions
27
android/app/src/main/java/github/tornaco/android/thanos/main/DialogUtils.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,27 @@ | ||
package github.tornaco.android.thanos.main; | ||
|
||
import android.content.Context; | ||
|
||
import com.google.android.material.dialog.MaterialAlertDialogBuilder; | ||
|
||
import github.tornaco.android.thanos.BuildProp; | ||
import github.tornaco.android.thanos.R; | ||
import github.tornaco.android.thanos.util.BrowserUtils; | ||
|
||
public class DialogUtils { | ||
private DialogUtils() { | ||
} | ||
|
||
public static void showNotActivated(Context context) { | ||
new MaterialAlertDialogBuilder(context) | ||
.setTitle(R.string.status_not_active) | ||
.setMessage(R.string.message_active_needed) | ||
.setCancelable(true) | ||
.setNegativeButton(android.R.string.cancel, null) | ||
.setPositiveButton(R.string.common_menu_title_wiki, | ||
(dialog, which) -> { | ||
BrowserUtils.launch(context, BuildProp.THANOX_URL_DOCS_HOME); | ||
}) | ||
.show(); | ||
} | ||
} |
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.