Merge pull request #362 from Bnyro/fab

Fix dialog btn colors
This commit is contained in:
Bnyro 2022-06-04 08:36:48 +02:00 committed by GitHub
commit 19b6527066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 37 deletions

View File

@ -6,7 +6,6 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
import android.widget.Toast
@ -58,7 +57,8 @@ class Library : Fragment() {
Log.d(TAG, "hmm")
fetchPlaylists(view)
}
view.findViewById<Button>(R.id.create_playlist).setOnClickListener {
view.findViewById<com.google.android.material.floatingactionbutton
.FloatingActionButton>(R.id.create_playlist).setOnClickListener {
val newFragment = CreatePlaylistDialog()
newFragment.show(childFragmentManager, "Create Playlist")
}
@ -67,7 +67,8 @@ class Library : Fragment() {
}
} else {
refreshLayout.isEnabled = false
view.findViewById<Button>(R.id.create_playlist).visibility = View.GONE
view.findViewById<com.google.android.material.floatingactionbutton
.FloatingActionButton>(R.id.create_playlist).visibility = View.GONE
with(view.findViewById<ImageView>(R.id.boogh2)) {
visibility = View.VISIBLE
setImageResource(R.drawable.ic_login)

View File

@ -32,7 +32,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/addToPlaylist"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp" />

View File

@ -52,7 +52,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cancel"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp" />
@ -61,7 +61,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/createPlaylist"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp" />

View File

@ -51,7 +51,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/download"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp"
android:layout_gravity="center" />

View File

@ -77,7 +77,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp" />
@ -86,7 +86,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp" />

View File

@ -26,7 +26,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/logout"
android:textColor="?attr/colorSurface"
android:textColor="@color/white"
android:padding="8dp"
android:layout_margin="8dp"
android:layout_gravity="center" />

View File

@ -64,27 +64,14 @@
</ScrollView>
</com.github.libretube.util.CustomSwipeToRefresh>
<FrameLayout
android:layout_width="match_parent"
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/create_playlist"
android:layout_width="wrap_content"
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>
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
app:tint="?android:attr/colorBackground"
app:backgroundTint="?attr/colorSecondary"
app:srcCompat="@drawable/ic_add" />
</FrameLayout>

View File

@ -258,9 +258,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="17dp"
app:cardCornerRadius="27dp">
app:cardCornerRadius="18dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@ -284,9 +282,9 @@
android:layout_height="wrap_content"
android:layout_marginRight="3dp"
android:src="@drawable/ic_arrow_up_down"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -23,7 +23,7 @@
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:cardCornerRadius="27dp"
app:cardCornerRadius="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">