reuse some dimension resources from Commons

This commit is contained in:
tibbi 2017-03-26 19:15:28 +02:00
parent e0a421fdde
commit 519609c4fb
7 changed files with 39 additions and 40 deletions

View file

@ -5,7 +5,7 @@
android:id="@+id/main_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/song_item_vertical_margin">
android:paddingTop="@dimen/medium_margin">
<LinearLayout
android:id="@+id/main_controls"
@ -22,8 +22,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:paddingBottom="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"
android:src="@drawable/ic_previous"/>
<ImageView
@ -32,8 +32,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:paddingBottom="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"
android:src="@drawable/ic_play"/>
<ImageView
@ -42,8 +42,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:paddingBottom="@dimen/small_margin"
android:paddingTop="@dimen/small_margin"
android:src="@drawable/ic_next"/>
</LinearLayout>
@ -58,7 +58,7 @@
android:ellipsize="end"
android:gravity="center_horizontal"
android:maxLines="1"
android:textSize="18sp"/>
android:textSize="@dimen/big_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/song_artist"
@ -69,7 +69,7 @@
android:layout_marginRight="@dimen/activity_margin"
android:gravity="center_horizontal"
android:maxLines="1"
android:textSize="16sp"/>
android:textSize="@dimen/bigger_text_size"/>
<com.simplemobiletools.commons.views.MySeekBar
android:id="@+id/progressbar"
@ -88,7 +88,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/progressbar"
android:layout_marginBottom="@dimen/medium_padding"
android:layout_marginBottom="@dimen/medium_margin"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:gravity="center_horizontal"

View file

@ -23,40 +23,40 @@
android:id="@+id/sorting_dialog_radio_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:text="@string/title"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/sorting_dialog_radio_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:text="@string/artist"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/sorting_dialog_radio_file_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:text="@string/filename"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/sorting_dialog_radio_duration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:text="@string/duration"/>
</RadioGroup>
<ImageView
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="@dimen/medium_padding"
android:layout_marginTop="@dimen/medium_padding"
android:layout_marginBottom="@dimen/medium_margin"
android:layout_marginTop="@dimen/medium_margin"
android:background="@color/divider_weak"/>
<RadioGroup
@ -68,16 +68,16 @@
android:id="@+id/sorting_dialog_radio_ascending"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:text="@string/ascending"/>
<com.simplemobiletools.commons.views.MyCompatRadioButton
android:id="@+id/sorting_dialog_radio_descending"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:text="@string/descending"/>
</RadioGroup>
</LinearLayout>

View file

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/widget_holder"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/black"
android:gravity="center_horizontal">
<include layout="@layout/widget_controls"/>
</RelativeLayout>

View file

@ -11,14 +11,14 @@
android:id="@+id/song_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/song_item_vertical_margin">
android:padding="@dimen/medium_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/song_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Song Title"
android:textSize="16sp"/>
android:textSize="@dimen/bigger_text_size"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/song_artist"
@ -26,7 +26,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/song_title"
android:text="Song Artist"
android:textSize="14sp"/>
android:textSize="@dimen/normal_text_size"/>
<ImageView
android:id="@+id/song_note_image"

View file

@ -13,20 +13,20 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginTop="@dimen/medium_padding"
android:layout_marginTop="@dimen/small_margin"
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:text="@string/title"
android:textColor="@android:color/white"
android:textSize="18sp"/>
android:textSize="@dimen/big_text_size"/>
<TextView
android:id="@+id/song_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/song_title"
android:layout_marginBottom="@dimen/medium_padding"
android:layout_marginBottom="@dimen/small_margin"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:ellipsize="end"
@ -34,7 +34,7 @@
android:lines="1"
android:text="@string/artist"
android:textColor="@android:color/white"
android:textSize="16sp"/>
android:textSize="@dimen/bigger_text_size"/>
<include
layout="@layout/widget_controls"

View file

@ -12,8 +12,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:src="@drawable/ic_previous"/>
<ImageView
@ -22,8 +22,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:src="@drawable/ic_play"/>
<ImageView
@ -32,8 +32,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="@dimen/medium_padding"
android:paddingTop="@dimen/medium_padding"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:src="@drawable/ic_next"/>
</LinearLayout>

View file

@ -1,5 +1,3 @@
<resources>
<dimen name="song_item_vertical_margin">6dp</dimen>
<dimen name="medium_padding">10dp</dimen>
<dimen name="controls_row_height">60dp</dimen>
</resources>