New Drawables and widget alpha

This commit is contained in:
Karim Abou Zeid 2015-03-10 17:22:35 +01:00
commit f3c629e1c6
27 changed files with 222 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

View file

@ -0,0 +1,69 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/app_widget_small_artwork_height"
android:background="#FFFFFF">
<ImageView
android:src="@drawable/default_album_art"
android:id="@+id/album_art"
android:layout_width="@dimen/app_widget_small_artwork_height"
android:layout_height="@dimen/app_widget_small_artwork_height"
android:scaleType="centerCrop"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:gravity="center"
android:id="@+id/song_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/Theme.MaterialMusic.Notification.Title"
android:layout_margin="4dp"
android:text="@string/nothing_playing"/>
<LinearLayout
android:id="@+id/media_actions"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
>
<ImageButton
android:layout_weight="1"
android:background="@drawable/notification_selector"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/button_prev"
android:src="@drawable/ic_skip_previous_black_36dp"
/>
<ImageButton
android:layout_weight="1"
android:background="@drawable/notification_selector"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/button_toggle_play_pause"
android:src="@drawable/ic_play_arrow_black_36dp"
/>
<ImageButton
android:layout_weight="1"
android:background="@drawable/notification_selector"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/button_next"
android:src="@drawable/ic_skip_next_black_36dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Refer to App Widget Documentation for margin information
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
-->
<dimen name="widget_margin">0dp</dimen>
</resources>

View file

@ -36,4 +36,11 @@
<dimen name="tab_height">48dp</dimen>
<dimen name="tagEditorHeaderVariableSpace">100dp</dimen>
<!--
Refer to App Widget Documentation for margin information
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
-->
<dimen name="widget_margin">8dp</dimen>
<dimen name="app_widget_small_artwork_height">64dp</dimen>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="180dp"
android:minHeight="40dp"
android:updatePeriodMillis="86400000"
android:previewImage="@drawable/example_appwidget_preview"
android:initialLayout="@layout/music_player_widget"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen|keyguard"
android:initialKeyguardLayout="@layout/music_player_widget">
</appwidget-provider>