mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
commit
19b6527066
@ -6,7 +6,6 @@ import android.util.Log
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Button
|
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
@ -58,7 +57,8 @@ class Library : Fragment() {
|
|||||||
Log.d(TAG, "hmm")
|
Log.d(TAG, "hmm")
|
||||||
fetchPlaylists(view)
|
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()
|
val newFragment = CreatePlaylistDialog()
|
||||||
newFragment.show(childFragmentManager, "Create Playlist")
|
newFragment.show(childFragmentManager, "Create Playlist")
|
||||||
}
|
}
|
||||||
@ -67,7 +67,8 @@ class Library : Fragment() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
refreshLayout.isEnabled = false
|
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)) {
|
with(view.findViewById<ImageView>(R.id.boogh2)) {
|
||||||
visibility = View.VISIBLE
|
visibility = View.VISIBLE
|
||||||
setImageResource(R.drawable.ic_login)
|
setImageResource(R.drawable.ic_login)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/addToPlaylist"
|
android:text="@string/addToPlaylist"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp" />
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/cancel"
|
android:text="@string/cancel"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp" />
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
@ -61,7 +61,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/createPlaylist"
|
android:text="@string/createPlaylist"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp" />
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/download"
|
android:text="@string/download"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/register"
|
android:text="@string/register"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp" />
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
@ -86,7 +86,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/login"
|
android:text="@string/login"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp" />
|
android:layout_margin="8dp" />
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/logout"
|
android:text="@string/logout"
|
||||||
android:textColor="?attr/colorSurface"
|
android:textColor="@color/white"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:layout_gravity="center" />
|
android:layout_gravity="center" />
|
||||||
|
@ -64,27 +64,14 @@
|
|||||||
</ScrollView>
|
</ScrollView>
|
||||||
</com.github.libretube.util.CustomSwipeToRefresh>
|
</com.github.libretube.util.CustomSwipeToRefresh>
|
||||||
|
|
||||||
<FrameLayout
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/create_playlist"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom">
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="16dp"
|
||||||
<com.google.android.material.button.MaterialButton
|
app:tint="?android:attr/colorBackground"
|
||||||
android:layout_gravity="right"
|
app:backgroundTint="?attr/colorSecondary"
|
||||||
android:id="@+id/create_playlist"
|
app:srcCompat="@drawable/ic_add" />
|
||||||
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>
|
</FrameLayout>
|
@ -258,9 +258,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:layout_marginRight="16dp"
|
app:cardCornerRadius="18dp">
|
||||||
android:layout_marginBottom="17dp"
|
|
||||||
app:cardCornerRadius="27dp">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -284,9 +282,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginRight="3dp"
|
android:layout_marginRight="3dp"
|
||||||
android:src="@drawable/ic_arrow_up_down"
|
android:src="@drawable/ic_arrow_up_down"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
app:cardCornerRadius="27dp"
|
app:cardCornerRadius="24dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
Loading…
Reference in New Issue
Block a user