fixed close notification problem
This commit is contained in:
parent
8aa5f87a1c
commit
7dadb2b26c
10 changed files with 240 additions and 52 deletions
BIN
app/src/main/res/drawable-hdpi/ic_close_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_close_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 221 B |
BIN
app/src/main/res/drawable-mdpi/ic_close_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_close_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 175 B |
BIN
app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 347 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 436 B |
66
app/src/main/res/layout/player_notification.xml
Normal file
66
app/src/main/res/layout/player_notification.xml
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/background_notification_color"
|
||||
tools:targetApi="jelly_bean">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backgroundCover"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:src="@drawable/dummy_thumbnail"
|
||||
android:scaleType="centerCrop"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backgroundSongName"
|
||||
style="@android:style/TextAppearance.StatusBar.EventContent.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backgroundArtist"
|
||||
style="@android:style/TextAppearance.StatusBar.EventContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="artist" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backgroundPlayPause"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:background="#00ffffff"
|
||||
android:clickable="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_play_arrow_white_48dp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backgroundStop"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="5dp"
|
||||
android:background="#00ffffff"
|
||||
android:clickable="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_close_white_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
80
app/src/main/res/layout/player_notification_expanded.xml
Normal file
80
app/src/main/res/layout/player_notification_expanded.xml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:background="@color/background_notification_color"
|
||||
tools:targetApi="jelly_bean" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backgroundCover"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:src="@drawable/dummy_thumbnail"
|
||||
android:scaleType="centerCrop"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_above="@+id/backgroundButtons"
|
||||
android:layout_toRightOf="@+id/backgroundCover"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backgroundSongName"
|
||||
style="@android:style/TextAppearance.StatusBar.EventContent.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="40dp"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backgroundArtist"
|
||||
style="@android:style/TextAppearance.StatusBar.EventContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:text="artist" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backgroundStop"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_margin="5dp"
|
||||
android:background="#00ffffff"
|
||||
android:clickable="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_close_white_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/backgroundButtons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignBottom="@id/backgroundCover"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_toRightOf="@+id/backgroundCover"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backgroundPlayPause"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#00ffffff"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_play_arrow_white_48dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -7,4 +7,5 @@
|
|||
<color name="durationText">#efff</color>
|
||||
<color name="dark_overlay">#6000</color>
|
||||
<color name="background_gray">#EEEEEE</color>
|
||||
<color name="background_notification_color">#323232</color>
|
||||
</resources>
|
||||
|
|
@ -53,6 +53,7 @@
|
|||
<string name="backgroundPlayerTickerText" translatable="false">%1$s - NewPipe</string>
|
||||
<string name="backgroundPlayerStartPlayingToast">Playing in background</string>
|
||||
<string name="c3sUrl" translatable="false">https://www.c3s.cc/</string>
|
||||
<string name="play">Play</string>
|
||||
|
||||
<!-- Content descriptions (for better accessibility) -->
|
||||
<string name="itemThumbnailViewDescription">Video preview thumbnail</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue