code refactor

This commit is contained in:
h4h13 2018-08-01 12:21:27 +05:30
parent 918cfc177b
commit efe607816f
68 changed files with 2236 additions and 2316 deletions

View file

@ -191,7 +191,6 @@
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" /> <orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/juniversalchardet-1.0.3.jar:unspecified@jar" level="project" /> <orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/juniversalchardet-1.0.3.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:transition-27.1.1" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:transition-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/hemanths/Desktop/KeepSafe/RetroMusicPlayer/app/libs/jsoup-1.11.2.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.jakewharton:butterknife-8.8.1" level="project" /> <orderEntry type="library" name="Gradle: com.jakewharton:butterknife-8.8.1" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:logging-interceptor:3.10.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.squareup.okhttp3:logging-interceptor:3.10.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
@ -206,9 +205,7 @@
<orderEntry type="library" name="Gradle: me.zhanghai.android.materialprogressbar:library-1.4.2" level="project" /> <orderEntry type="library" name="Gradle: me.zhanghai.android.materialprogressbar:library-1.4.2" level="project" />
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:glide:3.8.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.github.bumptech.glide:glide:3.8.0@jar" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-runtime:1.0.6@jar" level="project" /> <orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-runtime:1.0.6@jar" level="project" />
<orderEntry type="library" name="Gradle: com.mpatric:mp3agic:0.8.3@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: jp.wasabeef:glide-transformations-2.0.2" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.afollestad.material-dialogs:commons-0.9.6.0" level="project" /> <orderEntry type="library" name="Gradle: com.afollestad.material-dialogs:commons-0.9.6.0" level="project" />
<orderEntry type="library" name="Gradle: io.reactivex.rxjava2:rxandroid-2.0.2" level="project" /> <orderEntry type="library" name="Gradle: io.reactivex.rxjava2:rxandroid-2.0.2" level="project" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View file

@ -108,7 +108,7 @@ public class AlbumDetailsActivity extends AbsSlidingMusicPanelActivity implement
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ButterKnife.bind(this); ButterKnife.bind(this);

View file

@ -118,7 +118,7 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
@Override @Override
protected void onCreate(Bundle bundle) { protected void onCreate(Bundle bundle) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(bundle); super.onCreate(bundle);
ButterKnife.bind(this); ButterKnife.bind(this);

View file

@ -88,7 +88,7 @@ public class GenreDetailsActivity extends AbsSlidingMusicPanelActivity implement
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ButterKnife.bind(this); ButterKnife.bind(this);

View file

@ -30,7 +30,7 @@ public class LockScreenActivity extends AbsMusicServiceActivity {
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
setContentView(R.layout.activity_lock_screen_old_style); setContentView(R.layout.activity_lock_screen_old_style);
hideStatusBar(); hideStatusBar();

View file

@ -88,7 +88,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity implements
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ButterKnife.bind(this); ButterKnife.bind(this);

View file

@ -87,7 +87,7 @@ public class PlaylistDetailActivity extends AbsSlidingMusicPanelActivity impleme
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ButterKnife.bind(this); ButterKnife.bind(this);

View file

@ -53,7 +53,7 @@ public class ProVersionActivity extends AbsBaseActivity implements
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pro_version); setContentView(R.layout.activity_pro_version);
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
ButterKnife.bind(this); ButterKnife.bind(this);
RetroUtil.statusBarHeight(statusBar); RetroUtil.statusBarHeight(statusBar);
setStatusbarColorAuto(); setStatusbarColorAuto();

View file

@ -68,7 +68,7 @@ public class SearchActivity extends AbsMusicServiceActivity implements OnQueryTe
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_search); setContentView(R.layout.activity_search);

View file

@ -12,7 +12,7 @@ public class UserInfoActivity extends AbsBaseActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setDrawUnderStatusbar(true); setDrawUnderStatusBar(true);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_info); setContentView(R.layout.activity_user_info);

View file

@ -1,21 +1,22 @@
package code.name.monkey.retromusic.ui.activities.base; package code.name.monkey.retromusic.ui.activities.base;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.support.annotation.ColorInt; import android.support.annotation.ColorInt;
import android.support.v4.content.ContextCompat;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import code.name.monkey.appthemehelper.ATH; import code.name.monkey.appthemehelper.ATH;
import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.ThemeStore;
import code.name.monkey.appthemehelper.common.ATHToolbarActivity; import code.name.monkey.appthemehelper.common.ATHToolbarActivity;
import code.name.monkey.appthemehelper.util.ATHUtil; import code.name.monkey.appthemehelper.util.ATHUtil;
import code.name.monkey.appthemehelper.util.ColorUtil; import code.name.monkey.appthemehelper.util.ColorUtil;
import code.name.monkey.appthemehelper.util.MaterialDialogsUtil; import code.name.monkey.appthemehelper.util.MaterialDialogsUtil;
import code.name.monkey.appthemehelper.util.TintHelper;
import code.name.monkey.appthemehelper.util.VersionUtils; import code.name.monkey.appthemehelper.util.VersionUtils;
import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.util.PreferenceUtil; import code.name.monkey.retromusic.util.PreferenceUtil;
@ -23,191 +24,190 @@ import code.name.monkey.retromusic.util.RetroUtil;
public abstract class AbsThemeActivity extends ATHToolbarActivity implements Runnable { public abstract class AbsThemeActivity extends ATHToolbarActivity implements Runnable {
private Handler handler = new Handler(); private Handler handler = new Handler();
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setTheme(PreferenceUtil.getInstance(this).getGeneralTheme()); setTheme(PreferenceUtil.getInstance(this).getGeneralTheme());
hideStatusBar(); hideStatusBar();
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
MaterialDialogsUtil.updateMaterialDialogsThemeSingleton(this); MaterialDialogsUtil.updateMaterialDialogsThemeSingleton(this);
changeBackgroundShape(); changeBackgroundShape();
setImmersiveFullscreen(); setImmersiveFullscreen();
registerSystemUiVisibility(); registerSystemUiVisibility();
toggleScreenOn(); toggleScreenOn();
}
private void toggleScreenOn() {
if (PreferenceUtil.getInstance(this).isScreenOnEnabled()) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
} }
}
private void toggleScreenOn() { @Override
if (PreferenceUtil.getInstance(this).isScreenOnEnabled()) { public void onWindowFocusChanged(boolean hasFocus) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); super.onWindowFocusChanged(hasFocus);
} else { if (hasFocus) {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); hideStatusBar();
} handler.removeCallbacks(this);
handler.postDelayed(this, 300);
} else {
handler.removeCallbacks(this);
} }
}
@Override public void hideStatusBar() {
public void onWindowFocusChanged(boolean hasFocus) { hideStatusBar(PreferenceUtil.getInstance(this).getFullScreenMode());
super.onWindowFocusChanged(hasFocus); }
if (hasFocus) {
hideStatusBar(); private void hideStatusBar(boolean fullscreen) {
handler.removeCallbacks(this); final View statusBar = getWindow().getDecorView().getRootView().findViewById(R.id.status_bar);
handler.postDelayed(this, 300); if (statusBar != null) {
} else { statusBar.setVisibility(fullscreen ? View.GONE : View.VISIBLE);
handler.removeCallbacks(this);
}
} }
}
public void hideStatusBar() {
hideStatusBar(PreferenceUtil.getInstance(this).getFullScreenMode()); private void changeBackgroundShape() {
Drawable background = PreferenceUtil.getInstance(this).isRoundCorners() ?
ContextCompat.getDrawable(this, R.drawable.round_window)
: ContextCompat.getDrawable(this, R.drawable.square_window);
background = TintHelper.createTintedDrawable(background, ThemeStore.primaryColor(this));
getWindow().setBackgroundDrawable(background);
//View decor = getWindow().getDecorView();
//GradientDrawable gradientDrawable = (GradientDrawable) decor.getBackground();
//gradientDrawable.setColor(ThemeStore.primaryColor(this));
}
protected void setDrawUnderStatusBar(boolean drawUnderStatusbar) {
if (VersionUtils.hasLollipop()) {
RetroUtil.setAllowDrawUnderStatusBar(getWindow());
} else if (VersionUtils.hasKitKat()) {
RetroUtil.setStatusBarTranslucent(getWindow());
} }
}
private void hideStatusBar(boolean fullscreen) { /**
final View statusBar = getWindow().getDecorView().getRootView().findViewById(R.id.status_bar); * This will set the color of the view with the id "status_bar" on KitKat and Lollipop. On
if (statusBar != null) { * Lollipop if no such view is found it will set the statusbar color using the native method.
statusBar.setVisibility(fullscreen ? View.GONE : View.VISIBLE); *
} * @param color the new statusbar color (will be shifted down on Lollipop and above)
} */
public void setStatusbarColor(int color) {
if (VersionUtils.hasKitKat()) {
private void changeBackgroundShape() { final View statusBar = getWindow().getDecorView().getRootView().findViewById(R.id.status_bar);
if (PreferenceUtil.getInstance(this).isRoundCorners()) { if (statusBar != null) {
getWindow().setBackgroundDrawableResource(R.drawable.round_window);
} else {
getWindow().setBackgroundDrawableResource(R.drawable.square_window);
}
View decor = getWindow().getDecorView();
GradientDrawable gradientDrawable = (GradientDrawable) decor.getBackground();
gradientDrawable.setColor(ThemeStore.primaryColor(this));
}
protected void setDrawUnderStatusbar(boolean drawUnderStatusbar) {
if (VersionUtils.hasLollipop()) { if (VersionUtils.hasLollipop()) {
RetroUtil.setAllowDrawUnderStatusBar(getWindow()); statusBar.setBackgroundColor(ColorUtil.darkenColor(color));
} else if (VersionUtils.hasKitKat()) { setLightStatusbarAuto(color);
RetroUtil.setStatusBarTranslucent(getWindow());
}
}
/**
* This will set the color of the view with the id "status_bar" on KitKat and Lollipop. On
* Lollipop if no such view is found it will set the statusbar color using the native method.
*
* @param color the new statusbar color (will be shifted down on Lollipop and above)
*/
public void setStatusbarColor(int color) {
if (VersionUtils.hasKitKat()) {
final View statusBar = getWindow().getDecorView().getRootView().findViewById(R.id.status_bar);
if (statusBar != null) {
if (VersionUtils.hasLollipop()) {
statusBar.setBackgroundColor(ColorUtil.darkenColor(color));
setLightStatusbarAuto(color);
} else {
statusBar.setBackgroundColor(color);
}
} else if (Build.VERSION.SDK_INT >= 21) {
getWindow().setStatusBarColor(ColorUtil.darkenColor(color));
setLightStatusbarAuto(color);
}
}
}
public void setStatusbarColorAuto() {
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
setStatusbarColor(ThemeStore.primaryColor(this));
}
public void setTaskDescriptionColor(@ColorInt int color) {
ATH.setTaskDescriptionColor(this, color);
}
public void setTaskDescriptionColorAuto() {
setTaskDescriptionColor(ThemeStore.primaryColor(this));
}
public void setNavigationbarColor(int color) {
if (ThemeStore.coloredNavigationBar(this)) {
ATH.setNavigationbarColor(this, color);
} else { } else {
ATH.setNavigationbarColor(this, Color.BLACK); statusBar.setBackgroundColor(color);
} }
} else if (Build.VERSION.SDK_INT >= 21) {
getWindow().setStatusBarColor(ColorUtil.darkenColor(color));
setLightStatusbarAuto(color);
}
} }
}
public void setNavigationbarColorAuto() { public void setStatusbarColorAuto() {
setNavigationbarColor(ThemeStore.navigationBarColor(this)); // we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
setStatusbarColor(ThemeStore.primaryColor(this));
}
public void setTaskDescriptionColor(@ColorInt int color) {
ATH.setTaskDescriptionColor(this, color);
}
public void setTaskDescriptionColorAuto() {
setTaskDescriptionColor(ThemeStore.primaryColor(this));
}
public void setNavigationbarColor(int color) {
if (ThemeStore.coloredNavigationBar(this)) {
ATH.setNavigationbarColor(this, color);
} else {
ATH.setNavigationbarColor(this, Color.BLACK);
} }
}
public void setLightStatusbar(boolean enabled) { public void setNavigationbarColorAuto() {
ATH.setLightStatusbar(this, enabled); setNavigationbarColor(ThemeStore.navigationBarColor(this));
}
public void setLightStatusbar(boolean enabled) {
ATH.setLightStatusbar(this, enabled);
}
public void setLightStatusbarAuto(int bgColor) {
setLightStatusbar(ColorUtil.isColorLight(bgColor));
}
public void setLightNavigationBar(boolean enabled) {
if (!ATHUtil.isWindowBackgroundDark(this) && ThemeStore.coloredNavigationBar(this)) {
ATH.setLightNavigationbar(this, enabled);
} }
}
public void setLightStatusbarAuto(int bgColor) { private void registerSystemUiVisibility() {
setLightStatusbar(ColorUtil.isColorLight(bgColor)); final View decorView = getWindow().getDecorView();
} decorView.setOnSystemUiVisibilityChangeListener(visibility -> {
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
public void setLightNavigationBar(boolean enabled) {
if (!ATHUtil.isWindowBackgroundDark(this) && ThemeStore.coloredNavigationBar(this)) {
ATH.setLightNavigationbar(this, enabled);
}
}
private void registerSystemUiVisibility() {
final View decorView = getWindow().getDecorView();
decorView.setOnSystemUiVisibilityChangeListener(visibility -> {
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
setImmersiveFullscreen();
}
});
}
private void unregisterSystemUiVisibility() {
final View decorView = getWindow().getDecorView();
decorView.setOnSystemUiVisibilityChangeListener(null);
}
public void setImmersiveFullscreen() {
int flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
if (PreferenceUtil.getInstance(this).getFullScreenMode()) {
getWindow().getDecorView().setSystemUiVisibility(flags);
}
}
public void exitFullscreen() {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
}
@Override
public void run() {
setImmersiveFullscreen(); setImmersiveFullscreen();
}
});
}
private void unregisterSystemUiVisibility() {
final View decorView = getWindow().getDecorView();
decorView.setOnSystemUiVisibilityChangeListener(null);
}
public void setImmersiveFullscreen() {
int flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
if (PreferenceUtil.getInstance(this).getFullScreenMode()) {
getWindow().getDecorView().setSystemUiVisibility(flags);
} }
}
@Override public void exitFullscreen() {
protected void onStop() { getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
handler.removeCallbacks(this); }
super.onStop();
@Override
public void run() {
setImmersiveFullscreen();
}
@Override
protected void onStop() {
handler.removeCallbacks(this);
super.onStop();
}
@Override
public void onDestroy() {
super.onDestroy();
unregisterSystemUiVisibility();
exitFullscreen();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
handler.removeCallbacks(this);
handler.postDelayed(this, 500);
} }
return super.onKeyDown(keyCode, event);
@Override }
public void onDestroy() {
super.onDestroy();
unregisterSystemUiVisibility();
exitFullscreen();
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP)) {
handler.removeCallbacks(this);
handler.postDelayed(this, 500);
}
return super.onKeyDown(keyCode, event);
}
} }

View file

@ -16,7 +16,6 @@ import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator; import android.view.animation.DecelerateInterpolator;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.Unbinder; import butterknife.Unbinder;
@ -31,146 +30,147 @@ import code.name.monkey.retromusic.views.PlayPauseDrawable;
import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import me.zhanghai.android.materialprogressbar.MaterialProgressBar;
public class MiniPlayerFragment extends AbsMusicServiceFragment implements public class MiniPlayerFragment extends AbsMusicServiceFragment implements
MusicProgressViewUpdateHelper.Callback { MusicProgressViewUpdateHelper.Callback {
@BindView(R.id.mini_player_title) @BindView(R.id.mini_player_title)
TextView miniPlayerTitle; TextView miniPlayerTitle;
@BindView(R.id.mini_player_play_pause_button) @BindView(R.id.mini_player_play_pause_button)
ImageView miniPlayerPlayPauseButton; ImageView miniPlayerPlayPauseButton;
@BindView(R.id.progress_bar) @BindView(R.id.progress_bar)
MaterialProgressBar progressBar; MaterialProgressBar progressBar;
private Unbinder unbinder; private Unbinder unbinder;
private PlayPauseDrawable miniPlayerPlayPauseDrawable; private PlayPauseDrawable miniPlayerPlayPauseDrawable;
private MusicProgressViewUpdateHelper progressViewUpdateHelper; private MusicProgressViewUpdateHelper progressViewUpdateHelper;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
progressViewUpdateHelper = new MusicProgressViewUpdateHelper(this);
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.fragment_mini_player, container, false);
unbinder = ButterKnife.bind(this, layout);
return layout;
}
@Override
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
//noinspection ConstantConditions
view.setBackgroundColor(ThemeStore.primaryColor(getContext()));
view.setOnTouchListener(new FlingPlayBackController(getActivity()));
setUpMiniPlayer();
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
@SuppressWarnings({"ConstantConditions"})
private void setUpMiniPlayer() {
setUpPlayPauseButton();
progressBar.setProgressTintList(ColorStateList.valueOf(ThemeStore.accentColor(getActivity())));
}
private void setUpPlayPauseButton() {
//noinspection ConstantConditions
miniPlayerPlayPauseDrawable = new PlayPauseDrawable(getActivity());
miniPlayerPlayPauseButton.setImageDrawable(miniPlayerPlayPauseDrawable);
miniPlayerPlayPauseButton.setColorFilter(ATHUtil.resolveColor(getActivity(),
R.attr.iconColor,
ThemeStore.textColorSecondary(getActivity())), PorterDuff.Mode.SRC_IN);
miniPlayerPlayPauseButton.setOnClickListener(new PlayPauseButtonOnClickHandler());
}
private void updateSongTitle() {
miniPlayerTitle.setText(MusicPlayerRemote.getCurrentSong().title);
}
@Override
public void onServiceConnected() {
updateSongTitle();
updatePlayPauseDrawableState(false);
}
@Override
public void onPlayingMetaChanged() {
updateSongTitle();
}
@Override
public void onPlayStateChanged() {
updatePlayPauseDrawableState(true);
}
@Override
public void onUpdateProgressViews(int progress, int total) {
progressBar.setMax(total);
ObjectAnimator animator = ObjectAnimator.ofInt(progressBar, "progress", progress);
animator.setDuration(1000);
animator.setInterpolator(new DecelerateInterpolator());
animator.start();
}
@Override
public void onResume() {
super.onResume();
progressViewUpdateHelper.start();
}
@Override
public void onPause() {
super.onPause();
progressViewUpdateHelper.stop();
}
protected void updatePlayPauseDrawableState(boolean animate) {
if (MusicPlayerRemote.isPlaying()) {
miniPlayerPlayPauseDrawable.setPause(animate);
} else {
miniPlayerPlayPauseDrawable.setPlay(animate);
}
}
public void setColor(int playerFragmentColor) {
//noinspection ConstantConditions
getView().setBackgroundColor(playerFragmentColor);
}
public static class FlingPlayBackController implements View.OnTouchListener {
GestureDetector flingPlayBackController;
public FlingPlayBackController(Context context) {
flingPlayBackController = new GestureDetector(context,
new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
if (Math.abs(velocityX) > Math.abs(velocityY)) {
if (velocityX < 0) {
MusicPlayerRemote.playNextSong();
return true;
} else if (velocityX > 0) {
MusicPlayerRemote.playPreviousSong();
return true;
}
}
return false;
}
});
}
@SuppressLint("ClickableViewAccessibility")
@Override @Override
public void onCreate(@Nullable Bundle savedInstanceState) { public boolean onTouch(View v, MotionEvent event) {
super.onCreate(savedInstanceState); return flingPlayBackController.onTouchEvent(event);
progressViewUpdateHelper = new MusicProgressViewUpdateHelper(this);
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.fragment_mini_player, container, false);
unbinder = ButterKnife.bind(this, layout);
return layout;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
view.setBackgroundColor(ThemeStore.primaryColor(getContext()));
view.setOnTouchListener(new FlingPlayBackController(getActivity()));
setUpMiniPlayer();
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
@SuppressWarnings({"ConstantConditions"})
private void setUpMiniPlayer() {
setUpPlayPauseButton();
progressBar.setProgressTintList(ColorStateList.valueOf(ThemeStore.accentColor(getActivity())));
}
private void setUpPlayPauseButton() {
//noinspection ConstantConditions
miniPlayerPlayPauseDrawable = new PlayPauseDrawable(getActivity());
miniPlayerPlayPauseButton.setImageDrawable(miniPlayerPlayPauseDrawable);
miniPlayerPlayPauseButton.setColorFilter(ATHUtil.resolveColor(getActivity(),
R.attr.iconColor,
ThemeStore.textColorSecondary(getActivity())), PorterDuff.Mode.SRC_IN);
miniPlayerPlayPauseButton.setOnClickListener(new PlayPauseButtonOnClickHandler());
}
private void updateSongTitle() {
miniPlayerTitle.setText(MusicPlayerRemote.getCurrentSong().title);
}
@Override
public void onServiceConnected() {
updateSongTitle();
updatePlayPauseDrawableState(false);
}
@Override
public void onPlayingMetaChanged() {
updateSongTitle();
}
@Override
public void onPlayStateChanged() {
updatePlayPauseDrawableState(true);
}
@Override
public void onUpdateProgressViews(int progress, int total) {
progressBar.setMax(total);
ObjectAnimator animator = ObjectAnimator.ofInt(progressBar, "progress", progress);
animator.setDuration(1000);
animator.setInterpolator(new DecelerateInterpolator());
animator.start();
}
@Override
public void onResume() {
super.onResume();
progressViewUpdateHelper.start();
}
@Override
public void onPause() {
super.onPause();
progressViewUpdateHelper.stop();
}
protected void updatePlayPauseDrawableState(boolean animate) {
if (MusicPlayerRemote.isPlaying()) {
miniPlayerPlayPauseDrawable.setPause(animate);
} else {
miniPlayerPlayPauseDrawable.setPlay(animate);
}
}
public void setColor(int playerFragmentColor) {
//noinspection ConstantConditions
getView().setBackgroundColor(playerFragmentColor);
}
public static class FlingPlayBackController implements View.OnTouchListener {
GestureDetector flingPlayBackController;
public FlingPlayBackController(Context context) {
flingPlayBackController = new GestureDetector(context,
new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
if (Math.abs(velocityX) > Math.abs(velocityY)) {
if (velocityX < 0) {
MusicPlayerRemote.playNextSong();
return true;
} else if (velocityX > 0) {
MusicPlayerRemote.playPreviousSong();
return true;
}
}
return false;
}
});
}
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View v, MotionEvent event) {
return flingPlayBackController.onTouchEvent(event);
}
} }
}
} }

View file

@ -22,6 +22,7 @@ import butterknife.Unbinder;
import code.name.monkey.appthemehelper.util.ColorUtil; import code.name.monkey.appthemehelper.util.ColorUtil;
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper; import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.glide.BlurTransformation;
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget; import code.name.monkey.retromusic.glide.RetroMusicColoredTarget;
import code.name.monkey.retromusic.glide.SongGlideRequest; import code.name.monkey.retromusic.glide.SongGlideRequest;
import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.helper.MusicPlayerRemote;
@ -35,7 +36,6 @@ import com.h6ah4i.android.widget.advrecyclerview.animator.GeneralItemAnimator;
import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator; import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator;
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager; import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager;
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils; import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils;
import jp.wasabeef.glide.transformations.BlurTransformation;
/** /**
* @author Hemanth S (h4h13). * @author Hemanth S (h4h13).
@ -207,7 +207,7 @@ public class BlurPlayerFragment extends AbsPlayerFragment implements
} }
int blurAmount = PreferenceManager.getDefaultSharedPreferences(getContext()) int blurAmount = PreferenceManager.getDefaultSharedPreferences(getContext())
.getInt("blur_amount", 25); .getInt("new_blur_amount", 25);
colorBackground.clearColorFilter(); colorBackground.clearColorFilter();
@ -216,7 +216,7 @@ public class BlurPlayerFragment extends AbsPlayerFragment implements
.generatePalette(activity) .generatePalette(activity)
.build() .build()
.override(320, 480) .override(320, 480)
.transform(new BlurTransformation(getActivity(), blurAmount)) .transform(new BlurTransformation.Builder(getActivity()).blurRadius(blurAmount).build())
.into(new RetroMusicColoredTarget(colorBackground) { .into(new RetroMusicColoredTarget(colorBackground) {
@Override @Override
public void onColorReady(int color) { public void onColorReady(int color) {

View file

@ -9,19 +9,15 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.Unbinder; import butterknife.Unbinder;
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper; import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.glide.BlurTransformation;
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget; import code.name.monkey.retromusic.glide.RetroMusicColoredTarget;
import code.name.monkey.retromusic.glide.SongGlideRequest; import code.name.monkey.retromusic.glide.SongGlideRequest;
import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.helper.MusicPlayerRemote;
@ -29,164 +25,167 @@ import code.name.monkey.retromusic.model.Song;
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment; import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment;
import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment; import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment;
import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment; import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment;
import jp.wasabeef.glide.transformations.BlurTransformation; import com.bumptech.glide.Glide;
public class CardBlurFragment extends AbsPlayerFragment implements PlayerAlbumCoverFragment.Callbacks { public class CardBlurFragment extends AbsPlayerFragment implements
@BindView(R.id.player_toolbar) PlayerAlbumCoverFragment.Callbacks {
Toolbar toolbar;
@BindView(R.id.status_bar)
View statusBar;
@BindView(R.id.gradient_background)
ImageView colorBackground;
private int lastColor; @BindView(R.id.player_toolbar)
private CardBlurPlaybackControlsFragment playbackControlsFragment; Toolbar toolbar;
private Unbinder unbinder; @BindView(R.id.status_bar)
View statusBar;
@BindView(R.id.gradient_background)
ImageView colorBackground;
public static PlayerFragment newInstance() { private int lastColor;
Bundle args = new Bundle(); private CardBlurPlaybackControlsFragment playbackControlsFragment;
PlayerFragment fragment = new PlayerFragment(); private Unbinder unbinder;
fragment.setArguments(args);
return fragment; public static PlayerFragment newInstance() {
Bundle args = new Bundle();
PlayerFragment fragment = new PlayerFragment();
fragment.setArguments(args);
return fragment;
}
@Override
@ColorInt
public int getPaletteColor() {
return lastColor;
}
@Override
public void onShow() {
playbackControlsFragment.show();
}
@Override
public void onHide() {
playbackControlsFragment.hide();
onBackPressed();
}
@Override
public void onResume() {
super.onResume();
}
@Override
public boolean onBackPressed() {
return false;
}
@Override
public Toolbar getToolbar() {
return toolbar;
}
@Override
public int toolbarIconColor() {
return Color.WHITE;
}
@Override
public void onColorChanged(int color) {
playbackControlsFragment.setDark(color);
lastColor = color;
getCallbacks().onPaletteColorChanged();
ToolbarContentTintHelper.colorizeToolbar(toolbar, Color.WHITE, getActivity());
}
@Override
protected void toggleFavorite(Song song) {
super.toggleFavorite(song);
if (song.id == MusicPlayerRemote.getCurrentSong().id) {
updateIsFavorite();
} }
}
@Override @Override
@ColorInt public void onFavoriteToggled() {
public int getPaletteColor() { toggleFavorite(MusicPlayerRemote.getCurrentSong());
return lastColor; }
}
@Override @Override
public void onShow() { public void onDestroyView() {
playbackControlsFragment.show(); super.onDestroyView();
} unbinder.unbind();
}
@Override @Nullable
public void onHide() { @Override
playbackControlsFragment.hide(); public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
onBackPressed(); @Nullable Bundle savedInstanceState) {
} View view = inflater.inflate(R.layout.fragment_card_blur_player, container, false);
unbinder = ButterKnife.bind(this, view);
return view;
}
@Override @Override
public void onResume() { public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onResume(); super.onViewCreated(view, savedInstanceState);
} toggleStatusBar(statusBar);
@Override setUpSubFragments();
public boolean onBackPressed() { setUpPlayerToolbar();
return false; }
}
@Override private void setUpSubFragments() {
public Toolbar getToolbar() { playbackControlsFragment = (CardBlurPlaybackControlsFragment) getChildFragmentManager()
return toolbar; .findFragmentById(R.id.playback_controls_fragment);
}
@Override PlayerAlbumCoverFragment playerAlbumCoverFragment =
public int toolbarIconColor() { (PlayerAlbumCoverFragment) getChildFragmentManager()
return Color.WHITE; .findFragmentById(R.id.player_album_cover_fragment);
} playerAlbumCoverFragment.setCallbacks(this);
playerAlbumCoverFragment.removeEffect();
}
@Override private void setUpPlayerToolbar() {
public void onColorChanged(int color) { toolbar.inflateMenu(R.menu.menu_player);
playbackControlsFragment.setDark(color); toolbar.setNavigationOnClickListener(v -> getActivity().onBackPressed());
lastColor = color; toolbar.setOnMenuItemClickListener(this);
getCallbacks().onPaletteColorChanged();
ToolbarContentTintHelper.colorizeToolbar(toolbar, Color.WHITE, getActivity());
}
@Override
protected void toggleFavorite(Song song) {
super.toggleFavorite(song);
if (song.id == MusicPlayerRemote.getCurrentSong().id) {
updateIsFavorite();
}
}
@Override
public void onFavoriteToggled() {
toggleFavorite(MusicPlayerRemote.getCurrentSong());
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_card_blur_player, container, false);
unbinder = ButterKnife.bind(this, view);
return view;
}
@Override
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
toggleStatusBar(statusBar);
setUpSubFragments();
setUpPlayerToolbar();
}
private void setUpSubFragments() {
playbackControlsFragment = (CardBlurPlaybackControlsFragment) getChildFragmentManager()
.findFragmentById(R.id.playback_controls_fragment);
PlayerAlbumCoverFragment playerAlbumCoverFragment =
(PlayerAlbumCoverFragment) getChildFragmentManager()
.findFragmentById(R.id.player_album_cover_fragment);
playerAlbumCoverFragment.setCallbacks(this);
playerAlbumCoverFragment.removeEffect();
}
private void setUpPlayerToolbar() {
toolbar.inflateMenu(R.menu.menu_player);
toolbar.setNavigationOnClickListener(v -> getActivity().onBackPressed());
toolbar.setOnMenuItemClickListener(this);
/* for (int i = 0; i < toolbar.getMenu().size(); i++) { /* for (int i = 0; i < toolbar.getMenu().size(); i++) {
MenuItem menuItem = toolbar.getMenu().getItem(i); MenuItem menuItem = toolbar.getMenu().getItem(i);
menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
}*/ }*/
ToolbarContentTintHelper.colorizeToolbar(toolbar, Color.WHITE, getActivity()); ToolbarContentTintHelper.colorizeToolbar(toolbar, Color.WHITE, getActivity());
} }
@Override @Override
public void onServiceConnected() { public void onServiceConnected() {
updateIsFavorite(); updateIsFavorite();
updateBlur(); updateBlur();
} }
@Override @Override
public void onPlayingMetaChanged() { public void onPlayingMetaChanged() {
updateIsFavorite(); updateIsFavorite();
updateBlur(); updateBlur();
} }
private void updateBlur() { private void updateBlur() {
Activity activity = getActivity(); Activity activity = getActivity();
if (activity == null) { if (activity == null) {
return; return;
}
int blurAmount = PreferenceManager.getDefaultSharedPreferences(getContext()).getInt("blur_amount", 25);
colorBackground.clearColorFilter();
SongGlideRequest.Builder.from(Glide.with(activity), MusicPlayerRemote.getCurrentSong())
.checkIgnoreMediaStore(activity)
.generatePalette(activity)
.build()
.transform(new BlurTransformation(getActivity(), blurAmount))
.into(new RetroMusicColoredTarget(colorBackground) {
@Override
public void onColorReady(int color) {
if (color == getDefaultFooterColor()) {
colorBackground.setColorFilter(color);
}
}
});
} }
int blurAmount = PreferenceManager.getDefaultSharedPreferences(getContext())
.getInt("new_blur_amount", 25);
colorBackground.clearColorFilter();
SongGlideRequest.Builder.from(Glide.with(activity), MusicPlayerRemote.getCurrentSong())
.checkIgnoreMediaStore(activity)
.generatePalette(activity)
.build()
.transform(new BlurTransformation.Builder(getActivity()).blurRadius(blurAmount).build())
.into(new RetroMusicColoredTarget(colorBackground) {
@Override
public void onColorReady(int color) {
if (color == getDefaultFooterColor()) {
colorBackground.setColorFilter(color);
}
}
});
}
} }

View file

@ -18,17 +18,6 @@ import android.support.v4.content.FileProvider;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.tag.FieldKey;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.helper.MusicPlayerRemote;
import code.name.monkey.retromusic.loaders.PlaylistLoader; import code.name.monkey.retromusic.loaders.PlaylistLoader;
@ -38,373 +27,384 @@ import code.name.monkey.retromusic.model.Playlist;
import code.name.monkey.retromusic.model.Song; import code.name.monkey.retromusic.model.Song;
import code.name.monkey.retromusic.model.lyrics.AbsSynchronizedLyrics; import code.name.monkey.retromusic.model.lyrics.AbsSynchronizedLyrics;
import io.reactivex.Observable; import io.reactivex.Observable;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.tag.FieldKey;
public class MusicUtil { public class MusicUtil {
public static final String TAG = MusicUtil.class.getSimpleName(); public static final String TAG = MusicUtil.class.getSimpleName();
private static Playlist playlist; private static Playlist playlist;
public static Uri getMediaStoreAlbumCoverUri(int albumId) { public static Uri getMediaStoreAlbumCoverUri(int albumId) {
final Uri sArtworkUri = Uri final Uri sArtworkUri = Uri
.parse("content://media/external/audio/albumart"); .parse("content://media/external/audio/albumart");
return ContentUris.withAppendedId(sArtworkUri, albumId); return ContentUris.withAppendedId(sArtworkUri, albumId);
}
public static Uri getSongFileUri(int songId) {
return ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, songId);
}
@NonNull
public static Intent createShareSongFileIntent(@NonNull final Song song, Context context) {
try {
return new Intent()
.setAction(Intent.ACTION_SEND)
.putExtra(Intent.EXTRA_STREAM,
FileProvider.getUriForFile(context,
context.getApplicationContext().getPackageName(),
new File(song.data)))
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
.setType("audio/*");
} catch (IllegalArgumentException e) {
// TODO the path is most likely not like /storage/emulated/0/... but something like /storage/28C7-75B0/...
e.printStackTrace();
Toast.makeText(context, "Could not share this file, I'm aware of the issue.",
Toast.LENGTH_SHORT).show();
return new Intent();
}
}
public static void setRingtone(@NonNull final Context context, final int id) {
final ContentResolver resolver = context.getContentResolver();
final Uri uri = getSongFileUri(id);
try {
final ContentValues values = new ContentValues(2);
values.put(MediaStore.Audio.AudioColumns.IS_RINGTONE, "1");
values.put(MediaStore.Audio.AudioColumns.IS_ALARM, "1");
resolver.update(uri, values, null, null);
} catch (@NonNull final UnsupportedOperationException ignored) {
return;
} }
public static Uri getSongFileUri(int songId) { try {
return ContentUris.withAppendedId(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, songId); Cursor cursor = resolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
} new String[]{MediaStore.MediaColumns.TITLE},
BaseColumns._ID + "=?",
@NonNull new String[]{String.valueOf(id)},
public static Intent createShareSongFileIntent(@NonNull final Song song, Context context) { null);
try { try {
if (cursor != null && cursor.getCount() == 1) {
return new Intent() cursor.moveToFirst();
.setAction(Intent.ACTION_SEND) Settings.System.putString(resolver, Settings.System.RINGTONE, uri.toString());
.putExtra(Intent.EXTRA_STREAM, final String message = context
FileProvider.getUriForFile(context, .getString(R.string.x_has_been_set_as_ringtone, cursor.getString(0));
context.getApplicationContext().getPackageName(), Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
new File(song.data)))
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
.setType("audio/*");
} catch (IllegalArgumentException e) {
// TODO the path is most likely not like /storage/emulated/0/... but something like /storage/28C7-75B0/...
e.printStackTrace();
Toast.makeText(context, "Could not share this file, I'm aware of the issue.",
Toast.LENGTH_SHORT).show();
return new Intent();
} }
} finally {
if (cursor != null) {
cursor.close();
}
}
} catch (SecurityException ignored) {
}
}
@NonNull
public static String getArtistInfoString(@NonNull final Context context,
@NonNull final Artist artist) {
int albumCount = artist.getAlbumCount();
int songCount = artist.getSongCount();
String albumString = albumCount == 1 ? context.getResources().getString(R.string.album)
: context.getResources().getString(R.string.albums);
String songString = songCount == 1 ? context.getResources().getString(R.string.song)
: context.getResources().getString(R.string.songs);
return albumCount + " " + albumString + "" + songCount + " " + songString;
}
@NonNull
public static String getArtistInfoStringSmall(@NonNull final Context context,
@NonNull final Artist artist) {
int songCount = artist.getSongCount();
String songString = songCount == 1 ? context.getResources().getString(R.string.song)
: context.getResources().getString(R.string.songs);
return songCount + " " + songString;
}
@NonNull
public static String getPlaylistInfoString(@NonNull final Context context,
@NonNull List<Song> songs) {
final int songCount = songs.size();
final String songString = songCount == 1 ? context.getResources().getString(R.string.song)
: context.getResources().getString(R.string.songs);
long duration = 0;
for (int i = 0; i < songs.size(); i++) {
duration += songs.get(i).duration;
} }
public static void setRingtone(@NonNull final Context context, final int id) { return songCount + " " + songString + "" + MusicUtil.getReadableDurationString(duration);
final ContentResolver resolver = context.getContentResolver(); }
final Uri uri = getSongFileUri(id);
try { public static String getReadableDurationString(long songDurationMillis) {
final ContentValues values = new ContentValues(2); long minutes = (songDurationMillis / 1000) / 60;
values.put(MediaStore.Audio.AudioColumns.IS_RINGTONE, "1"); long seconds = (songDurationMillis / 1000) % 60;
values.put(MediaStore.Audio.AudioColumns.IS_ALARM, "1"); if (minutes < 60) {
resolver.update(uri, values, null, null); return String.format(Locale.getDefault(), "%01d:%02d", minutes, seconds);
} catch (@NonNull final UnsupportedOperationException ignored) { } else {
return; long hours = minutes / 60;
minutes = minutes % 60;
return String.format(Locale.getDefault(), "%d:%02d:%02d", hours, minutes, seconds);
}
}
//iTunes uses for example 1002 for track 2 CD1 or 3011 for track 11 CD3.
//this method converts those values to normal tracknumbers
public static int getFixedTrackNumber(int trackNumberToFix) {
return trackNumberToFix % 1000;
}
public static void insertAlbumArt(@NonNull Context context, int albumId, String path) {
ContentResolver contentResolver = context.getContentResolver();
Uri artworkUri = Uri.parse("content://media/external/audio/albumart");
contentResolver.delete(ContentUris.withAppendedId(artworkUri, albumId), null, null);
ContentValues values = new ContentValues();
values.put("album_id", albumId);
values.put("_data", path);
contentResolver.insert(artworkUri, values);
}
@NonNull
public static File createAlbumArtFile() {
return new File(createAlbumArtDir(), String.valueOf(System.currentTimeMillis()));
}
@NonNull
@SuppressWarnings("ResultOfMethodCallIgnored")
private static File createAlbumArtDir() {
File albumArtDir = new File(Environment.getExternalStorageDirectory(), "/albumthumbs/");
if (!albumArtDir.exists()) {
albumArtDir.mkdirs();
try {
new File(albumArtDir, ".nomedia").createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
return albumArtDir;
}
public static void deleteTracks(@NonNull final Activity activity,
@NonNull final List<Song> songs) {
final String[] projection = new String[]{
BaseColumns._ID, MediaStore.MediaColumns.DATA
};
final StringBuilder selection = new StringBuilder();
selection.append(BaseColumns._ID + " IN (");
for (int i = 0; i < songs.size(); i++) {
selection.append(songs.get(i).id);
if (i < songs.size() - 1) {
selection.append(",");
}
}
selection.append(")");
try {
final Cursor cursor = activity.getContentResolver().query(
MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection, selection.toString(),
null, null);
if (cursor != null) {
// Step 1: Remove selected tracks from the current playlist, as well
// as from the album art cache
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
final int id = cursor.getInt(0);
Song song = SongLoader.getSong(activity, id).blockingFirst();
MusicPlayerRemote.removeFromQueue(song);
cursor.moveToNext();
} }
try { // Step 2: Remove selected tracks from the database
Cursor cursor = resolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, activity.getContentResolver().delete(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
new String[]{MediaStore.MediaColumns.TITLE}, selection.toString(), null);
BaseColumns._ID + "=?",
new String[]{String.valueOf(id)}, // Step 3: Remove files from card
null); cursor.moveToFirst();
while (!cursor.isAfterLast()) {
final String name = cursor.getString(1);
try { // File.delete can throw a security exception
final File f = new File(name);
if (!f.delete()) {
// I'm not sure if we'd ever get here (deletion would
// have to fail, but no exception thrown)
Log.e("MusicUtils", "Failed to delete file " + name);
}
cursor.moveToNext();
} catch (@NonNull final SecurityException ex) {
cursor.moveToNext();
} catch (NullPointerException e) {
Log.e("MusicUtils", "Failed to find file " + name);
}
}
cursor.close();
}
activity.getContentResolver().notifyChange(Uri.parse("content://media"), null);
Toast.makeText(activity, activity.getString(R.string.deleted_x_songs, songs.size()),
Toast.LENGTH_SHORT).show();
} catch (SecurityException ignored) {
}
}
public static void deleteAlbumArt(@NonNull Context context, int albumId) {
ContentResolver contentResolver = context.getContentResolver();
Uri localUri = Uri.parse("content://media/external/audio/albumart");
contentResolver.delete(ContentUris.withAppendedId(localUri, albumId), null, null);
}
@Nullable
public static String getLyrics(Song song) {
String lyrics = null;
File file = new File(song.data);
try {
lyrics = AudioFileIO.read(file).getTagOrCreateDefault().getFirst(FieldKey.LYRICS);
} catch (Exception e) {
e.printStackTrace();
}
if (lyrics == null || lyrics.trim().isEmpty() || !AbsSynchronizedLyrics
.isSynchronized(lyrics)) {
File dir = file.getAbsoluteFile().getParentFile();
if (dir != null && dir.exists() && dir.isDirectory()) {
String format = ".*%s.*\\.(lrc|txt)";
String filename = Pattern.quote(FileUtil.stripExtension(file.getName()));
String songtitle = Pattern.quote(song.title);
final ArrayList<Pattern> patterns = new ArrayList<>();
patterns.add(Pattern.compile(String.format(format, filename),
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE));
patterns.add(Pattern.compile(String.format(format, songtitle),
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE));
File[] files = dir.listFiles(f -> {
for (Pattern pattern : patterns) {
if (pattern.matcher(f.getName()).matches()) {
return true;
}
}
return false;
});
if (files != null && files.length > 0) {
for (File f : files) {
try { try {
if (cursor != null && cursor.getCount() == 1) { String newLyrics = FileUtil.read(f);
cursor.moveToFirst(); if (newLyrics != null && !newLyrics.trim().isEmpty()) {
Settings.System.putString(resolver, Settings.System.RINGTONE, uri.toString()); if (AbsSynchronizedLyrics.isSynchronized(newLyrics)) {
final String message = context return newLyrics;
.getString(R.string.x_has_been_set_as_ringtone, cursor.getString(0));
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
} finally {
if (cursor != null) {
cursor.close();
} }
lyrics = newLyrics;
}
} catch (Exception e) {
e.printStackTrace();
} }
} catch (SecurityException ignored) { }
} }
}
} }
@NonNull return lyrics;
public static String getArtistInfoString(@NonNull final Context context, }
@NonNull final Artist artist) {
int albumCount = artist.getAlbumCount(); public static void toggleFavorite(@NonNull final Context context, @NonNull final Song song) {
int songCount = artist.getSongCount(); if (isFavorite(context, song)) {
String albumString = albumCount == 1 ? context.getResources().getString(R.string.album) PlaylistsUtil
: context.getResources().getString(R.string.albums); .removeFromPlaylist(context, song, getFavoritesPlaylist(context).blockingFirst().id);
String songString = songCount == 1 ? context.getResources().getString(R.string.song) } else {
: context.getResources().getString(R.string.songs); PlaylistsUtil
return albumCount + " " + albumString + "" + songCount + " " + songString; .addToPlaylist(context, song, getOrCreateFavoritesPlaylist(context).blockingFirst().id,
false);
} }
}
@NonNull public static boolean isFavoritePlaylist(@NonNull final Context context,
public static String getArtistInfoStringSmall(@NonNull final Context context, @NonNull final Playlist playlist) {
@NonNull final Artist artist) { return playlist.name != null && playlist.name.equals(context.getString(R.string.favorites));
int songCount = artist.getSongCount(); }
String songString = songCount == 1 ? context.getResources().getString(R.string.song)
: context.getResources().getString(R.string.songs);
return songCount + " " + songString;
}
@NonNull private static Observable<Playlist> getFavoritesPlaylist(@NonNull final Context context) {
public static String getPlaylistInfoString(@NonNull final Context context, return PlaylistLoader.getPlaylist(context, context.getString(R.string.favorites));
@NonNull List<Song> songs) { }
final int songCount = songs.size();
final String songString = songCount == 1 ? context.getResources().getString(R.string.song)
: context.getResources().getString(R.string.songs);
long duration = 0; private static Observable<Playlist> getOrCreateFavoritesPlaylist(@NonNull final Context context) {
for (int i = 0; i < songs.size(); i++) { return PlaylistLoader.getPlaylist(context,
duration += songs.get(i).duration; PlaylistsUtil.createPlaylist(context, context.getString(R.string.favorites)));
} }
return songCount + " " + songString + "" + MusicUtil.getReadableDurationString(duration); public static boolean isFavorite(@NonNull final Context context, @NonNull final Song song) {
}
public static String getReadableDurationString(long songDurationMillis) {
long minutes = (songDurationMillis / 1000) / 60;
long seconds = (songDurationMillis / 1000) % 60;
if (minutes < 60) {
return String.format(Locale.getDefault(), "%01d:%02d", minutes, seconds);
} else {
long hours = minutes / 60;
minutes = minutes % 60;
return String.format(Locale.getDefault(), "%d:%02d:%02d", hours, minutes, seconds);
}
}
//iTunes uses for example 1002 for track 2 CD1 or 3011 for track 11 CD3.
//this method converts those values to normal tracknumbers
public static int getFixedTrackNumber(int trackNumberToFix) {
return trackNumberToFix % 1000;
}
public static void insertAlbumArt(@NonNull Context context, int albumId, String path) {
ContentResolver contentResolver = context.getContentResolver();
Uri artworkUri = Uri.parse("content://media/external/audio/albumart");
contentResolver.delete(ContentUris.withAppendedId(artworkUri, albumId), null, null);
ContentValues values = new ContentValues();
values.put("album_id", albumId);
values.put("_data", path);
contentResolver.insert(artworkUri, values);
}
@NonNull
public static File createAlbumArtFile() {
return new File(createAlbumArtDir(), String.valueOf(System.currentTimeMillis()));
}
@NonNull
@SuppressWarnings("ResultOfMethodCallIgnored")
private static File createAlbumArtDir() {
File albumArtDir = new File(Environment.getExternalStorageDirectory(), "/albumthumbs/");
if (!albumArtDir.exists()) {
albumArtDir.mkdirs();
try {
new File(albumArtDir, ".nomedia").createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
return albumArtDir;
}
public static void deleteTracks(@NonNull final Activity activity,
@NonNull final List<Song> songs) {
final String[] projection = new String[]{
BaseColumns._ID, MediaStore.MediaColumns.DATA
};
final StringBuilder selection = new StringBuilder();
selection.append(BaseColumns._ID + " IN (");
for (int i = 0; i < songs.size(); i++) {
selection.append(songs.get(i).id);
if (i < songs.size() - 1) {
selection.append(",");
}
}
selection.append(")");
try {
final Cursor cursor = activity.getContentResolver().query(
MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection, selection.toString(),
null, null);
if (cursor != null) {
// Step 1: Remove selected tracks from the current playlist, as well
// as from the album art cache
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
final int id = cursor.getInt(0);
SongLoader.getSong(activity, id).subscribe(song -> {
MusicPlayerRemote.removeFromQueue(song);
cursor.moveToNext();
});
}
// Step 2: Remove selected tracks from the database
activity.getContentResolver().delete(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
selection.toString(), null);
// Step 3: Remove files from card
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
final String name = cursor.getString(1);
try { // File.delete can throw a security exception
final File f = new File(name);
if (!f.delete()) {
// I'm not sure if we'd ever get here (deletion would
// have to fail, but no exception thrown)
Log.e("MusicUtils", "Failed to delete file " + name);
}
cursor.moveToNext();
} catch (@NonNull final SecurityException ex) {
cursor.moveToNext();
} catch (NullPointerException e) {
Log.e("MusicUtils", "Failed to find file " + name);
}
}
cursor.close();
}
activity.getContentResolver().notifyChange(Uri.parse("content://media"), null);
Toast.makeText(activity, activity.getString(R.string.deleted_x_songs, songs.size()),
Toast.LENGTH_SHORT).show();
} catch (SecurityException ignored) {
}
}
public static void deleteAlbumArt(@NonNull Context context, int albumId) {
ContentResolver contentResolver = context.getContentResolver();
Uri localUri = Uri.parse("content://media/external/audio/albumart");
contentResolver.delete(ContentUris.withAppendedId(localUri, albumId), null, null);
}
@Nullable
public static String getLyrics(Song song) {
String lyrics = null;
File file = new File(song.data);
try {
lyrics = AudioFileIO.read(file).getTagOrCreateDefault().getFirst(FieldKey.LYRICS);
} catch (Exception e) {
e.printStackTrace();
}
if (lyrics == null || lyrics.trim().isEmpty() || !AbsSynchronizedLyrics
.isSynchronized(lyrics)) {
File dir = file.getAbsoluteFile().getParentFile();
if (dir != null && dir.exists() && dir.isDirectory()) {
String format = ".*%s.*\\.(lrc|txt)";
String filename = Pattern.quote(FileUtil.stripExtension(file.getName()));
String songtitle = Pattern.quote(song.title);
final ArrayList<Pattern> patterns = new ArrayList<>();
patterns.add(Pattern.compile(String.format(format, filename),
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE));
patterns.add(Pattern.compile(String.format(format, songtitle),
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE));
File[] files = dir.listFiles(f -> {
for (Pattern pattern : patterns) {
if (pattern.matcher(f.getName()).matches()) {
return true;
}
}
return false;
});
if (files != null && files.length > 0) {
for (File f : files) {
try {
String newLyrics = FileUtil.read(f);
if (newLyrics != null && !newLyrics.trim().isEmpty()) {
if (AbsSynchronizedLyrics.isSynchronized(newLyrics)) {
return newLyrics;
}
lyrics = newLyrics;
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
return lyrics;
}
public static void toggleFavorite(@NonNull final Context context, @NonNull final Song song) {
if (isFavorite(context, song)) {
PlaylistsUtil
.removeFromPlaylist(context, song, getFavoritesPlaylist(context).blockingFirst().id);
} else {
PlaylistsUtil
.addToPlaylist(context, song, getOrCreateFavoritesPlaylist(context).blockingFirst().id,
false);
}
}
public static boolean isFavoritePlaylist(@NonNull final Context context,
@NonNull final Playlist playlist) {
return playlist.name != null && playlist.name.equals(context.getString(R.string.favorites));
}
private static Observable<Playlist> getFavoritesPlaylist(@NonNull final Context context) {
return PlaylistLoader.getPlaylist(context, context.getString(R.string.favorites));
}
private static Observable<Playlist> getOrCreateFavoritesPlaylist(@NonNull final Context context) {
return PlaylistLoader.getPlaylist(context,
PlaylistsUtil.createPlaylist(context, context.getString(R.string.favorites)));
}
public static boolean isFavorite(@NonNull final Context context, @NonNull final Song song) {
/*return Observable.create(e -> getFavoritesPlaylist(context).subscribe(playlist1 -> { /*return Observable.create(e -> getFavoritesPlaylist(context).subscribe(playlist1 -> {
boolean isBoolean = PlaylistsUtil.doPlaylistContains(context, playlist1.id, song.id); boolean isBoolean = PlaylistsUtil.doPlaylistContains(context, playlist1.id, song.id);
e.onNext(isBoolean); e.onNext(isBoolean);
e.onComplete(); e.onComplete();
}));*/ }));*/
//getFavoritesPlaylist(context).blockingFirst().id.subscribe(MusicUtil::setPlaylist); //getFavoritesPlaylist(context).blockingFirst().id.subscribe(MusicUtil::setPlaylist);
//return PlaylistsUtil.doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id); //return PlaylistsUtil.doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id);
return PlaylistsUtil return PlaylistsUtil
.doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id); .doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id);
} }
public static boolean isArtistNameUnknown(@Nullable String artistName) { public static boolean isArtistNameUnknown(@Nullable String artistName) {
if (TextUtils.isEmpty(artistName)) return false; if (TextUtils.isEmpty(artistName)) {
if (artistName.equals(Artist.UNKNOWN_ARTIST_DISPLAY_NAME)) return true; return false;
artistName = artistName.trim().toLowerCase();
return artistName.equals("unknown") || artistName.equals("<unknown>");
} }
if (artistName.equals(Artist.UNKNOWN_ARTIST_DISPLAY_NAME)) {
return true;
}
artistName = artistName.trim().toLowerCase();
return artistName.equals("unknown") || artistName.equals("<unknown>");
}
@NonNull @NonNull
public static String getSectionName(@Nullable String musicMediaTitle) { public static String getSectionName(@Nullable String musicMediaTitle) {
if (TextUtils.isEmpty(musicMediaTitle)) { if (TextUtils.isEmpty(musicMediaTitle)) {
return ""; return "";
}
musicMediaTitle = musicMediaTitle.trim().toLowerCase();
if (musicMediaTitle.startsWith("the ")) {
musicMediaTitle = musicMediaTitle.substring(4);
} else if (musicMediaTitle.startsWith("a ")) {
musicMediaTitle = musicMediaTitle.substring(2);
}
if (musicMediaTitle.isEmpty()) {
return "";
}
return String.valueOf(musicMediaTitle.charAt(0)).toUpperCase();
} }
musicMediaTitle = musicMediaTitle.trim().toLowerCase();
if (musicMediaTitle.startsWith("the ")) {
musicMediaTitle = musicMediaTitle.substring(4);
} else if (musicMediaTitle.startsWith("a ")) {
musicMediaTitle = musicMediaTitle.substring(2);
}
if (musicMediaTitle.isEmpty()) {
return "";
}
return String.valueOf(musicMediaTitle.charAt(0)).toUpperCase();
}
public static Playlist getPlaylist() { public static Playlist getPlaylist() {
return playlist; return playlist;
} }
public static void setPlaylist(Playlist playlist) { public static void setPlaylist(Playlist playlist) {
MusicUtil.playlist = playlist; MusicUtil.playlist = playlist;
} }
public static long getTotalDuration(@NonNull final Context context, @NonNull List<Song> songs) { public static long getTotalDuration(@NonNull final Context context, @NonNull List<Song> songs) {
long duration = 0; long duration = 0;
for (int i = 0; i < songs.size(); i++) { for (int i = 0; i < songs.size(); i++) {
duration += songs.get(i).duration; duration += songs.get(i).duration;
}
return duration;
} }
return duration;
}
@NonNull @NonNull
public static String getYearString(int year) { public static String getYearString(int year) {
return year > 0 ? String.valueOf(year) : "-"; return year > 0 ? String.valueOf(year) : "-";
} }
} }

View file

@ -1,55 +0,0 @@
package code.name.monkey.retromusic.util;
import android.graphics.Canvas;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
public class SwipeAndDragHelper extends ItemTouchHelper.Callback {
private ActionCompletionContract contract;
public SwipeAndDragHelper(ActionCompletionContract contract) {
this.contract = contract;
}
@Override
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN;
return makeMovementFlags(dragFlags, 0);
}
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
contract.onViewMoved(viewHolder.getAdapterPosition(), target.getAdapterPosition());
return true;
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
}
@Override
public boolean isLongPressDragEnabled() {
return false;
}
@Override
public void onChildDraw(Canvas c,
RecyclerView recyclerView,
RecyclerView.ViewHolder viewHolder,
float dX,
float dY,
int actionState,
boolean isCurrentlyActive) {
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {
float alpha = 1 - (Math.abs(dX) / recyclerView.getWidth());
viewHolder.itemView.setAlpha(alpha);
}
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
}
public interface ActionCompletionContract {
void onViewMoved(int oldPosition, int newPosition);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 588 B

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp"/>
<padding
android:bottom="8dp"
android:top="8dp"/>
<solid android:color="?attr/cardBackgroundColor"/>
</shape>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="25dp" />
<gradient
android:angle="135"
android:endColor="@color/md_green_A700"
android:startColor="@color/md_blue_A200" />
</shape>

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:height="24dp"
android:height="24dp" android:viewportHeight="24"
android:viewportHeight="24" android:viewportWidth="24"
android:viewportWidth="24"> android:width="24dp">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@color/md_white_1000"
android:pathData="M18.3,5.71L18.3,5.71c-0.39,-0.39 -1.02,-0.39 -1.41,0L12,10.59L7.11,5.7c-0.39,-0.39 -1.02,-0.39 -1.41,0l0,0c-0.39,0.39 -0.39,1.02 0,1.41L10.59,12L5.7,16.89c-0.39,0.39 -0.39,1.02 0,1.41h0c0.39,0.39 1.02,0.39 1.41,0L12,13.41l4.89,4.89c0.39,0.39 1.02,0.39 1.41,0l0,0c0.39,-0.39 0.39,-1.02 0,-1.41L13.41,12l4.89,-4.89C18.68,6.73 18.68,6.09 18.3,5.71z" /> android:pathData="M18.3,5.71L18.3,5.71c-0.39,-0.39 -1.02,-0.39 -1.41,0L12,10.59L7.11,5.7c-0.39,-0.39 -1.02,-0.39 -1.41,0l0,0c-0.39,0.39 -0.39,1.02 0,1.41L10.59,12L5.7,16.89c-0.39,0.39 -0.39,1.02 0,1.41h0c0.39,0.39 1.02,0.39 1.41,0L12,13.41l4.89,4.89c0.39,0.39 1.02,0.39 1.41,0l0,0c0.39,-0.39 0.39,-1.02 0,-1.41L13.41,12l4.89,-4.89C18.68,6.73 18.68,6.09 18.3,5.71z"/>
</vector> </vector>

View file

@ -1,14 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp" android:width="108dp"
android:height="108dp" android:height="108dp"
android:viewportWidth="108" android:viewportWidth="135"
android:viewportHeight="108"> android:viewportHeight="135">
<path <group android:translateX="13.5"
android:fillColor="#FF000000" android:translateY="13.5">
android:pathData="M44,72l35,36h29V73.8L68,34c-2.74,0.28 -6.49,1.13 -9,4 -3.53,4 -2.09,9.18 -3,15C55.23,57.9 52.58,64.62 44,72Z" <path
android:strokeAlpha="0.1" android:fillColor="#FF000000"
android:fillAlpha="0.1"/> android:pathData="M44,72l35,36h29V73.8L68,34c-2.74,0.28 -6.49,1.13 -9,4 -3.53,4 -2.09,9.18 -3,15C55.23,57.9 52.58,64.62 44,72Z"
<path android:strokeAlpha="0.1"
android:pathData="M52.9,34.2V54.57A10.32,10.32 0,0 0,49.6 54a9.9,9.9 0,1 0,9.9 9.9V40.8h8.8V34.2Z" android:fillAlpha="0.1"/>
android:fillColor="#fff"/> <path
android:pathData="M52.9,34.2V54.57A10.32,10.32 0,0 0,49.6 54a9.9,9.9 0,1 0,9.9 9.9V40.8h8.8V34.2Z"
android:fillColor="#fff"/>
</group>
</vector> </vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp"/> <corners android:radius="12dp"/>
<solid android:color="@android:color/black"/> <solid android:color="@android:color/black"/>
</shape> </shape>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="25dp" />
<solid android:color="?cardBackgroundColor" />
</shape>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent"/> <solid android:color="@android:color/white"/>
</shape> </shape>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="14dp"
android:height="14dp" />
<solid android:color="@color/md_green_A700" />
</shape>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="8dp"
android:topRightRadius="8dp" />
<solid android:color="@color/md_red_A400" />
</shape>

View file

@ -1,151 +1,157 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/background" android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="ContentDescription">
<RelativeLayout
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/content"
android:layout_alignParentEnd="true">
<ImageView
android:id="@+id/largeIcon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
tools:src="@drawable/hemanth_s"/>
<ImageView
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image"
tools:tint="@color/md_black_1000"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginEnd="48dp"
android:paddingTop="6dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/smallIcon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="8dp"
tools:src="@drawable/ic_audiotrack_black_24dp"
tools:tint="@color/md_black_1000"/>
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="12sp"
tools:text="@string/app_name"/>
<ImageView
android:id="@+id/arrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="2dp"
android:scaleType="centerInside"
android:src="@drawable/ic_keyboard_arrow_down_black_24dp"
android:tint="@color/md_black_1000"
tools:ignore="VectorDrawableCompat"/>
</LinearLayout>
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="ContentDescription"> android:layout_alignParentStart="true"
android:layout_below="@id/app"
android:layout_toStartOf="@id/actions"
android:paddingBottom="12dp"
android:paddingStart="0dp"
android:paddingEnd="12dp"
android:orientation="vertical">
<RelativeLayout <TextView
android:id="@+id/image" android:id="@+id/title"
android:layout_width="match_parent" android:textStyle="bold"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:layout_alignBottom="@+id/content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"> android:paddingStart="16dp"
android:paddingEnd="0dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<ImageView <TextView
android:id="@+id/largeIcon" android:id="@+id/subtitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:paddingStart="16dp"
android:adjustViewBounds="true" android:paddingEnd="0dp"
android:scaleType="fitCenter" /> android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<ImageView </LinearLayout>
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image" />
</RelativeLayout> <LinearLayout
android:id="@+id/actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="48dp"
android:layout_alignBottom="@id/content"
android:layout_alignParentEnd="true"
android:layout_alignTop="@id/content"
android:layout_gravity="bottom"
android:orientation="horizontal">
<LinearLayout <ImageView
android:id="@+id/app" android:id="@+id/action_prev"
android:layout_width="wrap_content" android:layout_width="42dp"
android:layout_height="wrap_content" android:layout_height="42dp"
android:layout_marginBottom="4dp" android:scaleType="centerInside"/>
android:layout_marginEnd="48dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingEnd="12dp"
android:paddingStart="24dp"
android:paddingTop="12dp">
<ImageView <ImageView
android:id="@+id/smallIcon" android:id="@+id/action_play_pause"
android:layout_width="16dp" android:layout_width="42dp"
android:layout_height="16dp" android:layout_height="42dp"
android:scaleType="centerInside" /> android:scaleType="centerInside"/>
<TextView <ImageView
android:id="@+id/appName" android:id="@+id/action_next"
android:layout_width="wrap_content" android:layout_width="42dp"
android:layout_height="wrap_content" android:layout_height="42dp"
android:layout_marginStart="4dp" android:scaleType="centerInside"/>
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="12sp" />
<ImageView <ImageView
android:id="@+id/arrow" android:id="@+id/action_quit"
android:layout_width="16dp" android:layout_width="42dp"
android:layout_height="16dp" android:layout_height="42dp"
android:layout_marginStart="2dp" android:scaleType="centerInside"
android:scaleType="centerInside" android:visibility="gone"/>
android:src="@drawable/ic_keyboard_arrow_down_black_24dp"
tools:ignore="VectorDrawableCompat" />
</LinearLayout> <ImageView
android:id="@+id/fifth"
<LinearLayout android:layout_width="42dp"
android:layout_width="match_parent" android:layout_height="42dp"
android:layout_height="wrap_content" android:scaleType="centerInside"/>
android:layout_alignParentStart="true" </LinearLayout>
android:layout_below="@id/app"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="2dp"
android:paddingEnd="12dp"
android:paddingStart="24dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginEnd="48dp"
android:layout_weight="0"
android:orientation="horizontal">
<ImageView
android:id="@+id/action_prev"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_play_pause"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_next"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_quit"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside"
android:visibility="gone" />
<ImageView
android:id="@+id/fifth"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
</LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -1,143 +1,143 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/background" android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent"
android:layout_alignBottom="@+id/content"
android:layout_alignParentEnd="true">
<RelativeLayout <ImageView
android:id="@+id/image" android:id="@+id/largeIcon"
android:layout_width="match_parent" android:layout_width="@dimen/notification_big_image_size"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignBottom="@+id/content" android:layout_alignParentEnd="true"
android:layout_alignParentEnd="true"> android:layout_centerVertical="true"
android:scaleType="centerCrop"
tools:src="@drawable/hemanth_s"/>
<ImageView <ImageView
android:id="@+id/largeIcon" android:id="@+id/foregroundImage"
android:layout_width="@dimen/notification_big_image_size" android:layout_width="96dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentEnd="true" android:layout_alignStart="@id/largeIcon"
android:layout_centerVertical="true" android:src="@drawable/background_image"
android:scaleType="centerCrop" android:tint="@color/md_black_1000"/>
tools:src="@drawable/hemanth_s" />
<ImageView </RelativeLayout>
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image"
android:tint="@color/md_black_1000" />
</RelativeLayout> <LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:paddingTop="8dp"
android:paddingBottom="12dp"
android:paddingStart="0dp"
android:paddingEnd="144dp"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/content" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:paddingStart="8dp"
android:paddingEnd="0dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/smallIcon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="8dp"
tools:src="@drawable/ic_audiotrack_black_24dp"
tools:tint="@color/md_black_1000"/>
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_marginStart="4dp"
android:orientation="vertical" android:ellipsize="end"
android:paddingBottom="12dp" android:lines="1"
android:paddingEnd="144dp" android:singleLine="true"
android:paddingStart="0dp" android:textSize="13sp"
android:paddingTop="16dp"> tools:text="@string/app_name"/>
<LinearLayout <ImageView
android:layout_width="wrap_content" android:id="@+id/arrow"
android:layout_height="wrap_content" android:layout_width="16dp"
android:layout_marginBottom="4dp" android:layout_height="16dp"
android:gravity="center_vertical" android:layout_marginStart="2dp"
android:orientation="horizontal" android:scaleType="centerInside"
android:paddingStart="8dp"> android:src="@drawable/ic_keyboard_arrow_up_24dp"
tools:ignore="VectorDrawableCompat"/>
<ImageView
android:id="@+id/smallIcon"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="8dp"
tools:src="@drawable/ic_audiotrack_black_24dp"
tools:tint="@color/md_black_1000" />
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="11sp"
tools:text="@string/app_name" />
<ImageView
android:id="@+id/arrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="2dp"
android:scaleType="centerInside"
android:src="@drawable/ic_keyboard_arrow_up_24dp"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:paddingEnd="0dp"
android:paddingStart="16dp"
android:singleLine="true"
android:textStyle="bold"
tools:text="@string/title_dashboard" />
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:paddingEnd="0dp"
android:paddingStart="16dp"
android:singleLine="true"
android:textSize="13sp"
tools:text="@string/title_dashboard" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
tools:ignore="ContentDescription">
<ImageView
android:id="@+id/action_prev"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
tools:tint="@color/md_black_1000" />
<ImageView
android:id="@+id/action_play_pause"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_next"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_quit"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
tools:ignore="ContentDescription" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/title"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:orientation="horizontal"
tools:ignore="ContentDescription">
<ImageView
android:id="@+id/action_prev"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
tools:tint="@color/md_black_1000"/>
<ImageView
android:id="@+id/action_play_pause"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"/>
<ImageView
android:id="@+id/action_next"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"/>
<ImageView
android:id="@+id/action_quit"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerInside"
tools:ignore="ContentDescription"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -1,123 +1,134 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/gradient_background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true" android:scaleType="centerCrop"
android:focusable="true"> tools:src="@drawable/hemanth_s"/>
<android.support.v7.widget.AppCompatImageView <View
android:id="@+id/gradient_background" android:id="@+id/mask"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:background="@color/md_black_1000"
tools:src="@drawable/hemanth_s" /> android:visibility="gone"/>
<View <View
android:id="@+id/mask" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="match_parent"
android:layout_height="match_parent" android:background="@drawable/shadow_up"/>
android:background="@color/md_black_1000"
android:visibility="gone" />
<View <FrameLayout
android:layout_width="match_parent" android:id="@+id/toolbar_container"
android:layout_height="match_parent" android:layout_width="match_parent"
android:background="@drawable/shadow_up" /> android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
tools:background="@color/md_red_A700">
<android.support.v7.widget.Toolbar
android:id="@+id/player_toolbar"
style="@style/Toolbar48"
android:layout_height="48dp"
android:navigationIcon="@drawable/ic_close_white_24dp"
app:navigationIcon="@drawable/ic_close_white_24dp"/>
</FrameLayout>
<include layout="@layout/shadow_statusbar_toolbar"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/toolbar_container"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/toolbar_container" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
tools:background="@color/md_red_A700">
<android.support.v7.widget.Toolbar <include layout="@layout/status_bar"/>
android:id="@+id/player_toolbar"
style="@style/Toolbar48"
android:layout_height="48dp"
android:navigationIcon="@drawable/ic_close_white_24dp"
app:navigationIcon="@drawable/ic_close_white_24dp" />
</FrameLayout> </FrameLayout>
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@id/toolbar_container" android:layout_weight="1"
android:orientation="horizontal"> android:padding="24dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="12dp"
android:text="Queue"
android:textAppearance="@style/TextAppearance.AppCompat.Display2"
android:textColor="?android:attr/textColorPrimary"
tools:ignore="MissingPrefix"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout <LinearLayout
android:id="@+id/now_playing_container"
android:layout_width="400dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/album_cover_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_gravity="center_horizontal">
<fragment
android:id="@+id/player_album_cover_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment"/>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" tools:background="@color/md_white_1000">
android:orientation="vertical"
android:padding="24dp">
<TextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="12dp"
android:text="Queue"
android:textAppearance="@style/TextAppearance.AppCompat.Display2"
android:textColor="?android:attr/textColorPrimary"
tools:ignore="MissingPrefix" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal" />
<fragment
android:id="@+id/playback_controls_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="code.name.monkey.retromusic.ui.fragments.player.blur.BlurPlaybackControlsFragment"/>
</FrameLayout>
</LinearLayout> </LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:id="@+id/now_playing_container"
android:layout_width="400dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/album_cover_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<fragment
android:id="@+id/player_album_cover_fragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
tools:background="@color/md_white_1000">
<fragment
android:id="@+id/playback_controls_fragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.blur.BlurPlaybackControlsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -13,12 +13,14 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
tools:src="@drawable/hemanth_s"/> tools:src="@drawable/hemanth_s"/>
<View <View
android:id="@+id/mask" android:id="@+id/mask"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/md_black_1000" android:background="@color/md_black_1000"
android:visibility="gone"/> android:visibility="gone"/>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -27,7 +29,6 @@
<include layout="@layout/shadow_statusbar_toolbar"/> <include layout="@layout/shadow_statusbar_toolbar"/>
<LinearLayout <LinearLayout
android:id="@+id/now_playing_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="64dp" android:layout_marginStart="64dp"
@ -35,6 +36,13 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar"/>
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout <code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/album_cover_container" android:id="@+id/album_cover_container"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -77,5 +85,4 @@
app:navigationIcon="@drawable/ic_close_white_24dp"/> app:navigationIcon="@drawable/ic_close_white_24dp"/>
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>

View file

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="?android:windowBackground"
android:clickable="true"
android:focusable="false"
android:transitionName="@string/transition_mini_player"
tools:ignore="UnusedAttribute">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/mini_player_image"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_margin="16dp"
android:scaleType="centerCrop"
app:srcCompat="@drawable/ic_keyboard_arrow_up_24dp"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/mini_player_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/mini_player_play_pause_button"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:scaleType="center"
tools:ignore="ContentDescription" />
</LinearLayout>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="3dp"
android:progress="20"
app:mpb_progressStyle="horizontal"
app:mpb_showProgressBackground="false"
app:mpb_useIntrinsicPadding="false" />
</FrameLayout>

View file

@ -1,164 +1,170 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<android.support.design.widget.AppBarLayout <android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/app_bar" android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<android.support.design.widget.CollapsingToolbarLayout <code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:layout_collapseMode="parallax">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:src="@drawable/hemanth_s" />
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar48"
app:layout_collapseMode="pin"
app:title="" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:overScrollMode="never" android:background="@android:color/transparent"
app:behavior_overlapTop="24dp" app:layout_collapseMode="parallax">
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_album_art"
tools:src="@drawable/hemanth_s"/>
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong"/>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar48"
app:layout_collapseMode="pin"
app:title=""/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/content"
android:layout_marginTop="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_circular_top_corners"
android:elevation="@dimen/card_elevation"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artist_image"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_weight="0"
android:layout_marginStart="8dp"
app:civ_border="false"
app:civ_shadow="false"/>
<LinearLayout <LinearLayout
android:id="@+id/content" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:orientation="vertical">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_bottom_sheet_dialog_fragment" android:maxLines="2"
android:elevation="@dimen/card_elevation" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:orientation="vertical"> tools:ignore="MissingPrefix"/>
<LinearLayout <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:layout_width="match_parent" android:id="@+id/text"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:orientation="horizontal"> android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="4dp"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:ignore="MissingPrefix"
tools:text="Title"/>
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artist_image"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="8dp"
android:layout_weight="0" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingEnd="0dp"
android:paddingStart="16dp">
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
tools:ignore="MissingPrefix" />
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingTop="4dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
</LinearLayout>
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/song_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="12dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="12dp"
android:text="@string/songs"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:ignore="MissingPrefix" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false" />
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/more_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="12dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="12dp"
android:text="@string/songs"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:visibility="gone"
tools:ignore="MissingPrefix" />
<android.support.v7.widget.RecyclerView
android:id="@+id/more_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </LinearLayout>
<android.support.design.widget.FloatingActionButton <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/action_shuffle_all" android:id="@+id/song_title"
android:layout_width="wrap_content" fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|end" android:paddingTop="12dp"
android:layout_margin="16dp" android:paddingBottom="12dp"
app:layout_behavior="code.name.monkey.retromusic.misc.ScrollAwareFABBehavior" android:paddingStart="16dp"
app:srcCompat="@drawable/ic_shuffle_white_24dp" /> android:paddingEnd="16dp"
android:text="@string/songs"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:ignore="MissingPrefix"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"/>
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/more_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/songs"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:visibility="gone"
tools:ignore="MissingPrefix"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/more_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"
android:visibility="gone"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/action_shuffle_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_gravity="bottom|end"
app:layout_behavior="code.name.monkey.retromusic.misc.ScrollAwareFABBehavior"
app:srcCompat="@drawable/ic_shuffle_white_24dp"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -1,174 +1,178 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<android.support.design.widget.AppBarLayout <android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/app_bar" android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<android.support.design.widget.CollapsingToolbarLayout <code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:titleEnabled="false">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:layout_collapseMode="parallax">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_artist_image" />
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar48"
app:layout_collapseMode="pin" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:overScrollMode="never" android:background="@android:color/transparent"
app:behavior_overlapTop="24dp" app:layout_collapseMode="parallax">
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:transitionName="@string/transition_artist_image"/>
<View
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@drawable/shadow_down_strong"/>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar48"
app:layout_collapseMode="pin"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_circular_top_corners"
android:elevation="@dimen/card_elevation"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/content" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_bottom_sheet_dialog_fragment" android:maxLines="2"
android:elevation="@dimen/card_elevation" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:orientation="vertical"> tools:ignore="MissingPrefix"
tools:text="Title"/>
<LinearLayout <android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent" android:id="@+id/text"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:gravity="center_vertical" android:layout_height="wrap_content"
android:orientation="horizontal"> android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:ignore="MissingPrefix"
tools:text="Title"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:orientation="vertical"
android:padding="16dp">
<android.support.v7.widget.AppCompatTextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
tools:ignore="MissingPrefix" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:ignore="MissingPrefix"
tools:text="Title" />
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/action_shuffle_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="16dp"
android:layout_weight="0"
android:src="@drawable/ic_shuffle_white_24dp" />
</LinearLayout>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/biography_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/biography"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone"
tools:ignore="MissingPrefix" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/biography"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="4"
android:padding="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:visibility="gone" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/album_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/albums"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?android:attr/textColorPrimary" />
<android.support.v7.widget.RecyclerView
android:id="@+id/album_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/song_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/songs"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?android:attr/textColorPrimary"
tools:ignore="MissingPrefix" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/action_shuffle_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_gravity="center"
android:src="@drawable/ic_shuffle_white_24dp"/>
</LinearLayout>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/biography_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/biography"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone"
tools:ignore="MissingPrefix"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/biography"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:ellipsize="end"
android:maxLines="4"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:visibility="gone"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/album_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/albums"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?android:attr/textColorPrimary"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/album_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/song_title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/songs"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?android:attr/textColorPrimary"
tools:ignore="MissingPrefix"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -6,119 +6,96 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:titleMargin="0dp"
app:titleMarginStart="0dp">
<LinearLayout
android:id="@+id/actions_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<RadioGroup
android:id="@+id/actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/synced_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:padding="8dp"
android:background="@drawable/toggle_outline_buttons"
android:button="@android:color/transparent"
android:gravity="center"
android:text="@string/synced_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
android:textColor="?android:attr/textColorPrimary"/>
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/normal_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:padding="8dp"
android:background="@drawable/toggle_outline_buttons"
android:button="@android:color/transparent"
android:checked="true"
android:gravity="center"
android:text="@string/normal_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"/>
</RadioGroup>
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/edit_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:background="?roundSelector"
app:srcCompat="@drawable/ic_edit_white_24dp"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical"> android:gravity="center_vertical">
<android.support.v7.widget.CardView <code.name.monkey.retromusic.views.IconImageView
android:id="@+id/back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_weight="0"
app:cardElevation="8dp" android:padding="12dp"
app:cardUseCompatPadding="true"> android:src="@drawable/ic_keyboard_backspace_black_24dp"/>
<ImageView
android:id="@+id/image"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="12dp" android:paddingStart="12dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/> android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView <code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
android:id="@+id/text" android:id="@+id/text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/> android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</LinearLayout> </LinearLayout>
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/edit_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="12dp"
android:background="?roundSelector"
app:srcCompat="@drawable/ic_edit_white_24dp"/>
</LinearLayout> </LinearLayout>
<RadioGroup
android:id="@+id/actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:orientation="horizontal">
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/synced_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:padding="8dp"
android:background="@drawable/toggle_outline_buttons"
android:button="@null"
android:checked="true"
android:gravity="center"
android:text="@string/synced_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"/>
<android.support.v7.widget.AppCompatRadioButton
android:id="@+id/normal_lyrics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="4dp"
android:padding="8dp"
android:background="@drawable/toggle_outline_buttons"
android:button="@null"
android:gravity="center"
android:text="@string/normal_lyrics"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"/>
</RadioGroup>
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="8dp" app:cardElevation="8dp"
app:cardUseCompatPadding="true"> app:cardUseCompatPadding="true">
@ -126,8 +103,14 @@
<FrameLayout <FrameLayout
android:id="@+id/gradient_background" android:id="@+id/gradient_background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:background="@drawable/gradient_5">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tint="#80000000"
android:scaleType="centerCrop"/>
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -146,6 +129,17 @@
android:visibility="gone"/> android:visibility="gone"/>
</ScrollView> </ScrollView>
<code.name.monkey.retromusic.views.LyricView
android:id="@+id/lyrics_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:fadeInFadeOut="true"
app:highlightColor="@color/md_white_1000"
app:hint="No Lyrics"
app:hintColor="@color/md_grey_400"
app:lineSpace="15dp"
app:textAlign="left"
app:textSize="18sp"/>
</FrameLayout> </FrameLayout>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
</LinearLayout> </LinearLayout>

View file

@ -1,185 +1,185 @@
<?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:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="12dp"
app:cardElevation="8dp"
app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/gradient_1"
android:orientation="vertical">
<TextView
fontPath="@string/circular_std_black"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardCornerRadius="12dp" android:padding="12dp"
app:cardElevation="8dp" android:text="@string/credit_title"
app:cardPreventCornerOverlap="false" android:textAppearance="@style/TextAppearance.AppCompat.Title"
app:cardUseCompatPadding="true"> android:textColor="@color/md_white_1000"
tools:ignore="MissingPrefix"/>
<LinearLayout
android:id="@+id/marko_name_link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.NetworkImageView
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:url_link="https://avatars2.githubusercontent.com/u/35743654?s=400&amp;u=f8b4a90a352a661625ae71d455a82aaa9bc3316b&amp;v=4"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/gradient_1" android:text="@string/marko_name"
android:orientation="vertical"> android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/md_white_1000"/>
<TextView <android.support.v7.widget.AppCompatTextView
fontPath="@string/circular_std_black" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:alpha="0.85"
android:padding="12dp" android:text="@string/marko_summary"
android:text="@string/credit_title" android:textColor="@color/md_white_1000"/>
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="@color/md_white_1000"
tools:ignore="MissingPrefix" />
<LinearLayout
android:id="@+id/gaurav_singh_link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
android:paddingEnd="0dp"
android:paddingStart="16dp"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.NetworkImageView
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:url_link="https://lh5.googleusercontent.com/-0qqf6WfBmzQ/AAAAAAAAAAI/AAAAAAAACos/W0yAbQwqffU/photo.jpg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="8dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/leo_name"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/md_white_1000" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.85"
android:text="@string/moderator"
android:textColor="@color/md_white_1000" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/leo_link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
android:paddingEnd="0dp"
android:paddingStart="16dp"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.NetworkImageView
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:url_link="https://cdn5.telesco.pe/file/Gnko_d39iKSqzKhsVK53sjUFz_sfLKe_OpxFE9kR-VUEjDbm6SOr8CT09tyI3zhDSuTowqOhNY4nogFx1Z8QbixyZLAWccl94JdX4dqkPrZyHMS9K7xUzq-wgZCoNIbO8_eAnGOy8Gmu3-uzLuQf2u3G7BRIxm5mzqwqGoeX7_V-fcs3Lr6Br7hPFeCHSm1U39I69E3R9ovs-kPfxCpze-riCjD-QhwwOEOfiudx9OmkmLJGvYugX2EpHSBFfNh6WFQEvBAvR6xPrXul3LxZEebH0xwz5HX-bmyuoxdGaW0J4ywDgiiu4I7cfUJe8lKqWwkPQRg8zTtYNiG3MZio7w.jpg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="8dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gaurav_singh_name"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/md_white_1000" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.85"
android:text="@string/moderator"
android:textColor="@color/md_white_1000" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/yt_gaming_link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
android:paddingEnd="0dp"
android:paddingStart="16dp"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.NetworkImageView
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:url_link="https://cdn.discordapp.com/attachments/469540889883181077/471361944385880065/91_98910_29110_20180616_17122501.jpg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="8dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/yt_gaming_name"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/md_white_1000" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.85"
android:text="@string/yt_gaming_summary"
android:textColor="@color/md_white_1000" />
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</android.support.v7.widget.CardView> </LinearLayout>
<android.support.v7.widget.AppCompatTextView <LinearLayout
android:id="@+id/made_text" android:id="@+id/gaurav_singh_link"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:paddingStart="16dp"
android:gravity="center" android:paddingEnd="0dp"
android:padding="16dp" android:background="?attr/rectSelector"
android:text="@string/made_with_love" android:clickable="true"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title" android:focusable="true"
android:textColor="?android:attr/textColorSecondary" android:gravity="center_vertical"
android:textSize="12sp" /> android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.NetworkImageView
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:url_link="https://cdn5.telesco.pe/file/Gnko_d39iKSqzKhsVK53sjUFz_sfLKe_OpxFE9kR-VUEjDbm6SOr8CT09tyI3zhDSuTowqOhNY4nogFx1Z8QbixyZLAWccl94JdX4dqkPrZyHMS9K7xUzq-wgZCoNIbO8_eAnGOy8Gmu3-uzLuQf2u3G7BRIxm5mzqwqGoeX7_V-fcs3Lr6Br7hPFeCHSm1U39I69E3R9ovs-kPfxCpze-riCjD-QhwwOEOfiudx9OmkmLJGvYugX2EpHSBFfNh6WFQEvBAvR6xPrXul3LxZEebH0xwz5HX-bmyuoxdGaW0J4ywDgiiu4I7cfUJe8lKqWwkPQRg8zTtYNiG3MZio7w.jpg"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gaurav_singh_name"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/md_white_1000"/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.85"
android:text="@string/moderator"
android:textColor="@color/md_white_1000"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/yt_gaming_link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:background="?attr/rectSelector"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:orientation="horizontal"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.NetworkImageView
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:url_link="https://cdn.discordapp.com/attachments/469540889883181077/471361944385880065/91_98910_29110_20180616_17122501.jpg"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/yt_gaming_name"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/md_white_1000"/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.85"
android:text="@string/yt_gaming_summary"
android:textColor="@color/md_white_1000"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/made_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="16dp"
android:gravity="center"
android:text="@string/made_with_love"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"/>
</LinearLayout> </LinearLayout>

View file

@ -1,102 +1,102 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout <android.support.design.widget.AppBarLayout
android:id="@+id/appbar" android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
tools:ignore="UnusedAttribute">
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="228dp"
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleGravity="top"
app:expandedTitleMarginStart="16dp"
app:expandedTitleMarginTop="48dp"
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:statusBarScrim="?attr/colorPrimary"
app:titleEnabled="false">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:focusable="true" android:scaleType="centerCrop"
app:layout_collapseMode="pin"
tools:ignore="ContentDescription"/>
<android.support.v7.widget.Toolbar
android:id="@+id/home_toolbar"
style="@style/Toolbar"
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute">
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="228dp"
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleGravity="top"
app:expandedTitleMarginStart="16dp"
app:expandedTitleMarginTop="48dp"
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:statusBarScrim="?attr/colorPrimary"
app:titleEnabled="false">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:layout_collapseMode="pin"
tools:ignore="ContentDescription" />
<android.support.v7.widget.Toolbar
android:id="@+id/home_toolbar"
style="@style/Toolbar"
tools:ignore="UnusedAttribute">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:src="@drawable/ic_search_white_24dp" />
<TextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
tools:ignore="MissingPrefix" />
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/user_image"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="16dp"
android:layout_weight="0"
app:civ_border="false" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/nested_scroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <LinearLayout
android:id="@+id/container" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<code.name.monkey.retromusic.views.IconImageView
android:id="@+id/search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
android:src="@drawable/ic_search_white_24dp"/>
<TextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_bottom_sheet_dialog_fragment" android:layout_weight="1"
android:descendantFocusability="blocksDescendants" android:gravity="center"
android:elevation="@dimen/card_elevation" android:text="@string/app_name"
android:focusable="true" android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:focusableInTouchMode="true" tools:ignore="MissingPrefix"/>
android:orientation="vertical">
<include layout="@layout/abs_playlists" /> <code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/user_image"
<include layout="@layout/home_section_content" /> android:layout_width="36dp"
android:layout_height="36dp"
android:layout_weight="0"
android:layout_marginEnd="16dp"
app:civ_border="false"/>
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </android.support.v7.widget.Toolbar>
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/nested_scroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
android:descendantFocusability="blocksDescendants"
android:elevation="@dimen/card_elevation"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<include layout="@layout/abs_playlists"/>
<include layout="@layout/home_section_content"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -1,63 +1,63 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@android:color/transparent"
android:clickable="true"
android:focusable="false"
android:transitionName="@string/transition_mini_player"
tools:ignore="UnusedAttribute">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="match_parent"
android:background="@android:color/transparent" android:orientation="horizontal">
android:clickable="true"
android:focusable="false"
android:transitionName="@string/transition_mini_player"
tools:ignore="UnusedAttribute">
<LinearLayout <code.name.monkey.retromusic.views.IconImageView
android:layout_width="match_parent" android:id="@+id/mini_player_image"
android:layout_height="match_parent" android:layout_width="24dp"
android:orientation="horizontal"> android:layout_height="24dp"
android:layout_margin="16dp"
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"
app:srcCompat="@drawable/ic_keyboard_arrow_up_24dp"
tools:ignore="ContentDescription"/>
<code.name.monkey.retromusic.views.IconImageView <TextView
android:id="@+id/mini_player_image" android:id="@+id/mini_player_title"
android:layout_width="24dp" android:layout_width="0dp"
android:layout_height="24dp" android:layout_height="match_parent"
android:layout_gravity="center_vertical" android:layout_weight="1"
android:layout_margin="16dp" android:layout_marginStart="16dp"
android:scaleType="centerCrop" android:layout_marginEnd="16dp"
app:srcCompat="@drawable/ic_keyboard_arrow_up_24dp" android:layout_marginLeft="16dp"
tools:ignore="ContentDescription" /> android:layout_marginRight="16dp"
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView <code.name.monkey.retromusic.views.IconImageView
android:id="@+id/mini_player_title" android:id="@+id/mini_player_play_pause_button"
android:layout_width="0dp" android:layout_width="40dp"
android:layout_height="match_parent" android:layout_height="40dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp" android:layout_marginRight="16dp"
android:layout_marginRight="16dp" android:layout_gravity="center_vertical"
android:layout_marginStart="16dp" android:scaleType="center"
android:layout_weight="1" tools:ignore="ContentDescription"/>
android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<code.name.monkey.retromusic.views.IconImageView </LinearLayout>
android:id="@+id/mini_player_play_pause_button"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:scaleType="center"
tools:ignore="ContentDescription" />
</LinearLayout> <me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress_bar"
<me.zhanghai.android.materialprogressbar.MaterialProgressBar style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
android:id="@+id/progress_bar" android:layout_width="match_parent"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal" android:layout_height="3dp"
android:layout_width="match_parent" android:progress="20"
android:layout_height="3dp" app:mpb_progressStyle="horizontal"
android:progress="20" app:mpb_showProgressBackground="false"
app:mpb_progressStyle="horizontal" app:mpb_useIntrinsicPadding="false"/>
app:mpb_showProgressBackground="false"
app:mpb_useIntrinsicPadding="false" />
</FrameLayout> </FrameLayout>

View file

@ -1,146 +1,157 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/background" android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="ContentDescription">
<RelativeLayout
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/content"
android:layout_alignParentEnd="true">
<ImageView
android:id="@+id/largeIcon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
tools:src="@drawable/hemanth_s"/>
<ImageView
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image"
tools:tint="@color/md_black_1000"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginEnd="48dp"
android:paddingTop="6dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/smallIcon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="8dp"
tools:src="@drawable/ic_audiotrack_black_24dp"
tools:tint="@color/md_black_1000"/>
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="12sp"
tools:text="@string/app_name"/>
<ImageView
android:id="@+id/arrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="2dp"
android:scaleType="centerInside"
android:src="@drawable/ic_keyboard_arrow_down_black_24dp"
android:tint="@color/md_black_1000"
tools:ignore="VectorDrawableCompat"/>
</LinearLayout>
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:ignore="ContentDescription"> android:layout_alignParentStart="true"
android:layout_below="@id/app"
android:layout_toStartOf="@id/actions"
android:paddingBottom="12dp"
android:paddingStart="0dp"
android:paddingEnd="12dp"
android:orientation="vertical">
<RelativeLayout <TextView
android:id="@+id/image" android:id="@+id/title"
android:layout_width="match_parent" android:textStyle="bold"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:layout_alignBottom="@+id/content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"> android:paddingStart="16dp"
android:paddingEnd="0dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<ImageView <TextView
android:id="@+id/largeIcon" android:id="@+id/subtitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:paddingStart="16dp"
android:adjustViewBounds="true" android:paddingEnd="0dp"
android:scaleType="fitCenter" /> android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<ImageView </LinearLayout>
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image" />
</RelativeLayout> <LinearLayout
android:id="@+id/actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="48dp"
android:layout_alignBottom="@id/content"
android:layout_alignParentEnd="true"
android:layout_alignTop="@id/content"
android:layout_gravity="bottom"
android:orientation="horizontal">
<LinearLayout <ImageView
android:id="@+id/app" android:id="@+id/action_prev"
android:layout_width="wrap_content" android:layout_width="42dp"
android:layout_height="wrap_content" android:layout_height="42dp"
android:layout_marginBottom="4dp" android:scaleType="centerInside"/>
android:layout_marginEnd="48dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingEnd="8dp"
android:paddingStart="8dp"
android:paddingTop="6dp">
<ImageView <ImageView
android:id="@+id/smallIcon" android:id="@+id/action_play_pause"
android:layout_width="16dp" android:layout_width="42dp"
android:layout_height="16dp" android:layout_height="42dp"
android:scaleType="centerInside" /> android:scaleType="centerInside"/>
<TextView <ImageView
android:id="@+id/appName" android:id="@+id/action_next"
android:layout_width="wrap_content" android:layout_width="42dp"
android:layout_height="wrap_content" android:layout_height="42dp"
android:layout_marginStart="4dp" android:scaleType="centerInside"/>
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="12sp" />
<ImageView <ImageView
android:id="@+id/arrow" android:id="@+id/action_quit"
android:layout_width="16dp" android:layout_width="42dp"
android:layout_height="16dp" android:layout_height="42dp"
android:layout_marginStart="2dp" android:scaleType="centerInside"
android:scaleType="centerInside" android:visibility="gone"/>
android:src="@drawable/ic_keyboard_arrow_down_black_24dp"
tools:ignore="VectorDrawableCompat" />
</LinearLayout> <ImageView
android:id="@+id/fifth"
<LinearLayout android:layout_width="42dp"
android:id="@+id/content" android:layout_height="42dp"
android:layout_width="match_parent" android:scaleType="centerInside"/>
android:layout_height="match_parent" </LinearLayout>
android:layout_alignParentStart="true"
android:layout_below="@id/app"
android:layout_toStartOf="@id/actions"
android:orientation="vertical"
android:paddingBottom="2dp"
android:paddingEnd="12dp"
android:paddingStart="8dp">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_gravity="bottom"
android:layout_marginEnd="48dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/action_prev"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_play_pause"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_next"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_quit"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside"
android:visibility="gone" />
<ImageView
android:id="@+id/fifth"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
</LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -1,130 +1,135 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/background" android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent"
android:layout_alignBottom="@+id/content"
android:layout_alignParentEnd="true">
<RelativeLayout <ImageView
android:id="@+id/image" android:id="@+id/largeIcon"
android:layout_width="match_parent" android:layout_width="@dimen/notification_big_image_size"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignBottom="@+id/content" android:layout_alignParentEnd="true"
android:layout_alignParentEnd="true"> android:layout_centerVertical="true"
android:scaleType="centerCrop"
tools:src="@drawable/hemanth_s"/>
<ImageView <ImageView
android:id="@+id/largeIcon" android:id="@+id/foregroundImage"
android:layout_width="@dimen/notification_big_image_size" android:layout_width="96dp"
android:layout_height="@dimen/notification_big_image_size" android:layout_height="match_parent"
android:layout_alignParentEnd="true" android:layout_alignStart="@id/largeIcon"
android:layout_centerVertical="true" android:src="@drawable/background_image"
android:scaleType="centerCrop" /> tools:tint="@color/md_black_1000"/>
<ImageView </RelativeLayout>
android:id="@+id/foregroundImage"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignStart="@id/largeIcon"
android:src="@drawable/background_image" />
</RelativeLayout> <LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:paddingTop="8dp"
android:paddingBottom="12dp"
android:paddingStart="0dp"
android:paddingEnd="144dp"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/content" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/smallIcon"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="8dp"
tools:src="@drawable/ic_audiotrack_black_24dp"
tools:tint="@color/md_black_1000"/>
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_marginStart="4dp"
android:orientation="vertical" android:ellipsize="end"
android:paddingEnd="144dp" android:lines="1"
android:paddingStart="8dp" android:singleLine="true"
android:paddingTop="8dp"> android:textSize="13sp"
tools:text="@string/app_name"/>
<LinearLayout <ImageView
android:layout_width="wrap_content" android:id="@+id/arrow"
android:layout_height="wrap_content" android:layout_width="16dp"
android:layout_marginBottom="4dp" android:layout_height="16dp"
android:gravity="center_vertical" android:layout_marginStart="2dp"
android:orientation="horizontal"> android:scaleType="centerInside"
android:src="@drawable/ic_keyboard_arrow_up_24dp"
tools:ignore="VectorDrawableCompat"/>
<ImageView
android:id="@+id/smallIcon"
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="centerInside" />
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
android:textSize="11sp" />
<ImageView
android:id="@+id/arrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="2dp"
android:scaleType="centerInside"
android:src="@drawable/ic_keyboard_arrow_up_24dp"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:paddingEnd="0dp"
android:paddingStart="8dp"
android:singleLine="true"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:paddingEnd="0dp"
android:paddingStart="8dp"
android:singleLine="true"
android:textSize="12sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/action_prev"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_play_pause"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_next"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
<ImageView
android:id="@+id/action_quit"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/title"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:ellipsize="end"
android:lines="1"
android:singleLine="true"
tools:text="@string/title_dashboard"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/action_prev"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside"/>
<ImageView
android:id="@+id/action_play_pause"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside"/>
<ImageView
android:id="@+id/action_next"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside"/>
<ImageView
android:id="@+id/action_quit"
android:layout_width="42dp"
android:layout_height="42dp"
android:scaleType="centerInside"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,30 +1,44 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<attr name="roundSelector" format="reference" /> <attr format="reference" name="roundSelector"/>
<attr name="rectSelector" format="reference" /> <attr format="reference" name="rectSelector"/>
<attr name="rectSelectorStrong" format="reference" /> <attr format="reference" name="rectSelectorStrong"/>
<attr name="defaultFooterColor" format="color" /> <attr format="color" name="defaultFooterColor"/>
<attr name="toolbarPopupTheme" format="reference" /> <attr format="reference" name="toolbarPopupTheme"/>
<attr name="iconColor" format="color" /> <attr format="color" name="iconColor"/>
<attr name="dividerColor" format="color" /> <attr format="color" name="dividerColor"/>
<declare-styleable name="RoundCornerFrameLayout"> <declare-styleable name="RoundCornerFrameLayout">
<attr name="corner_radius" format="dimension" /> <attr format="dimension" name="corner_radius"/>
</declare-styleable> </declare-styleable>
<declare-styleable name="BlurLayout"> <declare-styleable name="BlurLayout">
<attr name="blk_downscaleFactor" format="float" /> <attr format="float" name="blk_downscaleFactor"/>
<attr name="blk_blurRadius" format="integer" /> <attr format="integer" name="blk_blurRadius"/>
<attr name="blk_fps" format="integer" /> <attr format="integer" name="blk_fps"/>
<attr name="blk_cornerRadius" format="dimension" /> <attr format="dimension" name="blk_cornerRadius"/>
</declare-styleable> </declare-styleable>
<declare-styleable name="NetworkImageView">
<attr name="url_link" format="string"/>
</declare-styleable>
<declare-styleable name="NetworkImageView">
<attr format="string" name="url_link"/>
</declare-styleable>
<declare-styleable name="LyricView">
<attr format="string" name="hint"/>
<attr format="color" name="hintColor"/>
<attr format="color" name="textColor"/>
<attr format="color" name="highlightColor"/>
<attr format="dimension" name="textSize"/>
<attr format="dimension" name="maxLength"/>
<attr format="boolean" name="fadeInFadeOut"/>
<attr format="dimension" name="lineSpace"/>
<attr name="textAlign">
<enum name="left" value="0"/>
<enum name="center" value="1"/>
<enum name="right" value="2"/>
</attr>
</declare-styleable>
</resources> </resources>

View file

@ -38,8 +38,8 @@
<string name="circular_std_book" translatable="false">fonts/circular_std_book.otf</string> <string name="circular_std_book" translatable="false">fonts/circular_std_book.otf</string>
<string name="sans_regular" translatable="false">fonts/product_sans_regular.ttf</string> <string name="sans_regular" translatable="false">fonts/product_sans_regular.ttf</string>
<string name="sans_bold" translatable="false">fonts/product_sans_bold.ttf</string> <string name="sans_bold" translatable="false">fonts/product_sans_bold.ttf</string>
<string name="leo_name" translatable="false">Leo</string> <string name="marko_name" translatable="false">Marko Ivanović </string>
<string name="leo_summary" translatable="false">Moderator</string> <string name="marko_summary" translatable="false">Contributor</string>
<string name="yt_gaming_name" translatable="false">Gaming Inc</string> <string name="yt_gaming_name" translatable="false">Gaming Inc</string>
<string name="yt_gaming_summary" translatable="false">Discord server maintainer</string> <string name="yt_gaming_summary" translatable="false">Discord server maintainer</string>
<string name="moderator" translatable="false">Moderator</string> <string name="moderator" translatable="false">Moderator</string>

View file

@ -401,10 +401,10 @@
<string name="pref_summary_ignore_media_store_artwork">Can increase the album cover quality, but causes slower image loading times. Only enable this if you have problems with low resolution artworks</string> <string name="pref_summary_ignore_media_store_artwork">Can increase the album cover quality, but causes slower image loading times. Only enable this if you have problems with low resolution artworks</string>
<string name="pref_summary_language_en">Change app language forcefully to english(this is testing for multiple language option)</string> <string name="pref_summary_language_en">Change app language forcefully to english(this is testing for multiple language option)</string>
<string name="pref_summary_library_categories">Configure visibility and order of library categories.</string> <string name="pref_summary_library_categories">Configure visibility and order of library categories.</string>
<string name="pref_summary_lock_screen">Use Retro Music's custom lockscreen controls</string> <string name="pref_summary_lock_screen">Use Retro Music\'s custom lockscreen controls</string>
<string name="pref_summary_lock_screen_app">Show full controls from the lock screen</string> <string name="pref_summary_lock_screen_app">Show full controls from the lock screen</string>
<string name="pref_summary_open_source_licences">License details for open source software</string> <string name="pref_summary_open_source_licences">License details for open source software</string>
<string name="pref_summary_round_corners">Round the app's edges</string> <string name="pref_summary_round_corners">Round the app\'s edges</string>
<string name="pref_summary_tab_titles">Toggle titles for the bottom navigation bar tabs</string> <string name="pref_summary_tab_titles">Toggle titles for the bottom navigation bar tabs</string>
<string name="pref_summary_toggle_animations">Animations makes some device run slow, load images slow</string> <string name="pref_summary_toggle_animations">Animations makes some device run slow, load images slow</string>
<string name="pref_summary_toggle_bottom_bar_titles">Disable titles from bottom navigation bar</string> <string name="pref_summary_toggle_bottom_bar_titles">Disable titles from bottom navigation bar</string>

View file

@ -15,9 +15,9 @@
android:title="@string/pref_title_toggle_toggle_shuffle" /> android:title="@string/pref_title_toggle_toggle_shuffle" />
<android.support.v7.preference.SeekBarPreference <android.support.v7.preference.SeekBarPreference
android:defaultValue="0" android:defaultValue="12"
android:key="blur_amount" android:key="new_blur_amount"
android:max="255" android:max="25"
android:summary="@string/pref_blur_amount_summary" android:summary="@string/pref_blur_amount_summary"
android:title="@string/pref_blur_amount_title" /> android:title="@string/pref_blur_amount_title" />