diff --git a/app/src/main/java/com/github/libretube/SettingsActivity.kt b/app/src/main/java/com/github/libretube/SettingsActivity.kt index 8cea042d3..23cf30bab 100644 --- a/app/src/main/java/com/github/libretube/SettingsActivity.kt +++ b/app/src/main/java/com/github/libretube/SettingsActivity.kt @@ -4,6 +4,7 @@ import android.app.NotificationManager import android.os.Build import android.os.Bundle import android.view.View +import android.widget.ImageView import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import com.github.libretube.preferences.MainSettings @@ -30,6 +31,12 @@ class SettingsActivity : AppCompatActivity() { view.animate().alpha(1F).duration = 300 setContentView(R.layout.activity_settings) + + val backButton = view.findViewById(R.id.back_imageView) + backButton.setOnClickListener { + onBackPressed() + } + if (savedInstanceState == null) { supportFragmentManager .beginTransaction() 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 32c8b0e3b..75c0e31cb 100644 --- a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt +++ b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt @@ -3,6 +3,7 @@ package com.github.libretube.preferences import android.content.Intent import android.os.Bundle import android.provider.DocumentsContract +import android.widget.TextView import androidx.core.net.toUri import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat @@ -15,6 +16,9 @@ class AdvancedSettings : PreferenceFragmentCompat() { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.advanced_settings, rootKey) + val settingsTextView = view?.findViewById(R.id.settings_textView) + settingsTextView?.text = getString(R.string.advanced) + val clearHistory = findPreference("clear_history") clearHistory?.setOnPreferenceClickListener { val sharedPreferences = diff --git a/app/src/main/res/drawable/ic_arrow_back.xml b/app/src/main/res/drawable/ic_arrow_back.xml new file mode 100644 index 000000000..41820b78e --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_back.xml @@ -0,0 +1,11 @@ + + + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index de6591a20..86fd496d1 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -1,9 +1,33 @@ + android:layout_height="match_parent" + android:orientation="vertical"> - + + + + + + + + \ No newline at end of file