Readd ic_close and ic_replay PNGs: needed in notifications
The other icons used in notifications are taken from exoplayer's ones: `@drawable/exo_controls_*`
@ -92,7 +92,8 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
|
||||
tabLayout = rootView.findViewById(R.id.main_tab_layout);
|
||||
viewPager = rootView.findViewById(R.id.pager);
|
||||
|
||||
tabLayout.setTabIconTint(ColorStateList.valueOf(ThemeHelper.resolveColorFromAttr(requireContext(), R.attr.colorAccent)));
|
||||
tabLayout.setTabIconTint(ColorStateList.valueOf(
|
||||
ThemeHelper.resolveColorFromAttr(requireContext(), R.attr.colorAccent)));
|
||||
tabLayout.setupWithViewPager(viewPager);
|
||||
tabLayout.addOnTabSelectedListener(this);
|
||||
|
||||
|
@ -201,9 +201,10 @@ public final class BackgroundPlayer extends Service {
|
||||
}
|
||||
|
||||
private NotificationCompat.Builder createNotification() {
|
||||
notRemoteView = new RemoteViews(BuildConfig.APPLICATION_ID, R.layout.player_notification);
|
||||
notRemoteView = new RemoteViews(BuildConfig.APPLICATION_ID,
|
||||
R.layout.player_background_notification);
|
||||
bigNotRemoteView = new RemoteViews(BuildConfig.APPLICATION_ID,
|
||||
R.layout.player_notification_expanded);
|
||||
R.layout.player_background_notification_expanded);
|
||||
|
||||
setupNotification(notRemoteView);
|
||||
setupNotification(bigNotRemoteView);
|
||||
@ -655,7 +656,7 @@ public final class BackgroundPlayer extends Service {
|
||||
super.onPlaying();
|
||||
resetNotification();
|
||||
updateNotificationThumbnail();
|
||||
updateNotification(R.drawable.ic_pause_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_pause);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -663,7 +664,7 @@ public final class BackgroundPlayer extends Service {
|
||||
super.onPaused();
|
||||
resetNotification();
|
||||
updateNotificationThumbnail();
|
||||
updateNotification(R.drawable.ic_play_arrow_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_play);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,6 +53,7 @@ import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import com.google.android.exoplayer2.C;
|
||||
@ -892,7 +893,7 @@ public final class PopupVideoPlayer extends Service {
|
||||
public void onBlocked() {
|
||||
super.onBlocked();
|
||||
resetNotification();
|
||||
updateNotification(R.drawable.ic_play_arrow_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_play);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -902,9 +903,10 @@ public final class PopupVideoPlayer extends Service {
|
||||
updateWindowFlags(ONGOING_PLAYBACK_WINDOW_FLAGS);
|
||||
|
||||
resetNotification();
|
||||
updateNotification(R.drawable.ic_pause_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_pause);
|
||||
|
||||
videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white_24dp);
|
||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
||||
R.drawable.ic_pause_white_24dp));
|
||||
hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME);
|
||||
|
||||
startForeground(NOTIFICATION_ID, notBuilder.build());
|
||||
@ -914,7 +916,7 @@ public final class PopupVideoPlayer extends Service {
|
||||
public void onBuffering() {
|
||||
super.onBuffering();
|
||||
resetNotification();
|
||||
updateNotification(R.drawable.ic_play_arrow_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_play);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -924,8 +926,9 @@ public final class PopupVideoPlayer extends Service {
|
||||
updateWindowFlags(IDLE_WINDOW_FLAGS);
|
||||
|
||||
resetNotification();
|
||||
updateNotification(R.drawable.ic_play_arrow_white_24dp);
|
||||
videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_play);
|
||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
||||
R.drawable.ic_play_arrow_white_24dp));
|
||||
|
||||
stopForeground(false);
|
||||
}
|
||||
@ -934,9 +937,10 @@ public final class PopupVideoPlayer extends Service {
|
||||
public void onPausedSeek() {
|
||||
super.onPausedSeek();
|
||||
resetNotification();
|
||||
updateNotification(R.drawable.ic_play_arrow_white_24dp);
|
||||
updateNotification(R.drawable.exo_controls_play);
|
||||
|
||||
videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white_24dp);
|
||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
||||
R.drawable.ic_pause_white_24dp));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -947,7 +951,8 @@ public final class PopupVideoPlayer extends Service {
|
||||
|
||||
resetNotification();
|
||||
updateNotification(R.drawable.ic_replay_white_24dp);
|
||||
videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white_24dp);
|
||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
||||
R.drawable.ic_replay_white_24dp));
|
||||
|
||||
stopForeground(false);
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_close_white_24dp.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
app/src/main/res/drawable-hdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 675 B |
BIN
app/src/main/res/drawable-mdpi/ic_close_white_24dp.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
app/src/main/res/drawable-mdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-xhdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 908 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png
Normal file
After Width: | Height: | Size: 347 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png
Normal file
After Width: | Height: | Size: 436 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_replay_white_24dp.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
@ -1,5 +0,0 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
</vector>
|
@ -1,5 +0,0 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,5V1L7,6l5,5V7c3.31,0 6,2.69 6,6s-2.69,6 -6,6 -6,-2.69 -6,-6H4c0,4.42 3.58,8 8,8s8,-3.58 8,-8 -3.58,-8 -8,-8z"/>
|
||||
</vector>
|
@ -59,7 +59,7 @@
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
android:src="@drawable/exo_controls_repeat_all"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
@ -81,7 +81,8 @@
|
||||
android:background="#00000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:srcCompat="@drawable/ic_pause_white_24dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/exo_controls_pause"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
@ -106,7 +107,7 @@
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_close_white_24dp"
|
||||
android:src="@drawable/ic_close_white_24dp"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
</LinearLayout>
|
||||
|
@ -29,7 +29,7 @@
|
||||
android:focusable="true"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_close_white_24dp"
|
||||
android:src="@drawable/ic_close_white_24dp"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitXY"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
android:src="@drawable/exo_controls_repeat_all"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
@ -144,7 +144,7 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_pause_white_24dp"
|
||||
android:src="@drawable/exo_controls_pause"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
@ -59,7 +59,7 @@
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_repeat_white_24dp"
|
||||
android:src="@drawable/exo_controls_repeat_all"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
@ -69,7 +69,8 @@
|
||||
android:background="#00000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:srcCompat="@drawable/ic_pause_white_24dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/exo_controls_pause"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<ImageButton
|
||||
@ -82,6 +83,6 @@
|
||||
android:focusable="true"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_close_white_24dp"
|
||||
android:src="@drawable/ic_close_white_24dp"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
</LinearLayout>
|