merge branch 'master' into buffering-indicator

This commit is contained in:
dkanada 2021-03-06 16:25:18 +09:00
commit 87ce6b995b
17 changed files with 87 additions and 89 deletions

View file

@ -4,6 +4,7 @@ import android.content.Context;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
@ -28,7 +29,7 @@ public abstract class AbsPlayerFragment extends AbsMusicServiceFragment implemen
private Callbacks callbacks; private Callbacks callbacks;
@Override @Override
public void onAttach(Context context) { public void onAttach(@NonNull Context context) {
super.onAttach(context); super.onAttach(context);
try { try {
callbacks = (Callbacks) context; callbacks = (Callbacks) context;

View file

@ -50,6 +50,7 @@ public class PlayerAlbumCoverFragment extends AbsMusicServiceFragment implements
callbacks.onToolbarToggled(); callbacks.onToolbarToggled();
return true; return true;
} }
return super.onSingleTapConfirmed(e); return super.onSingleTapConfirmed(e);
} }
}); });
@ -122,8 +123,8 @@ public class PlayerAlbumCoverFragment extends AbsMusicServiceFragment implements
binding.playerFavoriteIcon.setScaleX(0f); binding.playerFavoriteIcon.setScaleX(0f);
binding.playerFavoriteIcon.setScaleY(0f); binding.playerFavoriteIcon.setScaleY(0f);
binding.playerFavoriteIcon.setVisibility(View.VISIBLE); binding.playerFavoriteIcon.setVisibility(View.VISIBLE);
binding.playerFavoriteIcon.setPivotX(binding.playerFavoriteIcon.getWidth() / 2); binding.playerFavoriteIcon.setPivotX(binding.playerFavoriteIcon.getWidth() / 2f);
binding.playerFavoriteIcon.setPivotY(binding.playerFavoriteIcon.getHeight() / 2); binding.playerFavoriteIcon.setPivotY(binding.playerFavoriteIcon.getHeight() / 2f);
binding.playerFavoriteIcon.animate() binding.playerFavoriteIcon.animate()
.setDuration(ViewUtil.PHONOGRAPH_ANIM_TIME / 2) .setDuration(ViewUtil.PHONOGRAPH_ANIM_TIME / 2)

View file

@ -51,7 +51,7 @@ public class CardPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} }
@Override @Override
public void onViewCreated(View view, Bundle savedInstanceState) { public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
setUpMusicControllers(); setUpMusicControllers();
updateProgressTextColor(); updateProgressTextColor();
@ -98,11 +98,11 @@ public class CardPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
public void setDark(boolean dark) { public void setDark(boolean dark) {
if (dark) { if (dark) {
lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true); lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(requireActivity(), true);
lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true); lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(requireActivity(), true);
} else { } else {
lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false); lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(requireActivity(), false);
lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false); lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(requireActivity(), false);
} }
updateRepeatState(); updateRepeatState();
@ -115,16 +115,14 @@ public class CardPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
final int fabColor = Color.WHITE; final int fabColor = Color.WHITE;
TintHelper.setTintAuto(binding.playerPlayPauseFab, fabColor, true); TintHelper.setTintAuto(binding.playerPlayPauseFab, fabColor, true);
playerFabPlayPauseDrawable = new PlayPauseDrawable(getActivity()); playerFabPlayPauseDrawable = new PlayPauseDrawable(requireActivity());
binding.playerPlayPauseFab.setImageDrawable(playerFabPlayPauseDrawable); // Note: set the drawable AFTER TintHelper.setTintAuto() was called binding.playerPlayPauseFab.setImageDrawable(playerFabPlayPauseDrawable); // Note: set the drawable AFTER TintHelper.setTintAuto() was called
binding.playerPlayPauseFab.setColorFilter(MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN); binding.playerPlayPauseFab.setColorFilter(MaterialValueHelper.getPrimaryTextColor(requireContext(), ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN);
binding.playerPlayPauseFab.setOnClickListener(new PlayPauseButtonOnClickHandler()); binding.playerPlayPauseFab.setOnClickListener(new PlayPauseButtonOnClickHandler());
binding.playerPlayPauseFab.post(() -> { binding.playerPlayPauseFab.post(() -> {
if (binding.playerPlayPauseFab != null) { binding.playerPlayPauseFab.setPivotX(binding.playerPlayPauseFab.getWidth() / 2f);
binding.playerPlayPauseFab.setPivotX(binding.playerPlayPauseFab.getWidth() / 2); binding.playerPlayPauseFab.setPivotY(binding.playerPlayPauseFab.getHeight() / 2f);
binding.playerPlayPauseFab.setPivotY(binding.playerPlayPauseFab.getHeight() / 2);
}
}); });
} }
@ -156,7 +154,7 @@ public class CardPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} }
private void updateProgressTextColor() { private void updateProgressTextColor() {
int color = MaterialValueHelper.getPrimaryTextColor(getContext(), false); int color = MaterialValueHelper.getPrimaryTextColor(requireContext(), false);
binding.playerSongTotalTime.setTextColor(color); binding.playerSongTotalTime.setTextColor(color);
binding.playerSongCurrentProgress.setTextColor(color); binding.playerSongCurrentProgress.setTextColor(color);
} }
@ -218,7 +216,7 @@ public class CardPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} }
private void setUpProgressSlider() { private void setUpProgressSlider() {
int color = MaterialValueHelper.getPrimaryTextColor(getContext(), false); int color = MaterialValueHelper.getPrimaryTextColor(requireContext(), false);
binding.playerProgressSlider.getThumb().mutate().setColorFilter(color, PorterDuff.Mode.SRC_IN); binding.playerProgressSlider.getThumb().mutate().setColorFilter(color, PorterDuff.Mode.SRC_IN);
binding.playerProgressSlider.getProgressDrawable().mutate().setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.SRC_IN); binding.playerProgressSlider.getProgressDrawable().mutate().setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.SRC_IN);

View file

@ -105,11 +105,11 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
public void setDark(boolean dark) { public void setDark(boolean dark) {
if (dark) { if (dark) {
lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true); lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(requireActivity(), true);
lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true); lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(requireActivity(), true);
} else { } else {
lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false); lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(requireActivity(), false);
lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false); lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(requireActivity(), false);
} }
updateRepeatState(); updateRepeatState();
@ -120,13 +120,13 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} }
private void setUpPlayPauseButton() { private void setUpPlayPauseButton() {
playPauseDrawable = new PlayPauseDrawable(getActivity()); playPauseDrawable = new PlayPauseDrawable(requireActivity());
binding.playerPlayPauseButton.setImageDrawable(playPauseDrawable); binding.playerPlayPauseButton.setImageDrawable(playPauseDrawable);
updatePlayPauseColor(); updatePlayPauseColor();
binding.playerPlayPauseButton.setOnClickListener(new PlayPauseButtonOnClickHandler()); binding.playerPlayPauseButton.setOnClickListener(new PlayPauseButtonOnClickHandler());
binding.playerPlayPauseButton.post(() -> { binding.playerPlayPauseButton.post(() -> {
binding.playerPlayPauseButton.setPivotX(binding.playerPlayPauseButton.getWidth() / 2); binding.playerPlayPauseButton.setPivotX(binding.playerPlayPauseButton.getWidth() / 2f);
binding.playerPlayPauseButton.setPivotY(binding.playerPlayPauseButton.getHeight() / 2); binding.playerPlayPauseButton.setPivotY(binding.playerPlayPauseButton.getHeight() / 2f);
}); });
} }
@ -153,7 +153,7 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} }
private void updateProgressTextColor() { private void updateProgressTextColor() {
int color = MaterialValueHelper.getPrimaryTextColor(getContext(), false); int color = MaterialValueHelper.getPrimaryTextColor(requireContext(), false);
binding.playerSongTotalTime.setTextColor(color); binding.playerSongTotalTime.setTextColor(color);
binding.playerSongCurrentProgress.setTextColor(color); binding.playerSongCurrentProgress.setTextColor(color);
} }
@ -222,6 +222,7 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} else { } else {
musicControllerAnimationSet.cancel(); musicControllerAnimationSet.cancel();
} }
musicControllerAnimationSet.start(); musicControllerAnimationSet.start();
} }
@ -264,7 +265,7 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
} }
private void setUpProgressSlider() { private void setUpProgressSlider() {
int color = MaterialValueHelper.getPrimaryTextColor(getContext(), false); int color = MaterialValueHelper.getPrimaryTextColor(requireContext(), false);
binding.playerProgressSlider.getThumb().mutate().setColorFilter(color, PorterDuff.Mode.SRC_IN); binding.playerProgressSlider.getThumb().mutate().setColorFilter(color, PorterDuff.Mode.SRC_IN);
binding.playerProgressSlider.getProgressDrawable().mutate().setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.SRC_IN); binding.playerProgressSlider.getProgressDrawable().mutate().setColorFilter(Color.TRANSPARENT, PorterDuff.Mode.SRC_IN);
@ -283,6 +284,7 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
public void onUpdateProgressViews(int progress, int total) { public void onUpdateProgressViews(int progress, int total) {
binding.playerProgressSlider.setMax(total); binding.playerProgressSlider.setMax(total);
binding.playerProgressSlider.setProgress(progress); binding.playerProgressSlider.setProgress(progress);
binding.playerSongTotalTime.setText(MusicUtil.getReadableDurationString(total)); binding.playerSongTotalTime.setText(MusicUtil.getReadableDurationString(total));
binding.playerSongCurrentProgress.setText(MusicUtil.getReadableDurationString(progress)); binding.playerSongCurrentProgress.setText(MusicUtil.getReadableDurationString(progress));
} }

View file

@ -21,9 +21,9 @@ import java.security.MessageDigest;
public class BlurTransformation extends BitmapTransformation { public class BlurTransformation extends BitmapTransformation {
public static final float DEFAULT_BLUR_RADIUS = 5f; public static final float DEFAULT_BLUR_RADIUS = 5f;
private Context context; private final Context context;
private float blurRadius; private final float blurRadius;
private int sampling; private final int sampling;
private BlurTransformation(Builder builder) { private BlurTransformation(Builder builder) {
super(); super();

View file

@ -52,7 +52,7 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/default_album_art" android:src="@drawable/default_album_art"
android:transitionName="@string/transition_album_image" android:transitionName="@string/transition_album_image"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -77,7 +77,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_person_white_24dp" app:srcCompat="@drawable/ic_person_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:ellipsize="end" android:ellipsize="end"
@ -105,7 +105,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_music_note_white_24dp" app:srcCompat="@drawable/ic_music_note_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/song_count_text" android:id="@+id/song_count_text"
@ -131,7 +131,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_timer_white_24dp" app:srcCompat="@drawable/ic_timer_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/duration_text" android:id="@+id/duration_text"
@ -157,7 +157,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_event_white_24dp" app:srcCompat="@drawable/ic_event_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/album_year_text" android:id="@+id/album_year_text"

View file

@ -53,7 +53,7 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/default_artist_image" android:src="@drawable/default_artist_image"
android:transitionName="@string/transition_artist_image" android:transitionName="@string/transition_artist_image"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -78,7 +78,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_album_white_24dp" app:srcCompat="@drawable/ic_album_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/album_count_text" android:id="@+id/album_count_text"
@ -104,7 +104,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_music_note_white_24dp" app:srcCompat="@drawable/ic_music_note_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/song_count_text" android:id="@+id/song_count_text"
@ -130,7 +130,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
app:srcCompat="@drawable/ic_timer_white_24dp" app:srcCompat="@drawable/ic_timer_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/duration_text" android:id="@+id/duration_text"

View file

@ -43,6 +43,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal" android:orientation="horizontal"
@ -54,7 +55,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_info_outline_white_24dp" app:srcCompat="@drawable/ic_info_outline_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -74,9 +75,8 @@
android:id="@+id/app_version" android:id="@+id/app_version"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="0.0.0"
android:textAppearance="@style/TextAppearance.AppCompat.Caption" android:textAppearance="@style/TextAppearance.AppCompat.Caption"
tools:ignore="HardcodedText" /> tools:text="1.0.0" />
</LinearLayout> </LinearLayout>
@ -88,6 +88,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal" android:orientation="horizontal"
@ -99,7 +100,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_github_circle_white_24dp" app:srcCompat="@drawable/ic_github_circle_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -31,6 +31,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal" android:orientation="horizontal"
@ -42,7 +43,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_person_white_24dp" app:srcCompat="@drawable/ic_person_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -75,6 +76,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:visibility="gone" android:visibility="gone"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
@ -87,7 +89,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_email_white_24dp" app:srcCompat="@drawable/ic_email_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -106,6 +108,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:visibility="gone" android:visibility="gone"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
@ -118,7 +121,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_twitter_white_24dp" app:srcCompat="@drawable/ic_twitter_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -137,6 +140,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal" android:orientation="horizontal"
@ -148,7 +152,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_open_in_browser_white_24dp" app:srcCompat="@drawable/ic_open_in_browser_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -32,6 +32,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal" android:orientation="horizontal"
@ -43,7 +44,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_bug_report_white_24dp" app:srcCompat="@drawable/ic_bug_report_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -75,6 +76,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:visibility="gone" android:visibility="gone"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
@ -87,7 +89,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_flag_white_24dp" app:srcCompat="@drawable/ic_flag_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -119,6 +121,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:visibility="gone" android:visibility="gone"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
@ -131,7 +134,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_star_white_24dp" app:srcCompat="@drawable/ic_star_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -163,6 +166,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/rectSelector" android:background="?attr/rectSelector"
android:clickable="true" android:clickable="true"
android:focusable="true"
android:visibility="gone" android:visibility="gone"
android:gravity="center_vertical" android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height" android:minHeight="@dimen/md_listitem_height"
@ -175,7 +179,7 @@
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
app:srcCompat="@drawable/ic_card_giftcard_white_24dp" app:srcCompat="@drawable/ic_card_giftcard_white_24dp"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical">
tools:ignore="NewApi,RtlSymmetry">
<TextView <TextView
android:id="@+id/file_path" android:id="@+id/file_path"

View file

@ -13,6 +13,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:srcCompat="@drawable/default_album_art" app:srcCompat="@drawable/default_album_art"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
</FrameLayout> </FrameLayout>

View file

@ -31,8 +31,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fontFamily="sans-serif-medium" android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end" android:gravity="center_vertical|start"
android:paddingLeft="8dp" android:paddingStart="8dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
@ -47,8 +47,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:fontFamily="sans-serif-medium" android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end" android:gravity="center_vertical|end"
android:paddingRight="8dp" android:paddingEnd="8dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
@ -72,7 +72,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/fab_media_controller_container_height" android:layout_height="@dimen/fab_media_controller_container_height"
android:layoutDirection="ltr" android:layoutDirection="ltr"
tools:ignore="ContentDescription,UnusedAttribute"> tools:ignore="ContentDescription">
<ImageButton <ImageButton
android:id="@+id/player_prev_button" android:id="@+id/player_prev_button"
@ -84,8 +84,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_skip_previous_white_24dp" app:srcCompat="@drawable/ic_skip_previous_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_next_button" android:id="@+id/player_next_button"
@ -97,8 +96,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_skip_next_white_24dp" app:srcCompat="@drawable/ic_skip_next_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_repeat_button" android:id="@+id/player_repeat_button"
@ -110,8 +108,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_repeat_white_24dp" app:srcCompat="@drawable/ic_repeat_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_shuffle_button" android:id="@+id/player_shuffle_button"
@ -123,8 +120,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_shuffle_white_24dp" app:srcCompat="@drawable/ic_shuffle_white_24dp" />
tools:ignore="MissingPrefix" />
<Space <Space
android:id="@+id/dummy_fab" android:id="@+id/dummy_fab"

View file

@ -18,13 +18,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:fontFamily="sans-serif-medium" android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end" android:gravity="center_vertical|start"
android:paddingLeft="8dp" android:paddingStart="8dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="@color/ate_primary_text_dark" android:textColor="@color/ate_primary_text_dark"
android:textSize="12sp" android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" tools:ignore="RtlSymmetry"
tools:text="0:00" /> tools:text="0:00" />
<TextView <TextView
@ -33,22 +33,21 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:fontFamily="sans-serif-medium" android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end" android:gravity="center_vertical|end"
android:paddingRight="8dp" android:paddingEnd="8dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="@color/ate_primary_text_dark" android:textColor="@color/ate_primary_text_dark"
android:textSize="12sp" android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" tools:ignore="RtlSymmetry"
tools:text="3:14" /> tools:text="4:00" />
<SeekBar <SeekBar
android:id="@+id/player_progress_slider" android:id="@+id/player_progress_slider"
style="@style/MusicProgressSlider" style="@style/MusicProgressSlider"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_toStartOf="@id/player_song_total_time" android:layout_toStartOf="@id/player_song_total_time"
android:layout_toEndOf="@id/player_song_current_progress" android:layout_toEndOf="@id/player_song_current_progress" />
tools:ignore="RtlHardcoded,UnusedAttribute" />
</RelativeLayout> </RelativeLayout>
@ -57,7 +56,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/media_controller_container_height" android:layout_height="@dimen/media_controller_container_height"
android:layoutDirection="ltr" android:layoutDirection="ltr"
tools:ignore="ContentDescription,UnusedAttribute"> tools:ignore="ContentDescription">
<ImageButton <ImageButton
android:id="@+id/player_prev_button" android:id="@+id/player_prev_button"
@ -69,8 +68,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_skip_previous_white_24dp" app:srcCompat="@drawable/ic_skip_previous_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_next_button" android:id="@+id/player_next_button"
@ -82,8 +80,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_skip_next_white_24dp" app:srcCompat="@drawable/ic_skip_next_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_repeat_button" android:id="@+id/player_repeat_button"
@ -95,8 +92,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_repeat_white_24dp" app:srcCompat="@drawable/ic_repeat_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_shuffle_button" android:id="@+id/player_shuffle_button"
@ -108,8 +104,7 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
app:srcCompat="@drawable/ic_shuffle_white_24dp" app:srcCompat="@drawable/ic_shuffle_white_24dp" />
tools:ignore="MissingPrefix" />
<ImageButton <ImageButton
android:id="@+id/player_play_pause__button" android:id="@+id/player_play_pause__button"
@ -119,7 +114,6 @@
android:background="?attr/roundSelector" android:background="?attr/roundSelector"
android:padding="22dp" android:padding="22dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
tools:ignore="MissingPrefix"
tools:src="@drawable/ic_pause_white_24dp" /> tools:src="@drawable/ic_pause_white_24dp" />
</RelativeLayout> </RelativeLayout>

View file

@ -12,7 +12,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
tools:ignore="UnusedAttribute,UselessParent"> tools:ignore="UselessParent">
<com.dkanada.gramophone.views.WidthFitSquareLayout <com.dkanada.gramophone.views.WidthFitSquareLayout
android:id="@+id/image_container" android:id="@+id/image_container"

View file

@ -17,7 +17,7 @@
android:layout_width="104dp" android:layout_width="104dp"
android:layout_height="104dp" android:layout_height="104dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:ignore="ContentDescription,UnusedAttribute" /> tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -21,8 +21,7 @@
<menu> <menu>
<group <group
android:id="@+id/group_grid_size" android:id="@+id/group_grid_size"
android:checkableBehavior="single" android:checkableBehavior="single">
tools:ignore="HardcodedText">
<item <item
android:id="@+id/action_grid_size_1" android:id="@+id/action_grid_size_1"
android:title="@string/grid_size_1" /> android:title="@string/grid_size_1" />