widgets: rework button appearance
Further rework the button layout to be alike to other modern widgets. This changeset transforms the play button into a FAB-ish thing, makes spacing coherent between the uses of each layout, and adds spacers to make the buttons layout in a more appealing way.
This commit is contained in:
@@ -46,16 +46,15 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_mid_small">
|
||||
android:paddingTop="@dimen/spacing_medium">
|
||||
|
||||
<android.widget.TextView
|
||||
android:id="@+id/widget_song"
|
||||
style="@style/Widget.Auxio.TextView.Primary.AppWidget"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/def_widget_song" />
|
||||
|
||||
<android.widget.TextView
|
||||
@@ -67,56 +66,75 @@
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@string/def_widget_artist" />
|
||||
|
||||
<!-- See widget_small.xml for an explanation of the view layout -->
|
||||
|
||||
<android.widget.LinearLayout
|
||||
android:id="@+id/widget_controls"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_small"
|
||||
android:layout_marginStart="@dimen/spacing_mid_small"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_small">
|
||||
android:paddingStart="@dimen/spacing_mid_small"
|
||||
android:paddingEnd="@dimen/spacing_mid_small"
|
||||
android:paddingTop="@dimen/spacing_mid_small"
|
||||
android:paddingBottom="@dimen/spacing_medium"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_repeat"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="@dimen/size_btn"
|
||||
android:layout_height="@dimen/size_btn"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_remote_repeat_off_24" />
|
||||
|
||||
<android.widget.ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="@dimen/size_btn"
|
||||
android:layout_height="@dimen/size_btn"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev_24" />
|
||||
|
||||
<android.widget.ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
style="@style/Widget.Auxio.FloatingActionButton.AppWidget"
|
||||
android:layout_width="@dimen/size_btn"
|
||||
android:layout_height="@dimen/size_btn"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state_24" />
|
||||
|
||||
<android.widget.ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="@dimen/size_btn"
|
||||
android:layout_height="@dimen/size_btn"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:src="@drawable/ic_skip_next_24" />
|
||||
|
||||
<android.widget.ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_shuffle"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="@dimen/size_btn"
|
||||
android:layout_height="@dimen/size_btn"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_remote_shuffle_off_24" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user