From 1be4b3146b1592d6548dd102979de2c4dc8a8bac Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 13 Aug 2022 15:15:35 +0200 Subject: [PATCH] add icons --- .../github/libretube/preferences/AdvancedSettings.kt | 2 +- app/src/main/res/drawable/ic_backup.xml | 10 ++++++++++ app/src/main/res/drawable/ic_restore.xml | 10 ++++++++++ app/src/main/res/xml/advanced_settings.xml | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/ic_backup.xml create mode 100644 app/src/main/res/drawable/ic_restore.xml diff --git a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt index b9158c6f2..00a3da32d 100644 --- a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt +++ b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt @@ -21,7 +21,7 @@ class AdvancedSettings : MaterialPreferenceFragment() { private lateinit var createFile: ActivityResultLauncher override fun onCreate(savedInstanceState: Bundle?) { - getContent = + getContent = registerForActivityResult( ActivityResultContracts.GetContent() ) { uri: Uri? -> diff --git a/app/src/main/res/drawable/ic_backup.xml b/app/src/main/res/drawable/ic_backup.xml new file mode 100644 index 000000000..482848349 --- /dev/null +++ b/app/src/main/res/drawable/ic_backup.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_restore.xml b/app/src/main/res/drawable/ic_restore.xml new file mode 100644 index 000000000..c280db227 --- /dev/null +++ b/app/src/main/res/drawable/ic_restore.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/xml/advanced_settings.xml b/app/src/main/res/xml/advanced_settings.xml index 222655e02..59954a0c7 100644 --- a/app/src/main/res/xml/advanced_settings.xml +++ b/app/src/main/res/xml/advanced_settings.xml @@ -50,10 +50,12 @@