Skip to content

Commit 827f54b

Browse files
authored
Add FireDialog theme in order to fix navigation buttons hiden on some devices (#863)
* Add FireDialog theme in order to fix navigation buttons hiden on some devices * Remove android:navigationBarColor from main style and move the same style to v27 theme file for better compatibility
1 parent e1890ba commit 827f54b

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

app/src/main/java/com/duckduckgo/app/global/view/FireDialog.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ import kotlinx.android.synthetic.main.sheet_fire_clear_data.*
2525
import kotlinx.coroutines.GlobalScope
2626
import kotlinx.coroutines.launch
2727

28-
class FireDialog(context: Context, private val clearPersonalDataAction: ClearPersonalDataAction) : BottomSheetDialog(context) {
28+
class FireDialog(
29+
context: Context,
30+
private val clearPersonalDataAction: ClearPersonalDataAction
31+
) : BottomSheetDialog(context, R.style.FireDialog) {
2932

3033
var clearStarted: (() -> Unit) = {}
3134
var clearComplete: (() -> Unit) = {}

app/src/main/res/values-v27/themes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,10 @@
3030
<item name="android:navigationBarColor">@color/white</item>
3131
</style>
3232

33+
<style name="FireDialog" parent="@style/Theme.Design.BottomSheetDialog">
34+
<item name="android:windowIsFloating">false</item>
35+
<item name="android:navigationBarColor">?toolbarBgColor</item>
36+
<item name="android:statusBarColor">@android:color/transparent</item>
37+
</style>
38+
3339
</resources>

app/src/main/res/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,4 +310,9 @@
310310
<item name="android:textColor">?attr/colorAccent</item>
311311
</style>
312312

313+
<style name="FireDialog" parent="@style/Theme.Design.BottomSheetDialog">
314+
<item name="android:windowIsFloating">false</item>
315+
<item name="android:statusBarColor">@android:color/transparent</item>
316+
</style>
317+
313318
</resources>

0 commit comments

Comments
 (0)