Skip to content

Commit b3733bb

Browse files
Merge pull request #16475 from nextcloud/backport/16474/stable-3.36
[stable-3.36] Theme Ok button for storage chooser
2 parents 8daf483 + 14f773b commit b3733bb

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/pull_request_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ Unit tests: https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md#uni
88
Instrumented tests: https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md#instrumented-tests
99
UI tests: https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md#ui-tests
1010
-->
11+
### 🖼️ Screenshots
12+
13+
🏚️ Before | 🏡 After
14+
---|---
15+
B | A
16+
1117
- [ ] Tests written, or not not needed

app/src/main/java/com/nextcloud/ui/ChooseStorageLocationDialogFragment.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import android.preference.PreferenceManager
1414
import android.view.LayoutInflater
1515
import android.view.View
1616
import android.view.ViewGroup
17+
import androidx.appcompat.app.AlertDialog
1718
import androidx.fragment.app.DialogFragment
19+
import com.google.android.material.button.MaterialButton
1820
import com.google.android.material.dialog.MaterialAlertDialogBuilder
1921
import com.nextcloud.client.di.Injectable
2022
import com.nextcloud.client.preferences.AppPreferencesImpl
@@ -47,6 +49,16 @@ class ChooseStorageLocationDialogFragment :
4749
private val selectedPrivacyType
4850
get() = if (binding.allowMediaIndexSwitch.isChecked) PrivacyType.PUBLIC else PrivacyType.PRIVATE
4951

52+
override fun onStart() {
53+
super.onStart()
54+
val alertDialog = dialog as AlertDialog
55+
56+
val positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE) as? MaterialButton
57+
positiveButton?.let {
58+
viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton)
59+
}
60+
}
61+
5062
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
5163
binding = DialogDataStorageLocationBinding.inflate(layoutInflater)
5264

0 commit comments

Comments
 (0)