add an initial widget

This commit is contained in:
tibbi 2016-01-11 21:39:51 +01:00
parent 8b5221b685
commit a4e491e59a
30 changed files with 100 additions and 0 deletions

View file

@ -24,5 +24,13 @@
<service android:name="musicplayer.simplemobiletools.com.MusicService"/>
<receiver android:name=".MyAppWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info"/>
</receiver>
</application>
</manifest>

View file

@ -0,0 +1,7 @@
package musicplayer.simplemobiletools.com;
import android.appwidget.AppWidgetProvider;
public class MyAppWidgetProvider extends AppWidgetProvider {
}

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/black"
android:gravity="center_horizontal">
<TextView
android:id="@+id/songTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:layout_marginTop="@dimen/medium_padding"
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:textColor="@android:color/white"
android:textSize="18sp"/>
<TextView
android:id="@+id/songArtist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/songTitle"
android:layout_marginBottom="@dimen/medium_padding"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:textColor="@android:color/white"
android:textSize="16sp"/>
<LinearLayout
android:id="@+id/controls"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_below="@+id/songArtist"
android:orientation="horizontal">
<ImageView
android:id="@+id/previousBtn"
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:src="@mipmap/previous_white"/>
<ImageView
android:id="@+id/playPauseBtn"
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:src="@mipmap/play_white"/>
<ImageView
android:id="@+id/nextBtn"
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:src="@mipmap/next_white"/>
<ImageView
android:id="@+id/stopBtn"
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:src="@mipmap/stop_white"/>
</LinearLayout>
</RelativeLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

View file

@ -1,4 +1,5 @@
<resources>
<dimen name="activity_margin">16dp</dimen>
<dimen name="song_item_padding">8dp</dimen>
<dimen name="medium_padding">10dp</dimen>
</resources>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/widget"
android:minHeight="110dp"
android:minWidth="250dp">
</appwidget-provider>