For #2941 - Creates delete dialog style
parent
250548a72f
commit
7d65e21b83
|
@ -376,7 +376,7 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
|||
AlertDialog.Builder(
|
||||
ContextThemeWrapper(
|
||||
activity,
|
||||
R.style.DialogStyle
|
||||
R.style.DeleteDialogStyle
|
||||
)
|
||||
).apply {
|
||||
val message = context.getString(R.string.tab_collection_dialog_message, tabCollection.title)
|
||||
|
|
|
@ -142,14 +142,14 @@ class HistoryFragment : Fragment(), CoroutineScope, BackHandler {
|
|||
AlertDialog.Builder(
|
||||
ContextThemeWrapper(
|
||||
it,
|
||||
R.style.DialogStyle
|
||||
R.style.DeleteDialogStyle
|
||||
)
|
||||
).apply {
|
||||
setMessage(R.string.history_delete_all_dialog)
|
||||
setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _ ->
|
||||
dialog.cancel()
|
||||
}
|
||||
setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _ ->
|
||||
setPositiveButton(R.string.history_clear_dialog) { dialog: DialogInterface, _ ->
|
||||
launch(Dispatchers.IO) {
|
||||
requireComponents.core.historyStorage.deleteEverything()
|
||||
reloadData()
|
||||
|
|
|
@ -112,7 +112,7 @@ class DeleteBrowsingDataFragment : Fragment(), CoroutineScope {
|
|||
AlertDialog.Builder(
|
||||
ContextThemeWrapper(
|
||||
activity,
|
||||
R.style.DialogStyle
|
||||
R.style.DeleteDialogStyle
|
||||
)
|
||||
).apply {
|
||||
val appName = context.getString(R.string.app_name)
|
||||
|
|
|
@ -333,6 +333,8 @@
|
|||
<string name="history_delete_all">Delete history</string>
|
||||
<!-- Text for the dialog to confirm clearing all history -->
|
||||
<string name="history_delete_all_dialog">Are you sure you want to clear your history?</string>
|
||||
<!-- Text for positive action to delete history in deleting history dialog -->
|
||||
<string name="history_clear_dialog">Clear</string>
|
||||
<!-- Text for the button to delete a single history item -->
|
||||
<string name="history_delete_item">Delete</string>
|
||||
<!-- History multi select title in app bar
|
||||
|
|
|
@ -55,6 +55,19 @@
|
|||
<item name="android:background">?above</item>
|
||||
<item name="colorAccent">?accent</item>
|
||||
<item name="android:textColorPrimary">?primaryText</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
|
||||
<item name="android:textColor">?primaryText</item>
|
||||
</style>
|
||||
|
||||
<style name="PositiveButtonDeleteStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
|
||||
<item name="android:textColor">?destructive</item>
|
||||
</style>
|
||||
|
||||
<style name="DeleteDialogStyle" parent="DialogStyle">
|
||||
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonDeleteStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="PrivateThemeBase" parent="Theme.AppCompat.NoActionBar">
|
||||
|
|
Loading…
Reference in New Issue