mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
cleanup dialogs
This commit is contained in:
parent
0c7046101a
commit
1a8dee1f29
@ -3,11 +3,9 @@ package com.github.libretube.dialogs
|
||||
import android.app.Dialog
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.core.content.ContentProviderCompat.requireContext
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.util.RetrofitInstance.url
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
class ShareDialog(
|
||||
|
@ -23,15 +23,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/addToPlaylist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:padding="8dp"
|
||||
android:text="@string/addToPlaylist"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
@ -15,21 +14,7 @@
|
||||
android:layout_margin="10dp"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
app:boxCornerRadiusBottomStart="15dp"
|
||||
app:boxCornerRadiusBottomEnd="15dp"
|
||||
app:boxCornerRadiusTopEnd="15dp"
|
||||
app:boxCornerRadiusTopStart="15dp">
|
||||
<com.google.android.material.textfield.TextInputLayout style="@style/CustomDialogTextInputLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/playlist_name"
|
||||
@ -49,28 +34,13 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:layout_gravity="right"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/create_new_playlist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/createPlaylist"
|
||||
android:layout_gravity="right"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
@ -15,20 +14,7 @@
|
||||
android:layout_margin="10dp"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
|
||||
app:boxCornerRadiusBottomStart="15dp"
|
||||
app:boxCornerRadiusBottomEnd="15dp"
|
||||
app:boxCornerRadiusTopEnd="15dp"
|
||||
app:boxCornerRadiusTopStart="15dp">
|
||||
<com.google.android.material.textfield.TextInputLayout style="@style/CustomDialogTextInputLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/instanceName"
|
||||
@ -39,20 +25,7 @@
|
||||
android:padding="12dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
|
||||
app:boxCornerRadiusBottomStart="15dp"
|
||||
app:boxCornerRadiusBottomEnd="15dp"
|
||||
app:boxCornerRadiusTopEnd="15dp"
|
||||
app:boxCornerRadiusTopStart="15dp">
|
||||
<com.google.android.material.textfield.TextInputLayout style="@style/CustomDialogTextInputLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/instanceFrontendUrl"
|
||||
@ -63,20 +36,7 @@
|
||||
android:padding="12dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
app:boxCornerRadiusBottomStart="15dp"
|
||||
app:boxCornerRadiusBottomEnd="15dp"
|
||||
app:boxCornerRadiusTopEnd="15dp"
|
||||
app:boxCornerRadiusTopStart="15dp">
|
||||
<com.google.android.material.textfield.TextInputLayout style="@style/CustomDialogTextInputLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/instanceApiUrl"
|
||||
@ -95,30 +55,13 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:layout_gravity="end"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
style="?android:attr/buttonBarButtonStyle" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/addInstance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/addInstance"
|
||||
android:layout_gravity="end"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
style="?android:attr/buttonBarButtonStyle" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -28,15 +28,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/download"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/download"
|
||||
android:layout_gravity="right"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
@ -15,20 +14,7 @@
|
||||
android:layout_margin="10dp"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
|
||||
app:boxCornerRadiusBottomStart="15dp"
|
||||
app:boxCornerRadiusBottomEnd="15dp"
|
||||
app:boxCornerRadiusTopEnd="15dp"
|
||||
app:boxCornerRadiusTopStart="15dp">
|
||||
<com.google.android.material.textfield.TextInputLayout style="@style/CustomDialogTextInputLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/username"
|
||||
@ -39,22 +25,7 @@
|
||||
android:padding="12dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintEnabled="false"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
|
||||
app:boxCornerRadiusBottomStart="15dp"
|
||||
app:boxCornerRadiusBottomEnd="15dp"
|
||||
app:boxCornerRadiusTopEnd="15dp"
|
||||
app:boxCornerRadiusTopStart="15dp"
|
||||
|
||||
>
|
||||
<com.google.android.material.textfield.TextInputLayout style="@style/CustomDialogTextInputLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password"
|
||||
@ -74,28 +45,13 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/register"
|
||||
android:layout_gravity="right"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login"
|
||||
android:layout_gravity="right"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -23,15 +23,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/logout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/logout"
|
||||
android:layout_gravity="right"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
style="@style/CustomDialogButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -201,7 +201,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp" >
|
||||
android:layout_height="15dp">
|
||||
|
||||
<com.google.android.exoplayer2.ui.DefaultTimeBar
|
||||
android:id="@id/exo_progress"
|
||||
|
@ -11,54 +11,54 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/playlist_scrollview">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_name"
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:padding="8dp" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_uploader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_totVideos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/playlist_recView"
|
||||
<TextView
|
||||
android:id="@+id/playlist_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
</RelativeLayout>
|
||||
android:text=""
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:padding="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/playlist_uploader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</ScrollView>
|
||||
<TextView
|
||||
android:id="@+id/playlist_totVideos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/playlist_recView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
@ -44,4 +44,31 @@
|
||||
|
||||
</style>
|
||||
|
||||
<style name="CustomDialogButton">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">right</item>
|
||||
<item name="android:layout_marginRight">16dp</item>
|
||||
<item name="android:layout_marginBottom">8dp</item>
|
||||
<item name="android:padding">8dp</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:backgroundTint">@android:color/transparent</item>
|
||||
<item name="android:textColor">?attr/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomDialogTextInputLayout" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="hintEnabled">false</item>
|
||||
<item name="android:layout_marginLeft">10dp</item>
|
||||
<item name="android:layout_marginRight">10dp</item>
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:layout_marginBottom">4dp</item>
|
||||
|
||||
<item name="boxCornerRadiusBottomStart">15dp</item>
|
||||
<item name="boxCornerRadiusBottomEnd">15dp</item>
|
||||
<item name="boxCornerRadiusTopEnd">15dp</item>
|
||||
<item name="boxCornerRadiusTopStart">15dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user