This commit is contained in:
Bnyro 2022-06-02 18:07:09 +02:00
parent ab78047bd1
commit 349862aa55
2 changed files with 29 additions and 15 deletions

View File

@ -29,13 +29,13 @@ import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
import com.google.android.material.color.DynamicColors
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import org.json.JSONObject
import org.json.JSONTokener
import retrofit2.HttpException
import java.io.IOException
import java.io.InputStream
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream
import org.json.JSONObject
import org.json.JSONTokener
import retrofit2.HttpException
private var isCurrentViewMainSettings = true
private var requireMainActivityRestart = false
@ -172,7 +172,7 @@ class SettingsActivity :
val login = findPreference<Preference>("login_register")
login?.setOnPreferenceClickListener {
requireMainActivityRestart = true
val newFragment = LoginDialog()
newFragment.show(childFragmentManager, "Login")
true

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -49,15 +48,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/create_playlist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/createPlaylist"
android:layout_gravity="center"
android:layout_margin="8dp"
android:textColor="?attr/colorSurface"
android:drawableLeft="@drawable/ic_add" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -73,4 +63,28 @@
</LinearLayout>
</ScrollView>
</com.github.libretube.CustomSwipeToRefresh>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom">
<com.google.android.material.button.MaterialButton
android:layout_gravity="right"
android:id="@+id/create_playlist"
android:layout_marginBottom="15dp"
android:layout_marginRight="15dp"
android:layout_width="50dp"
android:layout_height="50dp"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
app:cornerRadius="16dp"
app:icon="@drawable/ic_add"
android:backgroundTint="?attr/colorSecondary"
app:iconGravity="textStart"
app:iconPadding="0dp" />
</FrameLayout>
</FrameLayout>