Merge pull request #2453 from Bnyro/master

improve the player action buttons
This commit is contained in:
Bnyro 2022-12-20 17:06:06 +01:00 committed by GitHub
commit d7c098ddca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 80 deletions

View File

@ -283,7 +283,6 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
if (SDK_INT < Build.VERSION_CODES.O) {
binding.relPlayerPip.visibility = View.GONE
binding.optionsLL.weightSum = 4f
}
}

View File

@ -146,95 +146,37 @@
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="5">
android:orientation="horizontal">
<LinearLayout
<TextView
android:id="@+id/relPlayer_share"
style="@style/PlayerActionsLayout"
android:layout_weight="1">
style="@style/PlayerActionsText"
android:text="@string/share"
app:drawableTopCompat="@drawable/ic_share" />
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_share" />
<TextView
style="@style/PlayerActionsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share" />
</LinearLayout>
<LinearLayout
<TextView
android:id="@+id/relPlayer_download"
style="@style/PlayerActionsLayout"
android:layout_weight="1">
style="@style/PlayerActionsText"
android:text="@string/download"
app:drawableTopCompat="@drawable/ic_download" />
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_download" />
<TextView
style="@style/PlayerActionsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/download" />
</LinearLayout>
<LinearLayout
<TextView
android:id="@+id/relPlayer_pip"
style="@style/PlayerActionsLayout"
android:layout_weight="1">
style="@style/PlayerActionsText"
android:text="@string/pop_up"
app:drawableTopCompat="@drawable/ic_open" />
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:padding="2dp"
android:src="@drawable/ic_open" />
<TextView
style="@style/PlayerActionsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pop_up" />
</LinearLayout>
<LinearLayout
<TextView
android:id="@+id/relPlayer_background"
style="@style/PlayerActionsLayout"
android:layout_weight="1">
style="@style/PlayerActionsText"
android:text="@string/audio"
app:drawableTopCompat="@drawable/ic_headphones" />
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_headphones" />
<TextView
style="@style/PlayerActionsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/audio" />
</LinearLayout>
<LinearLayout
<TextView
android:id="@+id/relPlayer_save"
style="@style/PlayerActionsLayout"
android:layout_weight="1">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_save" />
<TextView
style="@style/PlayerActionsText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/save" />
</LinearLayout>
style="@style/PlayerActionsText"
android:text="@string/save"
app:drawableTopCompat="@drawable/ic_save" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -94,8 +94,16 @@
<style name="PlayerActionsText">
<item name="android:autoSizeTextType" tools:targetApi="o">uniform</item>
<item name="android:autoSizeMinTextSize" tools:targetApi="o">10sp</item>
<item name="android:textSize">16sp</item>
<item name="android:autoSizeMaxTextSize" tools:targetApi="p">16sp</item>
<item name="android:maxLines">1</item>
<item name="android:gravity">bottom</item>
<item name="android:textAlignment">center</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:layout_gravity">bottom</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
</style>
<style name="PlayerControlBottom">