1.7.100
This commit is contained in:
parent
3d2adc1ca2
commit
c648dcb378
84 changed files with 6018 additions and 5405 deletions
|
@ -133,6 +133,7 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-libraries" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-libraries" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/checkNormalDebugClasspath" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
|
||||||
|
@ -141,18 +142,14 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-apk" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-apk" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_main_apk_resources" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_main_apk_resources" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_merged_manifests" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_merged_manifests" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_split_apk_resources" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/linked_res_for_bundle" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged-not-compiled-resources" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/module_bundle" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
|
||||||
|
|
|
@ -11,8 +11,8 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 207
|
versionCode 209
|
||||||
versionName '1.7.10'
|
versionName '1.7.100'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ static def getProperty(Properties properties, String name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static def getDate() {
|
static def getDate() {
|
||||||
new Date().format('yyyyMMdd')
|
new Date().format('MMdd')
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -26,7 +26,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="padding: 1.0rem 0.5rem 2.5rem 0.5rem;">
|
<body style="padding: 1.0rem 0.5rem 1.0rem 0.5rem;">
|
||||||
<p><b><a href="https://github.com/kabouzeid/Phonograph" title="Phonograph"> Phonograph</a></b> by Karim Abou Zeid</p>
|
<p><b><a href="https://github.com/kabouzeid/Phonograph" title="Phonograph"> Phonograph</a></b> by Karim Abou Zeid</p>
|
||||||
<p><b><a href="https://github.com/ReactiveX/RxAndroid" title="RxAndroid"> RxAndroid</a></b> by RxAndroid authors</p>
|
<p><b><a href="https://github.com/ReactiveX/RxAndroid" title="RxAndroid"> RxAndroid</a></b> by RxAndroid authors</p>
|
||||||
<p><b><a href="https://github.com/ReactiveX/RxAndroid" title="RxJava"> RxJava</a></b> by RxJava authors</p>
|
<p><b><a href="https://github.com/ReactiveX/RxAndroid" title="RxJava"> RxJava</a></b> by RxJava authors</p>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
{style-placeholder}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ol {
list-style-position: inside;
padding-left: 0;
padding-right: 0;
}
li {
padding-top: 8px;
}
</style>
</head>
<body>
<p>You can view the changelog dialog again at any time from the <i>about</i> section.</p>
<h3>Version 1.7.50</h3>
<ol>
<li><b>Fix:</b> Playlist renaming</li>
<li><b>Improvement:</b> Version naming</li>
<li><b>Added:</b> Changelog dialog</li>
<li><b>Added:</b> Home banner toggle.</li>
<li><b>Improvement:</b> Grammatical mistakes</li>
</ol>
</body>
|
<html>
<head>
<style type="text/css">
* {
word-wrap: break-word;
}
{style-placeholder}
a {
color: #{link-color};
}
a:active {
color: #{link-color-active};
}
ol {
list-style-position: inside;
padding-left: 0;
padding-right: 0;
}
li {
padding-top: 8px;
}
</style>
</head>
<body>
<p>You can view the changelog dialog again at any time from the <i>about</i> section.</p>
<h3>Version 1.7.100</h3>
<ol>
<li><b>Fix:</b> same theme follows entire app </li>
<li><b>Added:</b> Volume toggle for lock screen to support small screen </li>
<li><b>Added:</b> Volume toggle for lock screen to support small screen </li>
</ol>
<h3>Version 1.7.50</h3>
<ol>
<li><b>Fix:</b> Playlist renaming</li>
<li><b>Improvement:</b> Version naming</li>
<li><b>Added:</b> Changelog dialog</li>
<li><b>Added:</b> Home banner toggle.</li>
<li><b>Improvement:</b> Grammatical mistakes</li>
</ol>
</body>
|
|
@ -110,7 +110,8 @@ public class HomeOptionDialog extends RoundedBottomSheetDialogFragment {
|
||||||
if (mainActivity == null) {
|
if (mainActivity == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mainActivity.setCurrentFragment(FoldersFragment.newInstance(getContext()), true);
|
mainActivity.setCurrentFragment(FoldersFragment.newInstance(getContext()), true,
|
||||||
|
FoldersFragment.TAG);
|
||||||
break;
|
break;
|
||||||
case R.id.action_settings:
|
case R.id.action_settings:
|
||||||
NavigationUtil.goToSettings(getActivity());
|
NavigationUtil.goToSettings(getActivity());
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
package code.name.monkey.retromusic.loaders;
|
package code.name.monkey.retromusic.loaders;
|
||||||
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.model.Playlist;
|
import code.name.monkey.retromusic.model.Playlist;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist;
|
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.HistoryPlaylist;
|
import code.name.monkey.retromusic.model.smartplaylist.HistoryPlaylist;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist;
|
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.MyTopTracksPlaylist;
|
import code.name.monkey.retromusic.model.smartplaylist.MyTopTracksPlaylist;
|
||||||
import io.reactivex.Observable;
|
import io.reactivex.Observable;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class HomeLoader {
|
public class HomeLoader {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package code.name.monkey.retromusic.model;
|
package code.name.monkey.retromusic.model;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist;
|
import android.support.annotation.StringRes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -10,41 +10,20 @@ import java.util.ArrayList;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Home {
|
public class Home {
|
||||||
public String sectionTitle;
|
|
||||||
public ArrayList<Object> list;
|
|
||||||
public AbsSmartPlaylist playlist;
|
|
||||||
|
|
||||||
public Home(String sectionTitle, AbsSmartPlaylist playlist) {
|
private int sectionTitle;
|
||||||
this.sectionTitle = sectionTitle;
|
private ArrayList list;
|
||||||
this.playlist = playlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Home(String sectionTitle, ArrayList<Object> list) {
|
public Home(@StringRes int sectionTitle, ArrayList list) {
|
||||||
this.sectionTitle = sectionTitle;
|
this.sectionTitle = sectionTitle;
|
||||||
this.list = list;
|
this.list = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Home(AbsSmartPlaylist playlist) {
|
public int getSectionTitle() {
|
||||||
this.playlist = playlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AbsSmartPlaylist getPlaylist() {
|
|
||||||
return playlist;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "Home{" +
|
|
||||||
"sectionTitle='" + sectionTitle + '\'' +
|
|
||||||
", songs=" + list +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSectionTitle() {
|
|
||||||
return sectionTitle;
|
return sectionTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Object> getList() {
|
public ArrayList getList() {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
package code.name.monkey.retromusic.mvp.contract;
|
package code.name.monkey.retromusic.mvp.contract;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.model.Album;
|
import code.name.monkey.retromusic.model.Album;
|
||||||
import code.name.monkey.retromusic.model.Artist;
|
import code.name.monkey.retromusic.model.Artist;
|
||||||
import code.name.monkey.retromusic.model.Genre;
|
import code.name.monkey.retromusic.model.Genre;
|
||||||
import code.name.monkey.retromusic.model.Playlist;
|
import code.name.monkey.retromusic.model.Playlist;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist;
|
|
||||||
import code.name.monkey.retromusic.mvp.BasePresenter;
|
import code.name.monkey.retromusic.mvp.BasePresenter;
|
||||||
import code.name.monkey.retromusic.mvp.BaseView;
|
import code.name.monkey.retromusic.mvp.BaseView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public interface HomeContract {
|
public interface HomeContract {
|
||||||
|
|
||||||
interface HomeView extends BaseView<ArrayList<Object>> {
|
interface HomeView extends BaseView<ArrayList<Object>> {
|
||||||
|
|
|
@ -2,12 +2,11 @@ package code.name.monkey.retromusic.providers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.RetroApplication;
|
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.Injection;
|
import code.name.monkey.retromusic.Injection;
|
||||||
|
import code.name.monkey.retromusic.RetroApplication;
|
||||||
import code.name.monkey.retromusic.loaders.AlbumLoader;
|
import code.name.monkey.retromusic.loaders.AlbumLoader;
|
||||||
import code.name.monkey.retromusic.loaders.ArtistLoader;
|
import code.name.monkey.retromusic.loaders.ArtistLoader;
|
||||||
import code.name.monkey.retromusic.loaders.GenreLoader;
|
import code.name.monkey.retromusic.loaders.GenreLoader;
|
||||||
|
@ -23,6 +22,7 @@ import code.name.monkey.retromusic.model.Artist;
|
||||||
import code.name.monkey.retromusic.model.Genre;
|
import code.name.monkey.retromusic.model.Genre;
|
||||||
import code.name.monkey.retromusic.model.Playlist;
|
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.smartplaylist.AbsSmartPlaylist;
|
||||||
import code.name.monkey.retromusic.providers.interfaces.Repository;
|
import code.name.monkey.retromusic.providers.interfaces.Repository;
|
||||||
import code.name.monkey.retromusic.rest.model.KuGouRawLyric;
|
import code.name.monkey.retromusic.rest.model.KuGouRawLyric;
|
||||||
import code.name.monkey.retromusic.rest.model.KuGouSearchLyricResult;
|
import code.name.monkey.retromusic.rest.model.KuGouSearchLyricResult;
|
||||||
|
@ -39,7 +39,7 @@ public class RepositoryImpl implements Repository {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized RepositoryImpl getInstance( ) {
|
public static synchronized RepositoryImpl getInstance() {
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
INSTANCE = new RepositoryImpl(RetroApplication.getInstance());
|
INSTANCE = new RepositoryImpl(RetroApplication.getInstance());
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
|
||||||
import android.support.v4.app.ShareCompat;
|
import android.support.v4.app.ShareCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -40,11 +39,16 @@ public class AboutActivity extends AbsBaseActivity {
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
|
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
View background;
|
View background;
|
||||||
|
|
||||||
@BindView(R.id.app_version)
|
@BindView(R.id.app_version)
|
||||||
TextView appVersion;
|
TextView appVersion;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -62,7 +66,7 @@ public class AboutActivity extends AbsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
return true;
|
return true;
|
||||||
|
@ -71,13 +75,13 @@ public class AboutActivity extends AbsBaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpToolbar() {
|
private void setUpToolbar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
|
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
|
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||||
setTitle(null);
|
setTitle(null);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
//noinspection ConstantConditions
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,7 +95,7 @@ public class AboutActivity extends AbsBaseActivity {
|
||||||
|
|
||||||
@OnClick({R.id.app_github, R.id.faq_link, R.id.app_google_plus, R.id.app_translation,
|
@OnClick({R.id.app_github, R.id.faq_link, R.id.app_google_plus, R.id.app_translation,
|
||||||
R.id.app_rate, R.id.app_share, R.id.instagram_link, R.id.twitter_link, R.id.changelog,
|
R.id.app_rate, R.id.app_share, R.id.instagram_link, R.id.twitter_link, R.id.changelog,
|
||||||
R.id.open_source, R.id.discord_link, R.id.telegram_link})
|
R.id.open_source, R.id.discord_link, R.id.telegram_link, R.id.donate_link})
|
||||||
public void onViewClicked(View view) {
|
public void onViewClicked(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.faq_link:
|
case R.id.faq_link:
|
||||||
|
|
|
@ -86,9 +86,6 @@ public class AlbumDetailsActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
@Nullable
|
@Nullable
|
||||||
AppBarLayout appBarLayout;
|
AppBarLayout appBarLayout;
|
||||||
@BindView(R.id.image_container)
|
|
||||||
@Nullable
|
|
||||||
View imageContainer;
|
|
||||||
@BindView(R.id.content)
|
@BindView(R.id.content)
|
||||||
View contentContainer;
|
View contentContainer;
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
|
|
|
@ -25,6 +25,12 @@ import android.view.ViewGroup.LayoutParams;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
|
@ -54,9 +60,6 @@ import code.name.monkey.retromusic.util.DensityUtil;
|
||||||
import code.name.monkey.retromusic.util.MusicUtil;
|
import code.name.monkey.retromusic.util.MusicUtil;
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroUtil;
|
import code.name.monkey.retromusic.util.RetroUtil;
|
||||||
import com.bumptech.glide.Glide;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Locale;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
@ -66,6 +69,13 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
|
|
||||||
public static final String EXTRA_ARTIST_ID = "extra_artist_id";
|
public static final String EXTRA_ARTIST_ID = "extra_artist_id";
|
||||||
private static final int REQUEST_CODE_SELECT_IMAGE = 9003;
|
private static final int REQUEST_CODE_SELECT_IMAGE = 9003;
|
||||||
|
@BindView(R.id.app_bar)
|
||||||
|
@Nullable
|
||||||
|
AppBarLayout appBarLayout;
|
||||||
|
@BindView(R.id.collapsing_toolbar)
|
||||||
|
@Nullable
|
||||||
|
CollapsingToolbarLayout collapsingToolbarLayout;
|
||||||
|
|
||||||
@BindView(R.id.image)
|
@BindView(R.id.image)
|
||||||
ImageView image;
|
ImageView image;
|
||||||
@BindView(R.id.biography)
|
@BindView(R.id.biography)
|
||||||
|
@ -86,12 +96,6 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
TextView text;
|
TextView text;
|
||||||
@BindView(R.id.action_shuffle_all)
|
@BindView(R.id.action_shuffle_all)
|
||||||
FloatingActionButton shuffleButton;
|
FloatingActionButton shuffleButton;
|
||||||
@BindView(R.id.collapsing_toolbar)
|
|
||||||
@Nullable
|
|
||||||
CollapsingToolbarLayout collapsingToolbarLayout;
|
|
||||||
@BindView(R.id.app_bar)
|
|
||||||
@Nullable
|
|
||||||
AppBarLayout appBarLayout;
|
|
||||||
@BindView(R.id.gradient_background)
|
@BindView(R.id.gradient_background)
|
||||||
@Nullable
|
@Nullable
|
||||||
View background;
|
View background;
|
||||||
|
|
|
@ -15,6 +15,7 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
@ -31,28 +32,37 @@ public class EqualizerActivity extends AbsMusicServiceActivity implements
|
||||||
|
|
||||||
@BindView(R.id.equalizer)
|
@BindView(R.id.equalizer)
|
||||||
SwitchCompat mEnable;
|
SwitchCompat mEnable;
|
||||||
|
|
||||||
@BindView(R.id.content)
|
@BindView(R.id.content)
|
||||||
LinearLayout mContent;
|
LinearLayout mContent;
|
||||||
|
|
||||||
@BindView(R.id.bands)
|
@BindView(R.id.bands)
|
||||||
LinearLayout mLinearLayout;
|
LinearLayout mLinearLayout;
|
||||||
|
|
||||||
@BindView(R.id.bass_boost_strength)
|
@BindView(R.id.bass_boost_strength)
|
||||||
SeekBar mBassBoostStrength;
|
SeekBar mBassBoostStrength;
|
||||||
|
|
||||||
@BindView(R.id.virtualizer_strength)
|
@BindView(R.id.virtualizer_strength)
|
||||||
SeekBar mVirtualizerStrength;
|
SeekBar mVirtualizerStrength;
|
||||||
|
|
||||||
@BindView(R.id.bass_boost)
|
@BindView(R.id.bass_boost)
|
||||||
TextView mBassBoost;
|
TextView mBassBoost;
|
||||||
|
|
||||||
@BindView(R.id.virtualizer)
|
@BindView(R.id.virtualizer)
|
||||||
TextView mVirtualizer;
|
TextView mVirtualizer;
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar mToolbar;
|
Toolbar mToolbar;
|
||||||
|
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout mAppBar;
|
AppBarLayout mAppBar;
|
||||||
|
|
||||||
@BindView(R.id.presets)
|
@BindView(R.id.presets)
|
||||||
Spinner mPresets;
|
Spinner mPresets;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView mTitle;
|
||||||
|
|
||||||
private CompoundButton.OnCheckedChangeListener mListener = (buttonView, isChecked) -> {
|
private CompoundButton.OnCheckedChangeListener mListener = (buttonView, isChecked) -> {
|
||||||
switch (buttonView.getId()) {
|
switch (buttonView.getId()) {
|
||||||
case R.id.equalizer:
|
case R.id.equalizer:
|
||||||
|
@ -101,19 +111,7 @@ public class EqualizerActivity extends AbsMusicServiceActivity implements
|
||||||
setTaskDescriptionColorAuto();
|
setTaskDescriptionColorAuto();
|
||||||
setLightNavigationBar(true);
|
setLightNavigationBar(true);
|
||||||
|
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
setupToolbar();
|
||||||
mToolbar.setBackgroundColor(primaryColor);
|
|
||||||
mAppBar.setBackgroundColor(primaryColor);
|
|
||||||
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
onBackPressed();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mToolbar.setTitle(R.string.equalizer);
|
|
||||||
setSupportActionBar(mToolbar);
|
|
||||||
//noinspection ConstantConditions
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
mEnable.setChecked(EqualizerHelper.getInstance().getEqualizer().getEnabled());
|
mEnable.setChecked(EqualizerHelper.getInstance().getEqualizer().getEnabled());
|
||||||
mEnable.setOnCheckedChangeListener(mListener);
|
mEnable.setOnCheckedChangeListener(mListener);
|
||||||
|
@ -136,9 +134,20 @@ public class EqualizerActivity extends AbsMusicServiceActivity implements
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupToolbar() {
|
||||||
|
mTitle.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
|
mToolbar.setBackgroundColor(primaryColor);
|
||||||
|
mAppBar.setBackgroundColor(primaryColor);
|
||||||
|
mToolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
|
mToolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||||
|
setSupportActionBar(mToolbar);
|
||||||
|
setTitle(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPresets() {
|
private void addPresets() {
|
||||||
|
|
|
@ -3,7 +3,6 @@ package code.name.monkey.retromusic.ui.activities;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.v7.widget.DefaultItemAnimator;
|
import android.support.v7.widget.DefaultItemAnimator;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
|
@ -18,7 +17,6 @@ import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.afollestad.materialcab.MaterialCab;
|
import com.afollestad.materialcab.MaterialCab;
|
||||||
import code.name.monkey.retromusic.ui.activities.base.AbsSlidingMusicPanelActivity;
|
|
||||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -39,6 +37,7 @@ import code.name.monkey.retromusic.model.Genre;
|
||||||
import code.name.monkey.retromusic.model.Song;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
import code.name.monkey.retromusic.mvp.contract.GenreDetailsContract;
|
import code.name.monkey.retromusic.mvp.contract.GenreDetailsContract;
|
||||||
import code.name.monkey.retromusic.mvp.presenter.GenreDetailsPresenter;
|
import code.name.monkey.retromusic.mvp.presenter.GenreDetailsPresenter;
|
||||||
|
import code.name.monkey.retromusic.ui.activities.base.AbsSlidingMusicPanelActivity;
|
||||||
import code.name.monkey.retromusic.ui.adapter.song.SongAdapter;
|
import code.name.monkey.retromusic.ui.adapter.song.SongAdapter;
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroUtil;
|
import code.name.monkey.retromusic.util.RetroUtil;
|
||||||
|
@ -72,8 +71,8 @@ public class GenreDetailsActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout appBarLayout;
|
AppBarLayout appBarLayout;
|
||||||
|
|
||||||
@BindView(R.id.collapsing_toolbar)
|
@BindView(R.id.title)
|
||||||
CollapsingToolbarLayout toolbarLayout;
|
TextView title;
|
||||||
|
|
||||||
private Genre genre;
|
private Genre genre;
|
||||||
private GenreDetailsPresenter presenter;
|
private GenreDetailsPresenter presenter;
|
||||||
|
@ -101,7 +100,6 @@ public class GenreDetailsActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
|
|
||||||
RetroUtil.statusBarHeight(statusBar);
|
RetroUtil.statusBarHeight(statusBar);
|
||||||
|
|
||||||
|
|
||||||
genre = getIntent().getParcelableExtra(EXTRA_GENRE_ID);
|
genre = getIntent().getParcelableExtra(EXTRA_GENRE_ID);
|
||||||
presenter = new GenreDetailsPresenter(this, genre.id);
|
presenter = new GenreDetailsPresenter(this, genre.id);
|
||||||
|
|
||||||
|
@ -119,14 +117,14 @@ public class GenreDetailsActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpToolBar() {
|
private void setUpToolBar() {
|
||||||
|
title.setText(genre.name);
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
|
setTitle(null);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
//noinspection ConstantConditions
|
|
||||||
getSupportActionBar().setTitle(genre.name);
|
|
||||||
setTitle(R.string.app_name);
|
|
||||||
|
|
||||||
appBarLayout.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
appBarLayout.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -140,7 +138,6 @@ public class GenreDetailsActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
color = ATHUtil.resolveColor(GenreDetailsActivity.this, android.R.attr.textColorPrimary);
|
color = ATHUtil.resolveColor(GenreDetailsActivity.this, android.R.attr.textColorPrimary);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
toolbarLayout.setExpandedTitleColor(color);
|
|
||||||
ToolbarContentTintHelper.colorizeToolbar(toolbar, color, GenreDetailsActivity.this);
|
ToolbarContentTintHelper.colorizeToolbar(toolbar, color, GenreDetailsActivity.this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -267,6 +264,4 @@ public class GenreDetailsActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
super.onMediaStoreChanged();
|
super.onMediaStoreChanged();
|
||||||
presenter.subscribe();
|
presenter.subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
@ -15,11 +17,16 @@ import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity;
|
||||||
public class LicenseActivity extends AbsBaseActivity {
|
public class LicenseActivity extends AbsBaseActivity {
|
||||||
@BindView(R.id.license)
|
@BindView(R.id.license)
|
||||||
WebView mLicense;
|
WebView mLicense;
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar mToolbar;
|
Toolbar mToolbar;
|
||||||
@BindView(R.id.appbar)
|
|
||||||
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout mAppbar;
|
AppBarLayout mAppbar;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
@ -42,11 +49,12 @@ public class LicenseActivity extends AbsBaseActivity {
|
||||||
|
|
||||||
mLicense.loadUrl("file:///android_asset/index.html");
|
mLicense.loadUrl("file:///android_asset/index.html");
|
||||||
|
|
||||||
mToolbar.setTitle(R.string.licenses);
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
mToolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
mToolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
mToolbar.setNavigationOnClickListener(view -> onBackPressed());
|
mToolbar.setNavigationOnClickListener(view -> onBackPressed());
|
||||||
mToolbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
mToolbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
||||||
mAppbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
mAppbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
||||||
|
setTitle(null);
|
||||||
setSupportActionBar(mToolbar);
|
setSupportActionBar(mToolbar);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -155,14 +155,16 @@ public class MainActivity extends AbsSlidingMusicPanelActivity implements
|
||||||
PreferenceUtil.getInstance(this).unregisterOnSharedPreferenceChangedListener(this);
|
PreferenceUtil.getInstance(this).unregisterOnSharedPreferenceChangedListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCurrentFragment(@Nullable Fragment fragment, boolean isStackAdd) {
|
public void setCurrentFragment(@Nullable Fragment fragment, boolean isStackAdd, String tag) {
|
||||||
|
|
||||||
FragmentManager fragmentManager = getSupportFragmentManager();
|
FragmentManager fragmentManager = getSupportFragmentManager();
|
||||||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
|
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
|
||||||
fragmentTransaction.replace(R.id.fragment_container, fragment, TAG);
|
fragmentTransaction.replace(R.id.fragment_container, fragment, tag);
|
||||||
if (isStackAdd) {
|
if (isStackAdd) {
|
||||||
fragmentTransaction.addToBackStack(TAG);
|
fragmentTransaction.addToBackStack(tag);
|
||||||
}
|
}
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
|
|
||||||
currentFragment = (MainActivityFragmentCallbacks) fragment;
|
currentFragment = (MainActivityFragmentCallbacks) fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,13 +188,13 @@ public class MainActivity extends AbsSlidingMusicPanelActivity implements
|
||||||
case R.id.action_album:
|
case R.id.action_album:
|
||||||
case R.id.action_artist:
|
case R.id.action_artist:
|
||||||
case R.id.action_playlist:
|
case R.id.action_playlist:
|
||||||
setCurrentFragment(LibraryFragment.newInstance(menuItem), false);
|
setCurrentFragment(LibraryFragment.newInstance(menuItem), false, LibraryFragment.TAG);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case R.id.action_home:
|
case R.id.action_home:
|
||||||
setCurrentFragment(PreferenceUtil.getInstance(this).toggleHomeBanner() ? BannerHomeFragment
|
setCurrentFragment(PreferenceUtil.getInstance(this).toggleHomeBanner() ?
|
||||||
.newInstance() : HomeFragment.newInstance(),
|
BannerHomeFragment.newInstance() : HomeFragment.newInstance(), false,
|
||||||
false);
|
HomeFragment.TAG);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.os.Bundle;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import butterknife.BindDrawable;
|
import butterknife.BindDrawable;
|
||||||
import butterknife.BindString;
|
import butterknife.BindString;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
@ -21,15 +22,22 @@ public class PlayingQueueActivity extends AbsMusicServiceActivity {
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar mToolbar;
|
Toolbar mToolbar;
|
||||||
@BindDrawable(R.drawable.ic_close_white_24dp)
|
|
||||||
|
@BindDrawable(R.drawable.ic_keyboard_backspace_black_24dp)
|
||||||
Drawable mClose;
|
Drawable mClose;
|
||||||
|
|
||||||
@BindView(R.id.player_queue_sub_header)
|
@BindView(R.id.player_queue_sub_header)
|
||||||
TextView mPlayerQueueSubHeader;
|
TextView mPlayerQueueSubHeader;
|
||||||
|
|
||||||
@BindString(R.string.queue)
|
@BindString(R.string.queue)
|
||||||
String queue;
|
String queue;
|
||||||
|
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout mAppBarLayout;
|
AppBarLayout mAppBarLayout;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -50,19 +58,18 @@ public class PlayingQueueActivity extends AbsMusicServiceActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getUpNextAndQueueTime() {
|
protected String getUpNextAndQueueTime() {
|
||||||
return getResources().getString(R.string.up_next) + " • " + MusicUtil
|
return getResources().getString(R.string.up_next) + " • " + MusicUtil.getReadableDurationString(MusicPlayerRemote.getQueueDurationMillis(MusicPlayerRemote.getPosition()));
|
||||||
.getReadableDurationString(
|
|
||||||
MusicPlayerRemote.getQueueDurationMillis(MusicPlayerRemote.getPosition()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupToolbar() {
|
private void setupToolbar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
mPlayerQueueSubHeader.setText(getUpNextAndQueueTime());
|
mPlayerQueueSubHeader.setText(getUpNextAndQueueTime());
|
||||||
mPlayerQueueSubHeader.setTextColor(ThemeStore.accentColor(this));
|
mPlayerQueueSubHeader.setTextColor(ThemeStore.accentColor(this));
|
||||||
mAppBarLayout.setBackgroundColor(ThemeStore.primaryColor(this));
|
mAppBarLayout.setBackgroundColor(ThemeStore.primaryColor(this));
|
||||||
mToolbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
mToolbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
||||||
mToolbar.setNavigationIcon(mClose);
|
mToolbar.setNavigationIcon(mClose);
|
||||||
setSupportActionBar(mToolbar);
|
setSupportActionBar(mToolbar);
|
||||||
setTitle(queue);
|
setTitle(null);
|
||||||
mToolbar.setNavigationOnClickListener(v -> onBackPressed());
|
mToolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package code.name.monkey.retromusic.ui.activities;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
@ -29,13 +28,11 @@ import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
|
||||||
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.helper.menu.PlaylistMenuHelper;
|
import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper;
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder;
|
import code.name.monkey.retromusic.interfaces.CabHolder;
|
||||||
import code.name.monkey.retromusic.loaders.PlaylistLoader;
|
import code.name.monkey.retromusic.loaders.PlaylistLoader;
|
||||||
import code.name.monkey.retromusic.misc.AppBarStateChangeListener;
|
|
||||||
import code.name.monkey.retromusic.model.AbsCustomPlaylist;
|
import code.name.monkey.retromusic.model.AbsCustomPlaylist;
|
||||||
import code.name.monkey.retromusic.model.Playlist;
|
import code.name.monkey.retromusic.model.Playlist;
|
||||||
import code.name.monkey.retromusic.model.PlaylistSong;
|
import code.name.monkey.retromusic.model.PlaylistSong;
|
||||||
|
@ -72,8 +69,8 @@ public class PlaylistDetailActivity extends AbsSlidingMusicPanelActivity impleme
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout appBarLayout;
|
AppBarLayout appBarLayout;
|
||||||
|
|
||||||
@BindView(R.id.collapsing_toolbar)
|
@BindView(R.id.title)
|
||||||
CollapsingToolbarLayout toolbarLayout;
|
TextView title;
|
||||||
|
|
||||||
@BindView(R.id.status_bar)
|
@BindView(R.id.status_bar)
|
||||||
View statusBar;
|
View statusBar;
|
||||||
|
@ -182,33 +179,17 @@ public class PlaylistDetailActivity extends AbsSlidingMusicPanelActivity impleme
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpToolBar() {
|
private void setUpToolBar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
|
TintHelper.setTintAuto(shuffleButton, ThemeStore.accentColor(this), true);
|
||||||
|
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
|
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
|
title.setText(playlist.name);
|
||||||
|
|
||||||
|
setTitle(null);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
//noinspection ConstantConditions
|
|
||||||
getSupportActionBar().setTitle(playlist.name);
|
|
||||||
|
|
||||||
appBarLayout.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onStateChanged(AppBarLayout appBarLayout, AppBarStateChangeListener.State state) {
|
|
||||||
int color;
|
|
||||||
switch (state) {
|
|
||||||
default:
|
|
||||||
case COLLAPSED:
|
|
||||||
case EXPANDED:
|
|
||||||
case IDLE:
|
|
||||||
color = ThemeStore.textColorPrimary(PlaylistDetailActivity.this);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
toolbarLayout.setExpandedTitleColor(color);
|
|
||||||
ToolbarContentTintHelper.colorizeToolbar(toolbar, color, PlaylistDetailActivity.this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
TintHelper.setTintAuto(shuffleButton, ThemeStore.accentColor(this), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -44,28 +44,38 @@ public class SearchActivity extends AbsMusicServiceActivity implements OnQueryTe
|
||||||
public static final String TAG = SearchActivity.class.getSimpleName();
|
public static final String TAG = SearchActivity.class.getSimpleName();
|
||||||
public static final String QUERY = "query";
|
public static final String QUERY = "query";
|
||||||
private static final int REQ_CODE_SPEECH_INPUT = 9002;
|
private static final int REQ_CODE_SPEECH_INPUT = 9002;
|
||||||
|
|
||||||
@BindView(R.id.voice_search)
|
@BindView(R.id.voice_search)
|
||||||
View micIcon;
|
View micIcon;
|
||||||
|
|
||||||
@BindView(R.id.recycler_view)
|
@BindView(R.id.recycler_view)
|
||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
|
|
||||||
@BindView(android.R.id.empty)
|
@BindView(android.R.id.empty)
|
||||||
TextView empty;
|
TextView empty;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
|
|
||||||
@BindView(R.id.search_view)
|
@BindView(R.id.search_view)
|
||||||
EditText searchView;
|
EditText searchView;
|
||||||
|
|
||||||
@BindView(R.id.root)
|
@BindView(R.id.root)
|
||||||
CoordinatorLayout container;
|
CoordinatorLayout container;
|
||||||
@BindView(R.id.appbar)
|
|
||||||
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout appbar;
|
AppBarLayout appbar;
|
||||||
|
|
||||||
@BindView(R.id.status_bar)
|
@BindView(R.id.status_bar)
|
||||||
View statusBar;
|
View statusBar;
|
||||||
|
|
||||||
private SearchPresenter searchPresenter;
|
private SearchPresenter searchPresenter;
|
||||||
private SearchAdapter adapter;
|
private SearchAdapter adapter;
|
||||||
private String query;
|
private String query;
|
||||||
|
|
||||||
private boolean isMicSearch = false;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
setDrawUnderStatusBar(true);
|
setDrawUnderStatusBar(true);
|
||||||
|
@ -94,7 +104,7 @@ public class SearchActivity extends AbsMusicServiceActivity implements OnQueryTe
|
||||||
|
|
||||||
if (getIntent().getBooleanExtra("mic_search", false)) {
|
if (getIntent().getBooleanExtra("mic_search", false)) {
|
||||||
startMicSearch();
|
startMicSearch();
|
||||||
isMicSearch = true;
|
boolean isMicSearch = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,12 +155,13 @@ public class SearchActivity extends AbsMusicServiceActivity implements OnQueryTe
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpToolBar() {
|
private void setUpToolBar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
|
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
appbar.setBackgroundColor(primaryColor);
|
appbar.setBackgroundColor(primaryColor);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
//noinspection ConstantConditions
|
setTitle(null);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.os.Bundle;
|
||||||
import android.support.annotation.ColorInt;
|
import android.support.annotation.ColorInt;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.annotation.StringRes;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.transition.TransitionManager;
|
import android.support.transition.TransitionManager;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
@ -12,20 +13,20 @@ import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.afollestad.materialdialogs.color.ColorChooserDialog;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager;
|
import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager;
|
||||||
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity;
|
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity;
|
||||||
import code.name.monkey.retromusic.ui.fragments.settings.MainSettingsFragment;
|
import code.name.monkey.retromusic.ui.fragments.settings.MainSettingsFragment;
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import com.afollestad.materialdialogs.color.ColorChooserDialog;
|
|
||||||
|
|
||||||
public class SettingsActivity extends AbsBaseActivity implements ColorChooserDialog.ColorCallback {
|
public class SettingsActivity extends AbsBaseActivity implements ColorChooserDialog.ColorCallback {
|
||||||
|
|
||||||
|
@ -33,6 +34,8 @@ public class SettingsActivity extends AbsBaseActivity implements ColorChooserDia
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout appBarLayout;
|
AppBarLayout appBarLayout;
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
@BindView(R.id.detail_content_frame)
|
@BindView(R.id.detail_content_frame)
|
||||||
@Nullable
|
@Nullable
|
||||||
FrameLayout detailsFrame;
|
FrameLayout detailsFrame;
|
||||||
|
@ -80,34 +83,27 @@ public class SettingsActivity extends AbsBaseActivity implements ColorChooserDia
|
||||||
if (bundle == null) {
|
if (bundle == null) {
|
||||||
fragmentManager.beginTransaction().replace(R.id.content_frame, new MainSettingsFragment())
|
fragmentManager.beginTransaction().replace(R.id.content_frame, new MainSettingsFragment())
|
||||||
.commit();
|
.commit();
|
||||||
} else {
|
|
||||||
restoreFragment();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupToolbar() {
|
private void setupToolbar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
|
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||||
setTitle(R.string.app_name);
|
setTitle(null);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restoreFragment() {
|
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
|
||||||
if (fragmentManager.getBackStackEntryCount() > 0) {
|
|
||||||
appBarLayout.setExpanded(false, true);
|
|
||||||
} else {
|
|
||||||
appBarLayout.setExpanded(true, true);
|
|
||||||
}
|
|
||||||
setupToolbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setupFragment(Fragment fragment) {
|
public void setupFragment(Fragment fragment, @StringRes int titleName) {
|
||||||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction()
|
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction()
|
||||||
.setCustomAnimations(R.animator.slide_up, 0, 0, R.animator.slide_down);
|
.setCustomAnimations(R.animator.slide_up, 0, 0, R.animator.slide_down);
|
||||||
|
|
||||||
|
title.setText(titleName);
|
||||||
|
|
||||||
if (detailsFrame == null) {
|
if (detailsFrame == null) {
|
||||||
fragmentTransaction.replace(R.id.content_frame, fragment, fragment.getTag());
|
fragmentTransaction.replace(R.id.content_frame, fragment, fragment.getTag());
|
||||||
fragmentTransaction.addToBackStack(null);
|
fragmentTransaction.addToBackStack(null);
|
||||||
|
@ -117,14 +113,7 @@ public class SettingsActivity extends AbsBaseActivity implements ColorChooserDia
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
fragmentManager.addOnBackStackChangedListener(() -> {
|
|
||||||
if (fragmentManager.getBackStackEntryCount() > 0) {
|
|
||||||
appBarLayout.setExpanded(false, true);
|
|
||||||
} else {
|
|
||||||
appBarLayout.setExpanded(true, true);
|
|
||||||
}
|
|
||||||
setupToolbar();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,6 +122,7 @@ public class SettingsActivity extends AbsBaseActivity implements ColorChooserDia
|
||||||
if (fragmentManager.getBackStackEntryCount() == 0) {
|
if (fragmentManager.getBackStackEntryCount() == 0) {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
} else {
|
} else {
|
||||||
|
title.setText(R.string.action_settings);
|
||||||
fragmentManager.popBackStack();
|
fragmentManager.popBackStack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import android.support.v7.widget.RecyclerView;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
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.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
@ -53,18 +54,27 @@ import static code.name.monkey.retromusic.Constants.PAYPAL_ME_URL;
|
||||||
public class SupportDevelopmentActivity extends AbsBaseActivity implements BillingProcessor.IBillingHandler {
|
public class SupportDevelopmentActivity extends AbsBaseActivity implements BillingProcessor.IBillingHandler {
|
||||||
public static final String TAG = SupportDevelopmentActivity.class.getSimpleName();
|
public static final String TAG = SupportDevelopmentActivity.class.getSimpleName();
|
||||||
private static final int DONATION_PRODUCT_IDS = R.array.donation_ids;
|
private static final int DONATION_PRODUCT_IDS = R.array.donation_ids;
|
||||||
|
|
||||||
@BindView(R.id.progress)
|
@BindView(R.id.progress)
|
||||||
ProgressBar mProgressBar;
|
ProgressBar mProgressBar;
|
||||||
|
|
||||||
@BindView(R.id.progress_container)
|
@BindView(R.id.progress_container)
|
||||||
View mProgressContainer;
|
View mProgressContainer;
|
||||||
|
|
||||||
@BindView(R.id.list)
|
@BindView(R.id.list)
|
||||||
RecyclerView mListView;
|
RecyclerView mListView;
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar mToolbar;
|
Toolbar mToolbar;
|
||||||
|
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout mAppBarLayout;
|
AppBarLayout mAppBarLayout;
|
||||||
|
|
||||||
@BindView(R.id.root)
|
@BindView(R.id.root)
|
||||||
ViewGroup mViewGroup;
|
ViewGroup mViewGroup;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
private BillingProcessor mBillingProcessor;
|
private BillingProcessor mBillingProcessor;
|
||||||
private AsyncTask skuDetailsLoadAsyncTask;
|
private AsyncTask skuDetailsLoadAsyncTask;
|
||||||
|
|
||||||
|
@ -86,6 +96,15 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
return skuDetails;
|
return skuDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
onBackPressed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
private void donate(int i) {
|
private void donate(int i) {
|
||||||
final String[] ids = getResources().getStringArray(DONATION_PRODUCT_IDS);
|
final String[] ids = getResources().getStringArray(DONATION_PRODUCT_IDS);
|
||||||
mBillingProcessor.purchase(this, ids[i]);
|
mBillingProcessor.purchase(this, ids[i]);
|
||||||
|
@ -107,13 +126,8 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
setTaskDescriptionColorAuto();
|
setTaskDescriptionColorAuto();
|
||||||
setLightNavigationBar(true);
|
setLightNavigationBar(true);
|
||||||
|
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
|
||||||
mAppBarLayout.setBackgroundColor(primaryColor);
|
setupToolbar();
|
||||||
mToolbar.setBackgroundColor(primaryColor);
|
|
||||||
setSupportActionBar(mToolbar);
|
|
||||||
//noinspection ConstantConditions
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
mToolbar.setNavigationOnClickListener(view -> onBackPressed());
|
|
||||||
|
|
||||||
mBillingProcessor
|
mBillingProcessor
|
||||||
= new BillingProcessor(this, BuildConfig.GOOGLE_PLAY_LICENSE_KEY, this);
|
= new BillingProcessor(this, BuildConfig.GOOGLE_PLAY_LICENSE_KEY, this);
|
||||||
|
@ -122,6 +136,17 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
((TextView) findViewById(R.id.donation)).setTextColor(ThemeStore.accentColor(this));
|
((TextView) findViewById(R.id.donation)).setTextColor(ThemeStore.accentColor(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setupToolbar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(this));
|
||||||
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
|
mAppBarLayout.setBackgroundColor(primaryColor);
|
||||||
|
mToolbar.setBackgroundColor(primaryColor);
|
||||||
|
mToolbar.setNavigationOnClickListener(view -> onBackPressed());
|
||||||
|
mToolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp);
|
||||||
|
setSupportActionBar(mToolbar);
|
||||||
|
setTitle(null);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBillingInitialized() {
|
public void onBillingInitialized() {
|
||||||
loadSkuDetails();
|
loadSkuDetails();
|
||||||
|
@ -173,7 +198,7 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
private static class SkuDetailsLoadAsyncTask extends AsyncTask<Void, Void, List<SkuDetails>> {
|
private static class SkuDetailsLoadAsyncTask extends AsyncTask<Void, Void, List<SkuDetails>> {
|
||||||
private final WeakReference<SupportDevelopmentActivity> donationDialogWeakReference;
|
private final WeakReference<SupportDevelopmentActivity> donationDialogWeakReference;
|
||||||
|
|
||||||
public SkuDetailsLoadAsyncTask(SupportDevelopmentActivity donationsDialog) {
|
SkuDetailsLoadAsyncTask(SupportDevelopmentActivity donationsDialog) {
|
||||||
this.donationDialogWeakReference = new WeakReference<>(donationsDialog);
|
this.donationDialogWeakReference = new WeakReference<>(donationsDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,8 +230,6 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
if (dialog == null) return;
|
if (dialog == null) return;
|
||||||
|
|
||||||
if (skuDetails == null || skuDetails.isEmpty()) {
|
if (skuDetails == null || skuDetails.isEmpty()) {
|
||||||
//Toast.makeText(dialog, "Error loading items", Toast.LENGTH_SHORT).show();
|
|
||||||
//dialog.finish();
|
|
||||||
dialog.mProgressContainer.setVisibility(View.GONE);
|
dialog.mProgressContainer.setVisibility(View.GONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -229,7 +252,7 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
SupportDevelopmentActivity donationsDialog;
|
SupportDevelopmentActivity donationsDialog;
|
||||||
List<SkuDetails> skuDetailsList = new ArrayList<>();
|
List<SkuDetails> skuDetailsList = new ArrayList<>();
|
||||||
|
|
||||||
public SkuDetailsAdapter(@NonNull SupportDevelopmentActivity donationsDialog, @NonNull List<SkuDetails> objects) {
|
SkuDetailsAdapter(@NonNull SupportDevelopmentActivity donationsDialog, @NonNull List<SkuDetails> objects) {
|
||||||
this.donationsDialog = donationsDialog;
|
this.donationsDialog = donationsDialog;
|
||||||
skuDetailsList = objects;
|
skuDetailsList = objects;
|
||||||
}
|
}
|
||||||
|
@ -260,14 +283,15 @@ public class SupportDevelopmentActivity extends AbsBaseActivity implements Billi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
|
||||||
return new ViewHolder(LayoutInflater.from(donationsDialog)
|
return new ViewHolder(LayoutInflater.from(donationsDialog)
|
||||||
.inflate(LAYOUT_RES_ID, viewGroup, false));
|
.inflate(LAYOUT_RES_ID, viewGroup, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(ViewHolder viewHolder, int i) {
|
public void onBindViewHolder(@NonNull ViewHolder viewHolder, int i) {
|
||||||
SkuDetails skuDetails = skuDetailsList.get(i);
|
SkuDetails skuDetails = skuDetailsList.get(i);
|
||||||
if (skuDetails != null) {
|
if (skuDetails != null) {
|
||||||
viewHolder.title.setText(skuDetails.title.replace("(Retro Music Player)", "").trim());
|
viewHolder.title.setText(skuDetails.title.replace("(Retro Music Player)", "").trim());
|
||||||
|
|
|
@ -1,52 +1,53 @@
|
||||||
package code.name.monkey.retromusic.ui.adapter;
|
package code.name.monkey.retromusic.ui.adapter;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.support.v7.widget.RecyclerView;
|
import android.support.v7.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
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 com.bumptech.glide.Glide;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import butterknife.BindViews;
|
import butterknife.BindViews;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.glide.SongGlideRequest;
|
import code.name.monkey.retromusic.glide.SongGlideRequest;
|
||||||
import code.name.monkey.retromusic.model.Album;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
import code.name.monkey.retromusic.ui.adapter.CollageSongAdapter.CollageSongViewHolder;
|
import code.name.monkey.retromusic.ui.adapter.CollageSongAdapter.CollageSongViewHolder;
|
||||||
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder;
|
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
|
||||||
import com.bumptech.glide.Glide;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Hemanth S (h4h13).
|
* @author Hemanth S (h4h13).
|
||||||
*/
|
*/
|
||||||
public class CollageSongAdapter extends RecyclerView.Adapter<CollageSongViewHolder> {
|
public class CollageSongAdapter extends RecyclerView.Adapter<CollageSongViewHolder> {
|
||||||
|
|
||||||
private AppCompatActivity activity;
|
private Activity activity;
|
||||||
private ArrayList<Album> dataSet;
|
private ArrayList<Song> dataSet;
|
||||||
private int itemLayoutRes;
|
|
||||||
|
|
||||||
public CollageSongAdapter(AppCompatActivity activity, ArrayList<Album> dataSet,
|
public CollageSongAdapter(Activity activity, ArrayList<Song> dataSet) {
|
||||||
int itemLayoutRes) {
|
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
this.dataSet = dataSet;
|
this.dataSet = dataSet;
|
||||||
this.itemLayoutRes = itemLayoutRes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull CollageSongViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull CollageSongViewHolder holder, int position) {
|
||||||
ArrayList<Album> albums = dataSet;
|
|
||||||
|
|
||||||
holder.bindSongs(albums);
|
|
||||||
|
|
||||||
if (albums.size() > 9) {
|
holder.bindSongs();
|
||||||
for (int i = 0; i < albums.subList(0, 9).size(); i++) {
|
|
||||||
|
if (dataSet.size() > 9) {
|
||||||
|
for (int i = 0; i < dataSet.subList(0, 9).size(); i++) {
|
||||||
if (holder.imageViews != null) {
|
if (holder.imageViews != null) {
|
||||||
SongGlideRequest.Builder.from(Glide.with(activity), albums.get(i).safeGetFirstSong())
|
SongGlideRequest.Builder.from(Glide.with(activity), dataSet.get(i))
|
||||||
.checkIgnoreMediaStore(activity).build().into(holder.imageViews.get(i));
|
.checkIgnoreMediaStore(activity)
|
||||||
|
.build()
|
||||||
|
.into(holder.imageViews.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,9 +60,9 @@ public class CollageSongAdapter extends RecyclerView.Adapter<CollageSongViewHold
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public CollageSongViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public CollageSongViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
return new CollageSongViewHolder(
|
return new CollageSongViewHolder(
|
||||||
LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false));
|
LayoutInflater.from(activity).inflate(R.layout.item_collage, parent, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
class CollageSongViewHolder extends MediaEntryViewHolder {
|
class CollageSongViewHolder extends MediaEntryViewHolder {
|
||||||
|
@ -76,19 +77,14 @@ public class CollageSongAdapter extends RecyclerView.Adapter<CollageSongViewHold
|
||||||
ButterKnife.bind(this, itemView);
|
ButterKnife.bind(this, itemView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
void bindSongs() {
|
||||||
public void onClick(View v) {
|
|
||||||
super.onClick(v);
|
|
||||||
NavigationUtil.goToAlbum(activity, dataSet.get(getAdapterPosition() + 1).getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
void bindSongs(ArrayList<Album> albums) {
|
|
||||||
if (imageViews != null) {
|
if (imageViews != null) {
|
||||||
for (int i = 0; i < imageViews.size(); i++) {
|
for (int i = 0; i < imageViews.size(); i++) {
|
||||||
final int startPosition = i;
|
final int startPosition = i;
|
||||||
ImageView imageView = imageViews.get(i);
|
ImageView imageView = imageViews.get(i);
|
||||||
imageView.setOnClickListener(
|
imageView.setOnClickListener(view -> {
|
||||||
v -> NavigationUtil.goToAlbum(activity, albums.get(startPosition).getId()));
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,11 @@ public class AlbumAdapter extends AbsMultiSelectAdapter<AlbumAdapter.ViewHolder,
|
||||||
this.usePalette = usePalette;
|
this.usePalette = usePalette;
|
||||||
setHasStableIds(true);
|
setHasStableIds(true);
|
||||||
this.textColor = ThemeStore.textColorPrimary(activity);
|
this.textColor = ThemeStore.textColorPrimary(activity);
|
||||||
Typeface mTypeface = Typeface
|
}
|
||||||
.createFromAsset(activity.getAssets(), activity.getString(R.string.sans_regular));
|
|
||||||
|
public AlbumAdapter(@NonNull AppCompatActivity activity, ArrayList<Album> dataSet,
|
||||||
|
@LayoutRes int itemLayoutRes) {
|
||||||
|
this(activity, dataSet, itemLayoutRes, false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void useItemLayout(int itemLayoutRes) {
|
public void useItemLayout(int itemLayoutRes) {
|
||||||
|
|
|
@ -25,6 +25,12 @@ import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
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;
|
||||||
|
@ -32,9 +38,6 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||||
import code.name.monkey.retromusic.model.Album;
|
import code.name.monkey.retromusic.model.Album;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
import code.name.monkey.retromusic.views.MetalRecyclerViewPager;
|
import code.name.monkey.retromusic.views.MetalRecyclerViewPager;
|
||||||
import com.bumptech.glide.Glide;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class AlbumFullWithAdapter extends
|
public class AlbumFullWithAdapter extends
|
||||||
MetalRecyclerViewPager.MetalAdapter<AlbumFullWithAdapter.FullMetalViewHolder> {
|
MetalRecyclerViewPager.MetalAdapter<AlbumFullWithAdapter.FullMetalViewHolder> {
|
||||||
|
@ -53,8 +56,9 @@ public class AlbumFullWithAdapter extends
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public FullMetalViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public FullMetalViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View viewItem = LayoutInflater.from(parent.getContext())
|
View viewItem = LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.pager_item, parent, false);
|
.inflate(R.layout.pager_item, parent, false);
|
||||||
return new FullMetalViewHolder(viewItem);
|
return new FullMetalViewHolder(viewItem);
|
||||||
|
@ -84,7 +88,7 @@ public class AlbumFullWithAdapter extends
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(FullMetalViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull FullMetalViewHolder holder, int position) {
|
||||||
// don't forget about calling supper.onBindViewHolder!
|
// don't forget about calling supper.onBindViewHolder!
|
||||||
super.onBindViewHolder(holder, position);
|
super.onBindViewHolder(holder, position);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,13 @@ import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper;
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
|
@ -22,10 +29,6 @@ import code.name.monkey.retromusic.ui.adapter.base.AbsMultiSelectAdapter;
|
||||||
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder;
|
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder;
|
||||||
import code.name.monkey.retromusic.util.MusicUtil;
|
import code.name.monkey.retromusic.util.MusicUtil;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
import com.bumptech.glide.Glide;
|
|
||||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public class ArtistAdapter extends
|
public class ArtistAdapter extends
|
||||||
|
@ -50,6 +53,14 @@ public class ArtistAdapter extends
|
||||||
//setHasStableIds(true);
|
//setHasStableIds(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArtistAdapter(@NonNull AppCompatActivity activity, ArrayList<Artist> dataSet,
|
||||||
|
@LayoutRes int itemLayoutRes ) {
|
||||||
|
super(activity, null, R.menu.menu_media_selection);
|
||||||
|
this.activity = activity;
|
||||||
|
this.dataSet = dataSet;
|
||||||
|
this.itemLayoutRes = itemLayoutRes;
|
||||||
|
}
|
||||||
|
|
||||||
public void swapDataSet(ArrayList<Artist> dataSet) {
|
public void swapDataSet(ArrayList<Artist> dataSet) {
|
||||||
this.dataSet = dataSet;
|
this.dataSet = dataSet;
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
|
|
@ -10,6 +10,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
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 code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
|
|
@ -1,167 +1,126 @@
|
||||||
package code.name.monkey.retromusic.ui.adapter.home;
|
package code.name.monkey.retromusic.ui.adapter.home;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.DefaultItemAnimator;
|
|
||||||
import android.support.v7.widget.GridLayoutManager;
|
import android.support.v7.widget.GridLayoutManager;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.Display;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import butterknife.BindView;
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
|
||||||
import code.name.monkey.retromusic.loaders.SongLoader;
|
|
||||||
import code.name.monkey.retromusic.model.Album;
|
import code.name.monkey.retromusic.model.Album;
|
||||||
import code.name.monkey.retromusic.model.Artist;
|
import code.name.monkey.retromusic.model.Artist;
|
||||||
|
import code.name.monkey.retromusic.model.Genre;
|
||||||
|
import code.name.monkey.retromusic.model.Home;
|
||||||
import code.name.monkey.retromusic.model.Song;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.HistoryPlaylist;
|
import code.name.monkey.retromusic.ui.adapter.CollageSongAdapter;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist;
|
import code.name.monkey.retromusic.ui.adapter.GenreAdapter;
|
||||||
import code.name.monkey.retromusic.model.smartplaylist.MyTopTracksPlaylist;
|
|
||||||
import code.name.monkey.retromusic.ui.adapter.album.AlbumAdapter;
|
import code.name.monkey.retromusic.ui.adapter.album.AlbumAdapter;
|
||||||
import code.name.monkey.retromusic.ui.adapter.artist.ArtistAdapter;
|
import code.name.monkey.retromusic.ui.adapter.artist.ArtistAdapter;
|
||||||
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder;
|
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder;
|
||||||
import code.name.monkey.retromusic.ui.adapter.song.SongAdapter;
|
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class HomeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class HomeAdapter extends RecyclerView.Adapter<HomeAdapter.ViewHolder> {
|
||||||
|
|
||||||
private static final int SUB_HEADER = 0;
|
private static final int ALBUMS = 0;
|
||||||
private static final int ABS_PLAYLITS = 1;
|
private static final int ARTISTS = 1;
|
||||||
private static final int DATA = 2;
|
private static final int GENERS = 2;
|
||||||
private ArrayList<Object> dataSet = new ArrayList<>();
|
private static final int SUGGESTIONS = 3;
|
||||||
private AppCompatActivity activity;
|
private Activity activity;
|
||||||
|
private ArrayList<Home> sections = new ArrayList<>();
|
||||||
|
|
||||||
public HomeAdapter(@NonNull AppCompatActivity activity) {
|
|
||||||
|
public HomeAdapter(Activity activity) {
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
switch (i) {
|
Context context = parent.getContext();
|
||||||
|
return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.home_section_recycler_view,
|
||||||
case ABS_PLAYLITS:
|
parent, false));
|
||||||
return new ViewHolder(LayoutInflater.from(activity)
|
|
||||||
.inflate(R.layout.abs_playlists, viewGroup, false));
|
|
||||||
default:
|
|
||||||
case DATA:
|
|
||||||
return new ViewHolder(LayoutInflater.from(activity)
|
|
||||||
.inflate(R.layout.recycler_view_sec, viewGroup, false));
|
|
||||||
case SUB_HEADER:
|
|
||||||
return new ViewHolder(LayoutInflater.from(activity)
|
|
||||||
.inflate(R.layout.sub_header, viewGroup, false));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemViewType(int position) {
|
public int getItemViewType(int position) {
|
||||||
if (dataSet.get(position) instanceof String) {
|
Home home = sections.get(position);
|
||||||
return SUB_HEADER;
|
ArrayList arrayList = home.getList();
|
||||||
} else if (dataSet.get(position) instanceof Integer) {
|
if (arrayList.get(0) instanceof Album) {
|
||||||
return ABS_PLAYLITS;
|
return ALBUMS;
|
||||||
} else if (dataSet.get(position) instanceof ArrayList) {
|
} else if (arrayList.get(0) instanceof Artist) {
|
||||||
return DATA;
|
return ARTISTS;
|
||||||
|
} else if (arrayList.get(0) instanceof Genre) {
|
||||||
|
return GENERS;
|
||||||
|
} else {
|
||||||
|
return SUGGESTIONS;
|
||||||
}
|
}
|
||||||
return super.getItemViewType(position);
|
}
|
||||||
|
|
||||||
|
private DisplayMetrics getDisplayMetrics() {
|
||||||
|
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||||
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
|
display.getMetrics(metrics);
|
||||||
|
return metrics;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(RecyclerView.ViewHolder holder, int i) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
ViewHolder viewholder = (ViewHolder) holder;
|
Home home = sections.get(position);
|
||||||
switch (getItemViewType(i)) {
|
|
||||||
case ABS_PLAYLITS:
|
|
||||||
bindAbsActions(viewholder);
|
|
||||||
break;
|
|
||||||
case SUB_HEADER:
|
|
||||||
String title = (String) dataSet.get(i);
|
|
||||||
if (viewholder.title != null) {
|
|
||||||
viewholder.title.setText(title);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case DATA:
|
|
||||||
parseAllSections(i, viewholder);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void bindAbsActions(ViewHolder viewholder) {
|
if (holder.title != null) {
|
||||||
|
holder.title.setText(home.getSectionTitle());
|
||||||
|
|
||||||
if (viewholder.shuffle != null) {
|
|
||||||
viewholder.shuffle.setOnClickListener(view -> MusicPlayerRemote
|
|
||||||
.openAndShuffleQueue(SongLoader.getAllSongs(activity).blockingFirst(), true));
|
|
||||||
}
|
}
|
||||||
/*if (viewholder.search != null) {
|
ArrayList arrayList = home.getList();
|
||||||
viewholder.search.setBackgroundTintList(ColorStateList.valueOf(ColorUtil.withAlpha(ThemeStore.textColorPrimary(activity), 0.2f)));
|
if (arrayList.get(0) instanceof Album) {
|
||||||
viewholder.search.setOnClickListener(view -> {
|
AlbumAdapter albumAdapter = new AlbumAdapter((AppCompatActivity) activity,
|
||||||
activity.startActivity(new Intent(activity, SearchActivity.class));
|
(ArrayList<Album>) arrayList, R.layout.item_image);
|
||||||
});
|
if (holder.recyclerView != null) {
|
||||||
}*/
|
holder.recyclerView.setLayoutManager(new GridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false));
|
||||||
|
holder.recyclerView.setAdapter(albumAdapter);
|
||||||
}
|
}
|
||||||
|
} else if (arrayList.get(0) instanceof Artist) {
|
||||||
@SuppressWarnings("unchecked")
|
ArtistAdapter artistAdapter = new ArtistAdapter((AppCompatActivity) activity, (ArrayList<Artist>) arrayList, R.layout.item_artist);
|
||||||
private void parseAllSections(int i, ViewHolder viewholder) {
|
GridLayoutManager layoutManager = new GridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false);
|
||||||
if (viewholder.recyclerView != null) {
|
if (holder.recyclerView != null) {
|
||||||
ArrayList arrayList = (ArrayList) dataSet.get(i);
|
holder.recyclerView.setLayoutManager(layoutManager);
|
||||||
if (arrayList.isEmpty()) {
|
holder.recyclerView.setAdapter(artistAdapter);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
Object something = arrayList.get(0);
|
} else if (arrayList.get(0) instanceof Genre) {
|
||||||
if (something instanceof Artist) {
|
GenreAdapter genreAdapter = new GenreAdapter(activity, (ArrayList<Genre>) arrayList, R.layout.item_list);
|
||||||
layoutManager(viewholder);
|
if (holder.recyclerView != null) {
|
||||||
viewholder.recyclerView.setAdapter(
|
holder.recyclerView.setLayoutManager(new LinearLayoutManager(activity));
|
||||||
new ArtistAdapter(activity, (ArrayList<Artist>) arrayList, R.layout.item_artist, false,
|
holder.recyclerView.setAdapter(genreAdapter);
|
||||||
null));
|
}
|
||||||
} else if (something instanceof Album) {
|
} else if (arrayList.get(0) instanceof Song) {
|
||||||
layoutManager(viewholder);
|
CollageSongAdapter collageSongAdapter = new CollageSongAdapter(activity, (ArrayList<Song>) arrayList);
|
||||||
viewholder.recyclerView.setItemAnimator(new DefaultItemAnimator());
|
if (holder.recyclerView != null) {
|
||||||
viewholder.recyclerView.setAdapter(
|
holder.recyclerView.setLayoutManager(new LinearLayoutManager(activity));
|
||||||
new AlbumAdapter(activity, (ArrayList<Album>) arrayList, R.layout.item_image, false,
|
holder.recyclerView.setAdapter(collageSongAdapter);
|
||||||
null));
|
|
||||||
} else if (something instanceof Song) {
|
|
||||||
GridLayoutManager layoutManager = new GridLayoutManager(activity, 1,
|
|
||||||
LinearLayoutManager.HORIZONTAL, false);
|
|
||||||
viewholder.recyclerView.setLayoutManager(layoutManager);
|
|
||||||
viewholder.recyclerView.setAdapter(
|
|
||||||
new SongAdapter(activity, (ArrayList<Song>) arrayList, R.layout.item_image, false,
|
|
||||||
null));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void layoutManager(ViewHolder viewholder) {
|
|
||||||
if (viewholder.recyclerView != null) {
|
|
||||||
viewholder.recyclerView.setLayoutManager(
|
|
||||||
new GridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false));
|
|
||||||
viewholder.recyclerView.setItemAnimator(new DefaultItemAnimator());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return dataSet.size();
|
return sections.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void swapDataSet(@NonNull ArrayList<Object> data) {
|
public void swapData(ArrayList<Home> sections) {
|
||||||
dataSet = data;
|
this.sections = sections;
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Object> getDataset() {
|
|
||||||
return dataSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ViewHolder extends MediaEntryViewHolder {
|
public class ViewHolder extends MediaEntryViewHolder {
|
||||||
|
|
||||||
|
|
||||||
@BindView(R.id.action_shuffle)
|
|
||||||
@Nullable
|
|
||||||
View shuffle;
|
|
||||||
|
|
||||||
public ViewHolder(View itemView) {
|
public ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,11 +35,11 @@ public abstract class AbsMainActivityFragment extends AbsMusicServiceFragment {
|
||||||
final View statusBar = view.findViewById(R.id.status_bar);
|
final View statusBar = view.findViewById(R.id.status_bar);
|
||||||
if (statusBar != null) {
|
if (statusBar != null) {
|
||||||
RetroUtil.statusBarHeight(statusBar);
|
RetroUtil.statusBarHeight(statusBar);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
statusBar.setBackgroundColor(ColorUtil.darkenColor(color));
|
statusBar.setBackgroundColor(color);
|
||||||
getMainActivity().setLightStatusbarAuto(color);
|
getMainActivity().setLightStatusbarAuto(color);
|
||||||
} else {
|
} else {
|
||||||
statusBar.setBackgroundColor(color);
|
statusBar.setBackgroundColor(ColorUtil.darkenColor(color));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@ public abstract class AbsMainActivityFragment extends AbsMusicServiceFragment {
|
||||||
|
|
||||||
public void setStatusbarColorAuto(View view) {
|
public void setStatusbarColorAuto(View view) {
|
||||||
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
|
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
|
||||||
|
//noinspection ConstantConditions
|
||||||
setStatusbarColor(view, ThemeStore.primaryColor(getContext()));
|
setStatusbarColor(view, ThemeStore.primaryColor(getContext()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,9 @@ import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.widget.GridLayoutManager;
|
import android.support.v7.widget.GridLayoutManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.model.Album;
|
import code.name.monkey.retromusic.model.Album;
|
||||||
import code.name.monkey.retromusic.mvp.contract.AlbumContract;
|
import code.name.monkey.retromusic.mvp.contract.AlbumContract;
|
||||||
|
@ -11,7 +14,6 @@ import code.name.monkey.retromusic.mvp.presenter.AlbumPresenter;
|
||||||
import code.name.monkey.retromusic.ui.adapter.album.AlbumAdapter;
|
import code.name.monkey.retromusic.ui.adapter.album.AlbumAdapter;
|
||||||
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class AlbumsFragment extends
|
public class AlbumsFragment extends
|
||||||
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager> implements
|
AbsLibraryPagerRecyclerViewCustomGridSizeFragment<AlbumAdapter, GridLayoutManager> implements
|
||||||
|
@ -39,6 +41,7 @@ public class AlbumsFragment extends
|
||||||
int itemLayoutRes = getItemLayoutRes();
|
int itemLayoutRes = getItemLayoutRes();
|
||||||
notifyLayoutResChanged(itemLayoutRes);
|
notifyLayoutResChanged(itemLayoutRes);
|
||||||
if (itemLayoutRes != R.layout.item_list) {
|
if (itemLayoutRes != R.layout.item_list) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
itemLayoutRes = PreferenceUtil.getInstance(getContext()).getAlbumGridStyle(getContext());
|
itemLayoutRes = PreferenceUtil.getInstance(getContext()).getAlbumGridStyle(getContext());
|
||||||
}
|
}
|
||||||
ArrayList<Album> dataSet =
|
ArrayList<Album> dataSet =
|
||||||
|
@ -54,6 +57,7 @@ public class AlbumsFragment extends
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean loadUsePalette() {
|
public boolean loadUsePalette() {
|
||||||
|
//noinspection ConstantConditions
|
||||||
return PreferenceUtil.getInstance(getActivity()).albumColoredFooters();
|
return PreferenceUtil.getInstance(getActivity()).albumColoredFooters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,36 +79,43 @@ public class AlbumsFragment extends
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String loadSortOrder() {
|
protected String loadSortOrder() {
|
||||||
|
//noinspection ConstantConditions
|
||||||
return PreferenceUtil.getInstance(getActivity()).getAlbumSortOrder();
|
return PreferenceUtil.getInstance(getActivity()).getAlbumSortOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void saveSortOrder(String sortOrder) {
|
protected void saveSortOrder(String sortOrder) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
PreferenceUtil.getInstance(getActivity()).setAlbumSortOrder(sortOrder);
|
PreferenceUtil.getInstance(getActivity()).setAlbumSortOrder(sortOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int loadGridSize() {
|
protected int loadGridSize() {
|
||||||
|
//noinspection ConstantConditions
|
||||||
return PreferenceUtil.getInstance(getActivity()).getAlbumGridSize(getActivity());
|
return PreferenceUtil.getInstance(getActivity()).getAlbumGridSize(getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void saveGridSize(int gridSize) {
|
protected void saveGridSize(int gridSize) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
PreferenceUtil.getInstance(getActivity()).setAlbumGridSize(gridSize);
|
PreferenceUtil.getInstance(getActivity()).setAlbumGridSize(gridSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int loadGridSizeLand() {
|
protected int loadGridSizeLand() {
|
||||||
|
//noinspection ConstantConditions
|
||||||
return PreferenceUtil.getInstance(getActivity()).getAlbumGridSizeLand(getActivity());
|
return PreferenceUtil.getInstance(getActivity()).getAlbumGridSizeLand(getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void saveGridSizeLand(int gridSize) {
|
protected void saveGridSizeLand(int gridSize) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
PreferenceUtil.getInstance(getActivity()).setAlbumGridSizeLand(gridSize);
|
PreferenceUtil.getInstance(getActivity()).setAlbumGridSizeLand(gridSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void saveUsePalette(boolean usePalette) {
|
protected void saveUsePalette(boolean usePalette) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
PreferenceUtil.getInstance(getActivity()).setAlbumColoredFooters(usePalette);
|
PreferenceUtil.getInstance(getActivity()).setAlbumColoredFooters(usePalette);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +134,7 @@ public class AlbumsFragment extends
|
||||||
public void setMenuVisibility(boolean menuVisible) {
|
public void setMenuVisibility(boolean menuVisible) {
|
||||||
super.setMenuVisibility(menuVisible);
|
super.setMenuVisibility(menuVisible);
|
||||||
if (menuVisible) {
|
if (menuVisible) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
getLibraryFragment().setTitle(
|
getLibraryFragment().setTitle(
|
||||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library
|
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library
|
||||||
: R.string.albums);
|
: R.string.albums);
|
||||||
|
@ -132,6 +144,7 @@ public class AlbumsFragment extends
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
//noinspection ConstantConditions
|
||||||
getLibraryFragment().setTitle(
|
getLibraryFragment().setTitle(
|
||||||
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.albums);
|
PreferenceUtil.getInstance(getContext()).tabTitles() ? R.string.library : R.string.albums);
|
||||||
if (getAdapter().getDataSet().isEmpty()) {
|
if (getAdapter().getDataSet().isEmpty()) {
|
||||||
|
|
|
@ -7,7 +7,6 @@ import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.annotation.StringRes;
|
import android.support.annotation.StringRes;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
|
@ -19,12 +18,18 @@ import android.view.MenuItem;
|
||||||
import android.view.SubMenu;
|
import android.view.SubMenu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.afollestad.materialcab.MaterialCab;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.OnClick;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
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.TintHelper;
|
||||||
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.dialogs.CreatePlaylistDialog;
|
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog;
|
||||||
|
@ -40,20 +45,22 @@ import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroUtil;
|
import code.name.monkey.retromusic.util.RetroUtil;
|
||||||
import com.afollestad.materialcab.MaterialCab;
|
import code.name.monkey.retromusic.views.IconImageView;
|
||||||
|
|
||||||
public class LibraryFragment extends AbsMainActivityFragment implements CabHolder,
|
public class LibraryFragment extends AbsMainActivityFragment implements CabHolder,
|
||||||
MainActivityFragmentCallbacks {
|
MainActivityFragmentCallbacks {
|
||||||
|
|
||||||
private static final String TAG = "LibraryFragment";
|
public static final String TAG = "LibraryFragment";
|
||||||
private static final String CURRENT_TAB_ID = "current_tab_id";
|
private static final String CURRENT_TAB_ID = "current_tab_id";
|
||||||
|
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
@BindView(R.id.app_bar)
|
@BindView(R.id.app_bar)
|
||||||
AppBarLayout appbar;
|
AppBarLayout appbar;
|
||||||
@BindView(R.id.collapsing_toolbar)
|
@BindView(R.id.title)
|
||||||
CollapsingToolbarLayout collapsingToolbarLayout;
|
TextView title;
|
||||||
|
@BindView(R.id.search)
|
||||||
|
IconImageView search;
|
||||||
|
|
||||||
private Unbinder unBinder;
|
private Unbinder unBinder;
|
||||||
private MaterialCab cab;
|
private MaterialCab cab;
|
||||||
|
@ -68,7 +75,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(@StringRes int name) {
|
public void setTitle(@StringRes int name) {
|
||||||
collapsingToolbarLayout.setTitle(getString(name));
|
title.setText(getString(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addOnAppBarOffsetChangedListener(
|
public void addOnAppBarOffsetChangedListener(
|
||||||
|
@ -97,11 +104,9 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
setStatusbarColorAuto(view);
|
setStatusbarColorAuto(view);
|
||||||
getMainActivity().setBottomBarVisibility(View.VISIBLE);
|
getMainActivity().setBottomBarVisibility(View.VISIBLE);
|
||||||
setupToolbar();
|
setupToolbar();
|
||||||
|
|
||||||
inflateFragment();
|
inflateFragment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,12 +134,15 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
|
|
||||||
@SuppressWarnings("ConstantConditions")
|
@SuppressWarnings("ConstantConditions")
|
||||||
private void setupToolbar() {
|
private void setupToolbar() {
|
||||||
|
title.setTextColor(ThemeStore.textColorPrimary(getContext()));
|
||||||
|
TintHelper.setTintAuto(search, ThemeStore.textColorSecondary(getContext()), false);
|
||||||
|
|
||||||
int primaryColor = ThemeStore.primaryColor(getContext());
|
int primaryColor = ThemeStore.primaryColor(getContext());
|
||||||
appbar.setBackgroundColor(primaryColor);
|
appbar.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(primaryColor);
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
||||||
getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
||||||
getMainActivity().setTitle(R.string.app_name);
|
getMainActivity().setTitle(null);
|
||||||
getMainActivity().setSupportActionBar(toolbar);
|
getMainActivity().setSupportActionBar(toolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,6 +193,11 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
return cab;
|
return cab;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnClick(R.id.search)
|
||||||
|
void search() {
|
||||||
|
NavigationUtil.goToSearch(getActivity());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
|
|
@ -26,6 +26,21 @@ import android.webkit.MimeTypeMap;
|
||||||
import android.widget.PopupMenu;
|
import android.widget.PopupMenu;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.afollestad.materialcab.MaterialCab;
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
|
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileFilter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
|
@ -53,18 +68,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||||
import code.name.monkey.retromusic.util.ViewUtil;
|
import code.name.monkey.retromusic.util.ViewUtil;
|
||||||
import code.name.monkey.retromusic.views.BreadCrumbLayout;
|
import code.name.monkey.retromusic.views.BreadCrumbLayout;
|
||||||
import com.afollestad.materialcab.MaterialCab;
|
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
|
||||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileFilter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.ref.WeakReference;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class FoldersFragment extends AbsMainActivityFragment implements
|
public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
MainActivityFragmentCallbacks,
|
MainActivityFragmentCallbacks,
|
||||||
|
@ -95,7 +98,6 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
BreadCrumbLayout breadCrumbs;
|
BreadCrumbLayout breadCrumbs;
|
||||||
@BindView(R.id.appbar)
|
@BindView(R.id.appbar)
|
||||||
AppBarLayout appbar;
|
AppBarLayout appbar;
|
||||||
|
|
||||||
@BindView(R.id.recycler_view)
|
@BindView(R.id.recycler_view)
|
||||||
FastScrollRecyclerView recyclerView;
|
FastScrollRecyclerView recyclerView;
|
||||||
|
|
||||||
|
@ -226,17 +228,12 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
int primaryColor = ThemeStore.primaryColor(getActivity());
|
int primaryColor = ThemeStore.primaryColor(getActivity());
|
||||||
TintHelper.setTintAuto(container, primaryColor, true);
|
TintHelper.setTintAuto(container, primaryColor, true);
|
||||||
appbar.setBackgroundColor(ColorUtil.darkenColor(primaryColor));
|
appbar.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(ColorUtil.darkenColor(primaryColor));
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
//breadCrumbs.setBackgroundColor(primaryColor);
|
//breadCrumbs.setBackgroundColor(primaryColor);
|
||||||
breadCrumbs.setActivatedContentColor(
|
breadCrumbs.setActivatedContentColor(ToolbarContentTintHelper.toolbarTitleColor(getActivity(), ColorUtil.darkenColor(primaryColor)));
|
||||||
ToolbarContentTintHelper
|
breadCrumbs.setDeactivatedContentColor(ToolbarContentTintHelper.toolbarSubtitleColor(getActivity(), ColorUtil.darkenColor(primaryColor)));
|
||||||
.toolbarTitleColor(getActivity(), ColorUtil.darkenColor(primaryColor)));
|
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
||||||
breadCrumbs.setDeactivatedContentColor(
|
|
||||||
ToolbarContentTintHelper
|
|
||||||
.toolbarSubtitleColor(getActivity(), ColorUtil.darkenColor(primaryColor)));
|
|
||||||
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity()
|
|
||||||
.setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpToolbar() {
|
private void setUpToolbar() {
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
package code.name.monkey.retromusic.ui.fragments.mainactivity.home;
|
package code.name.monkey.retromusic.ui.fragments.mainactivity.home;
|
||||||
|
|
||||||
import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.widget.GridLayoutManager;
|
import android.support.v7.widget.GridLayoutManager;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
|
@ -22,13 +19,16 @@ import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
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.TintHelper;
|
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.dialogs.HomeOptionDialog;
|
import code.name.monkey.retromusic.dialogs.HomeOptionDialog;
|
||||||
|
@ -56,8 +56,8 @@ import code.name.monkey.retromusic.views.MetalRecyclerViewPager;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.CompositeDisposable;
|
import io.reactivex.disposables.CompositeDisposable;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
||||||
|
|
||||||
public class BannerHomeFragment extends AbsMainActivityFragment implements
|
public class BannerHomeFragment extends AbsMainActivityFragment implements
|
||||||
MainActivityFragmentCallbacks,
|
MainActivityFragmentCallbacks,
|
||||||
|
@ -161,8 +161,8 @@ public class BannerHomeFragment extends AbsMainActivityFragment implements
|
||||||
private void setupToolbar() {
|
private void setupToolbar() {
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
int primaryColor = ThemeStore.primaryColor(getContext());
|
int primaryColor = ThemeStore.primaryColor(getContext());
|
||||||
appbar.setBackgroundColor(ColorUtil.darkenColor(primaryColor));
|
appbar.setBackgroundColor(primaryColor);
|
||||||
toolbar.setBackgroundColor(ColorUtil.darkenColor(primaryColor));
|
toolbar.setBackgroundColor(primaryColor);
|
||||||
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
appbar.addOnOffsetChangedListener((appBarLayout, verticalOffset) ->
|
||||||
getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext())));
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
||||||
public class HomeFragment extends AbsMainActivityFragment implements MainActivityFragmentCallbacks,
|
public class HomeFragment extends AbsMainActivityFragment implements MainActivityFragmentCallbacks,
|
||||||
HomeContract.HomeView {
|
HomeContract.HomeView {
|
||||||
|
|
||||||
private static final String TAG = "HomeFragment";
|
public static final String TAG = "HomeFragment";
|
||||||
Unbinder unbinder;
|
Unbinder unbinder;
|
||||||
@BindView(R.id.home_toolbar)
|
@BindView(R.id.home_toolbar)
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
|
@ -412,3 +412,412 @@ public class HomeFragment extends AbsMainActivityFragment implements MainActivit
|
||||||
homePresenter.loadRecentAlbums();
|
homePresenter.loadRecentAlbums();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.design.widget.AppBarLayout;
|
||||||
|
import android.support.design.widget.CollapsingToolbarLayout;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.support.v7.widget.DefaultItemAnimator;
|
||||||
|
import android.support.v7.widget.GridLayoutManager;
|
||||||
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.Display;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.BindViews;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.OnClick;
|
||||||
|
import butterknife.Unbinder;
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||||
|
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
|
import code.name.monkey.retromusic.R;
|
||||||
|
import code.name.monkey.retromusic.dialogs.HomeOptionDialog;
|
||||||
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||||
|
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
||||||
|
import code.name.monkey.retromusic.loaders.SongLoader;
|
||||||
|
import code.name.monkey.retromusic.misc.AppBarStateChangeListener;
|
||||||
|
import code.name.monkey.retromusic.model.Album;
|
||||||
|
import code.name.monkey.retromusic.model.Artist;
|
||||||
|
import code.name.monkey.retromusic.model.Genre;
|
||||||
|
import code.name.monkey.retromusic.model.Home;
|
||||||
|
import code.name.monkey.retromusic.model.Song;
|
||||||
|
import code.name.monkey.retromusic.model.smartplaylist.HistoryPlaylist;
|
||||||
|
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist;
|
||||||
|
import code.name.monkey.retromusic.model.smartplaylist.MyTopTracksPlaylist;
|
||||||
|
import code.name.monkey.retromusic.mvp.contract.HomeContract;
|
||||||
|
import code.name.monkey.retromusic.mvp.presenter.HomePresenter;
|
||||||
|
import code.name.monkey.retromusic.ui.adapter.CollageSongAdapter;
|
||||||
|
import code.name.monkey.retromusic.ui.adapter.GenreAdapter;
|
||||||
|
import code.name.monkey.retromusic.ui.adapter.album.AlbumFullWithAdapter;
|
||||||
|
import code.name.monkey.retromusic.ui.adapter.artist.ArtistAdapter;
|
||||||
|
import code.name.monkey.retromusic.ui.adapter.home.HomeAdapter;
|
||||||
|
import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment;
|
||||||
|
import code.name.monkey.retromusic.util.Compressor;
|
||||||
|
import code.name.monkey.retromusic.util.NavigationUtil;
|
||||||
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
|
import code.name.monkey.retromusic.util.RetroUtil;
|
||||||
|
import code.name.monkey.retromusic.views.CircularImageView;
|
||||||
|
import code.name.monkey.retromusic.views.MetalRecyclerViewPager;
|
||||||
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
|
import io.reactivex.disposables.CompositeDisposable;
|
||||||
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
|
import static code.name.monkey.retromusic.Constants.USER_BANNER;
|
||||||
|
import static code.name.monkey.retromusic.Constants.USER_PROFILE;
|
||||||
|
|
||||||
|
public class HomeFragment extends AbsMainActivityFragment implements MainActivityFragmentCallbacks,
|
||||||
|
HomeContract.HomeView {
|
||||||
|
|
||||||
|
public static final String TAG = "HomeFragment";
|
||||||
|
Unbinder unbinder;
|
||||||
|
|
||||||
|
@BindView(R.id.home_toolbar)
|
||||||
|
Toolbar toolbar;
|
||||||
|
|
||||||
|
@BindView(R.id.appbar)
|
||||||
|
AppBarLayout appbar;
|
||||||
|
|
||||||
|
@BindView(R.id.image)
|
||||||
|
ImageView imageView;
|
||||||
|
|
||||||
|
@BindView(R.id.user_image)
|
||||||
|
CircularImageView userImage;
|
||||||
|
|
||||||
|
@BindView(R.id.collapsing_toolbar)
|
||||||
|
CollapsingToolbarLayout toolbarLayout;
|
||||||
|
|
||||||
|
@BindView(R.id.container)
|
||||||
|
View container;
|
||||||
|
|
||||||
|
@BindView(R.id.title)
|
||||||
|
TextView title;
|
||||||
|
|
||||||
|
@BindView(R.id.search)
|
||||||
|
ImageView search;
|
||||||
|
|
||||||
|
@BindViews({R.id.recent_artist_container, R.id.recent_albums_container,
|
||||||
|
R.id.top_artist_container, R.id.top_albums_container,
|
||||||
|
R.id.genre_container})
|
||||||
|
List<View> sectionContainers;
|
||||||
|
|
||||||
|
@BindViews({R.id.recent_artist_recycler_view, R.id.top_artist_recycler_view,
|
||||||
|
R.id.genres_recycler_view})
|
||||||
|
List<RecyclerView> sectionRecyclerViews;
|
||||||
|
|
||||||
|
@BindViews({R.id.recent_albums_recycler_view, R.id.top_album_recycler_view})
|
||||||
|
List<MetalRecyclerViewPager> metalRecyclerViewPagers;
|
||||||
|
|
||||||
|
private HomePresenter homePresenter;
|
||||||
|
private CompositeDisposable disposable;
|
||||||
|
|
||||||
|
public static HomeFragment newInstance() {
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
HomeFragment fragment = new HomeFragment();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getTimeOfTheDay() {
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
int timeOfDay = c.get(Calendar.HOUR_OF_DAY);
|
||||||
|
|
||||||
|
String[] images = new String[]{};
|
||||||
|
if (timeOfDay >= 0 && timeOfDay < 6) {
|
||||||
|
images = getResources().getStringArray(R.array.night);
|
||||||
|
} else if (timeOfDay >= 6 && timeOfDay < 12) {
|
||||||
|
images = getResources().getStringArray(R.array.morning);
|
||||||
|
} else if (timeOfDay >= 12 && timeOfDay < 16) {
|
||||||
|
images = getResources().getStringArray(R.array.after_noon);
|
||||||
|
} else if (timeOfDay >= 16 && timeOfDay < 20) {
|
||||||
|
images = getResources().getStringArray(R.array.evening);
|
||||||
|
} else if (timeOfDay >= 20 && timeOfDay < 24) {
|
||||||
|
images = getResources().getStringArray(R.array.night);
|
||||||
|
}
|
||||||
|
String day = images[new Random().nextInt(images.length)];
|
||||||
|
loadTimeImage(day);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadTimeImage(String day) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
if (PreferenceUtil.getInstance(getActivity()).getBannerImage().isEmpty()) {
|
||||||
|
if (imageView != null) {
|
||||||
|
Glide.with(getActivity()).load(day)
|
||||||
|
.asBitmap()
|
||||||
|
.placeholder(R.drawable.material_design_default)
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
|
||||||
|
.into(imageView);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
loadBannerFromStorage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadBannerFromStorage() {
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
disposable.add(new Compressor(getContext())
|
||||||
|
.setQuality(100)
|
||||||
|
.setCompressFormat(Bitmap.CompressFormat.WEBP)
|
||||||
|
.compressToBitmapAsFlowable(
|
||||||
|
new File(PreferenceUtil.getInstance(getContext()).getBannerImage(), USER_BANNER))
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(imageView::setImageBitmap));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadImageFromStorage(ImageView imageView) {
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
disposable.add(new Compressor(getContext())
|
||||||
|
.setMaxHeight(300)
|
||||||
|
.setMaxWidth(300)
|
||||||
|
.setQuality(75)
|
||||||
|
.setCompressFormat(Bitmap.CompressFormat.WEBP)
|
||||||
|
.compressToBitmapAsFlowable(
|
||||||
|
new File(PreferenceUtil.getInstance(getContext()).getProfileImage(), USER_PROFILE))
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(imageView::setImageBitmap,
|
||||||
|
throwable -> imageView.setImageDrawable(ContextCompat
|
||||||
|
.getDrawable(getContext(), R.drawable.ic_person_flat))));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
disposable = new CompositeDisposable();
|
||||||
|
homePresenter = new HomePresenter(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||||
|
@Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_home, container, false);
|
||||||
|
unbinder = ButterKnife.bind(this, view);
|
||||||
|
setRetainInstance(true);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
|
getMainActivity().getSlidingUpPanelLayout().setShadowHeight(8);
|
||||||
|
getMainActivity().setBottomBarVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
setupToolbar();
|
||||||
|
loadImageFromStorage(userImage);
|
||||||
|
|
||||||
|
homePresenter.subscribe();
|
||||||
|
checkPadding();
|
||||||
|
getTimeOfTheDay();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
|
private void setupToolbar() {
|
||||||
|
if (!PreferenceUtil.getInstance(getContext()).getFullScreenMode()) {
|
||||||
|
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) toolbar
|
||||||
|
.getLayoutParams();
|
||||||
|
params.topMargin = RetroUtil.getStatusBarHeight(getContext());
|
||||||
|
toolbar.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
appbar.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onStateChanged(AppBarLayout appBarLayout, State state) {
|
||||||
|
int color;
|
||||||
|
switch (state) {
|
||||||
|
case COLLAPSED:
|
||||||
|
getMainActivity().setLightStatusbar(!ATHUtil.isWindowBackgroundDark(getContext()));
|
||||||
|
color = ThemeStore.textColorPrimary(getContext());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case EXPANDED:
|
||||||
|
case IDLE:
|
||||||
|
getMainActivity().setLightStatusbar(false);
|
||||||
|
color = Color.WHITE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
TintHelper.setTintAuto(search, color, false);
|
||||||
|
title.setTextColor(color);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
int primaryColor = ThemeStore.primaryColor(getContext());
|
||||||
|
|
||||||
|
TintHelper.setTintAuto(container, primaryColor, true);
|
||||||
|
toolbarLayout.setStatusBarScrimColor(primaryColor);
|
||||||
|
toolbarLayout.setContentScrimColor(primaryColor);
|
||||||
|
|
||||||
|
toolbar.setTitle(R.string.home);
|
||||||
|
getMainActivity().setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handleBackPress() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
unbinder.unbind();
|
||||||
|
disposable.clear();
|
||||||
|
homePresenter.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loading() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showEmptyView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void completed() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showData(ArrayList<Home> homes) {
|
||||||
|
HomeAdapter homeAdapter = new HomeAdapter(getMainActivity());
|
||||||
|
homeAdapter.swapData(homes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onServiceConnected() {
|
||||||
|
super.onServiceConnected();
|
||||||
|
checkPadding();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onQueueChanged() {
|
||||||
|
super.onQueueChanged();
|
||||||
|
checkPadding();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkPadding() {
|
||||||
|
int height = getResources().getDimensionPixelSize(R.dimen.mini_player_height);
|
||||||
|
container.setPadding(0, 0, 0, MusicPlayerRemote.getPlayingQueue().isEmpty() ? height * 2 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DisplayMetrics getDisplayMetrics() {
|
||||||
|
Display display = getMainActivity().getWindowManager().getDefaultDisplay();
|
||||||
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
|
display.getMetrics(metrics);
|
||||||
|
return metrics;
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnClick({R.id.last_added, R.id.top_played, R.id.action_shuffle,
|
||||||
|
R.id.history, R.id.user_image, R.id.search})
|
||||||
|
void startUserInfo(View view) {
|
||||||
|
Activity activity = getActivity();
|
||||||
|
if (activity != null) {
|
||||||
|
switch (view.getId()) {
|
||||||
|
case R.id.action_shuffle:
|
||||||
|
MusicPlayerRemote
|
||||||
|
.openAndShuffleQueue(SongLoader.getAllSongs(activity).blockingFirst(), true);
|
||||||
|
break;
|
||||||
|
case R.id.last_added:
|
||||||
|
NavigationUtil.goToPlaylistNew(activity, new LastAddedPlaylist(activity));
|
||||||
|
break;
|
||||||
|
case R.id.top_played:
|
||||||
|
NavigationUtil.goToPlaylistNew(activity, new MyTopTracksPlaylist(activity));
|
||||||
|
break;
|
||||||
|
case R.id.history:
|
||||||
|
NavigationUtil.goToPlaylistNew(activity, new HistoryPlaylist(activity));
|
||||||
|
break;
|
||||||
|
case R.id.search:
|
||||||
|
NavigationUtil.goToSearch(activity);
|
||||||
|
break;
|
||||||
|
case R.id.user_image:
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
new HomeOptionDialog().show(getFragmentManager(), TAG);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showRecentAlbums(ArrayList<Album> albums) {
|
||||||
|
sectionContainers.get(1).setVisibility(View.VISIBLE);
|
||||||
|
AlbumFullWithAdapter albumFullWithAdapter = new AlbumFullWithAdapter(getMainActivity(),
|
||||||
|
getDisplayMetrics());
|
||||||
|
albumFullWithAdapter.swapData(albums);
|
||||||
|
|
||||||
|
MetalRecyclerViewPager recyclerView = metalRecyclerViewPagers.get(0);
|
||||||
|
recyclerView.setAdapter(albumFullWithAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showTopAlbums(ArrayList<Album> albums) {
|
||||||
|
sectionContainers.get(3).setVisibility(View.VISIBLE);
|
||||||
|
AlbumFullWithAdapter albumFullWithAdapter = new AlbumFullWithAdapter(getMainActivity(),
|
||||||
|
getDisplayMetrics());
|
||||||
|
albumFullWithAdapter.swapData(albums);
|
||||||
|
|
||||||
|
MetalRecyclerViewPager recyclerView = metalRecyclerViewPagers.get(1);
|
||||||
|
recyclerView.setAdapter(albumFullWithAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showRecentArtist(ArrayList<Artist> artists) {
|
||||||
|
sectionContainers.get(0).setVisibility(View.VISIBLE);
|
||||||
|
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 1,
|
||||||
|
GridLayoutManager.HORIZONTAL, false);
|
||||||
|
ArtistAdapter artistAdapter = new ArtistAdapter(getMainActivity(), artists, R.layout.item_artist);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = sectionRecyclerViews.get(0);
|
||||||
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||||
|
recyclerView.setAdapter(artistAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showTopArtist(ArrayList<Artist> artists) {
|
||||||
|
sectionContainers.get(2).setVisibility(View.VISIBLE);
|
||||||
|
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 1,
|
||||||
|
GridLayoutManager.HORIZONTAL, false);
|
||||||
|
ArtistAdapter artistAdapter = new ArtistAdapter(getMainActivity(), artists, R.layout.item_artist);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = sectionRecyclerViews.get(1);
|
||||||
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
|
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||||
|
recyclerView.setAdapter(artistAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showGenres(ArrayList<Genre> genres) {
|
||||||
|
sectionContainers.get(4).setVisibility(View.VISIBLE);
|
||||||
|
RecyclerView recyclerView = sectionRecyclerViews.get(2);
|
||||||
|
recyclerView.setLayoutManager(new LinearLayoutManager(recyclerView.getContext()));
|
||||||
|
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||||
|
recyclerView.setAdapter(new GenreAdapter(getMainActivity(), genres, R.layout.item_list));
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
|
@ -31,9 +31,9 @@ import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||||
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper;
|
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper;
|
||||||
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener;
|
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener;
|
||||||
import code.name.monkey.retromusic.model.Song;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
import code.name.monkey.retromusic.ui.fragments.VolumeFragment;
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment;
|
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment;
|
||||||
import code.name.monkey.retromusic.util.MusicUtil;
|
import code.name.monkey.retromusic.util.MusicUtil;
|
||||||
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Hemanth S (h4h13).
|
* @author Hemanth S (h4h13).
|
||||||
|
@ -41,21 +41,31 @@ import code.name.monkey.retromusic.util.MusicUtil;
|
||||||
public class LockScreenPlayerControlsFragment extends AbsPlayerControlsFragment {
|
public class LockScreenPlayerControlsFragment extends AbsPlayerControlsFragment {
|
||||||
@BindView(R.id.player_play_pause_button)
|
@BindView(R.id.player_play_pause_button)
|
||||||
AppCompatImageButton playPauseFab;
|
AppCompatImageButton playPauseFab;
|
||||||
|
|
||||||
@BindView(R.id.player_prev_button)
|
@BindView(R.id.player_prev_button)
|
||||||
ImageButton prevButton;
|
ImageButton prevButton;
|
||||||
|
|
||||||
@BindView(R.id.player_next_button)
|
@BindView(R.id.player_next_button)
|
||||||
ImageButton nextButton;
|
ImageButton nextButton;
|
||||||
|
|
||||||
@BindView(R.id.player_progress_slider)
|
@BindView(R.id.player_progress_slider)
|
||||||
AppCompatSeekBar progressSlider;
|
AppCompatSeekBar progressSlider;
|
||||||
|
|
||||||
@BindView(R.id.player_song_total_time)
|
@BindView(R.id.player_song_total_time)
|
||||||
TextView songTotalTime;
|
TextView songTotalTime;
|
||||||
|
|
||||||
@BindView(R.id.player_song_current_progress)
|
@BindView(R.id.player_song_current_progress)
|
||||||
TextView songCurrentProgress;
|
TextView songCurrentProgress;
|
||||||
|
|
||||||
@BindView(R.id.title)
|
@BindView(R.id.title)
|
||||||
AppCompatTextView title;
|
AppCompatTextView title;
|
||||||
|
|
||||||
@BindView(R.id.text)
|
@BindView(R.id.text)
|
||||||
AppCompatTextView text;
|
AppCompatTextView text;
|
||||||
|
|
||||||
|
@BindView(R.id.volume_fragment_container)
|
||||||
|
View volumeContainer;
|
||||||
|
|
||||||
private Unbinder unbinder;
|
private Unbinder unbinder;
|
||||||
private MusicProgressViewUpdateHelper progressViewUpdateHelper;
|
private MusicProgressViewUpdateHelper progressViewUpdateHelper;
|
||||||
private int lastPlaybackControlsColor;
|
private int lastPlaybackControlsColor;
|
||||||
|
@ -82,7 +92,9 @@ public class LockScreenPlayerControlsFragment extends AbsPlayerControlsFragment
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setUpMusicControllers();
|
setUpMusicControllers();
|
||||||
|
|
||||||
VolumeFragment volumeFragment = (VolumeFragment) getChildFragmentManager().findFragmentById(R.id.volume_fragment);
|
//noinspection ConstantConditions
|
||||||
|
volumeContainer.setVisibility(PreferenceUtil.getInstance(getContext()).getVolumeToggle()
|
||||||
|
? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ package code.name.monkey.retromusic.ui.fragments.player.plain;
|
||||||
|
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.graphics.PorterDuff;
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.ClipDrawable;
|
|
||||||
import android.graphics.drawable.LayerDrawable;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
@ -16,6 +14,7 @@ import android.view.animation.LinearInterpolator;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
|
@ -59,6 +58,7 @@ public class PlainPlaybackControlsFragment extends AbsPlayerControlsFragment {
|
||||||
TextView songCurrentProgress;
|
TextView songCurrentProgress;
|
||||||
@BindView(R.id.volume_fragment_container)
|
@BindView(R.id.volume_fragment_container)
|
||||||
View volumeContainer;
|
View volumeContainer;
|
||||||
|
|
||||||
private Unbinder unbinder;
|
private Unbinder unbinder;
|
||||||
private PlayPauseDrawable playerFabPlayPauseDrawable;
|
private PlayPauseDrawable playerFabPlayPauseDrawable;
|
||||||
private int lastPlaybackControlsColor;
|
private int lastPlaybackControlsColor;
|
||||||
|
@ -285,30 +285,21 @@ public class PlainPlaybackControlsFragment extends AbsPlayerControlsFragment {
|
||||||
MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
|
MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PreferenceUtil.getInstance(getContext()).getAdaptiveColor()) {
|
int finalColor = PreferenceUtil.getInstance(getContext()).getAdaptiveColor()
|
||||||
TintHelper.setTintAuto(playPauseFab,
|
? dark : ThemeStore.accentColor(getContext());
|
||||||
MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(dark)),
|
|
||||||
false);
|
|
||||||
TintHelper.setTintAuto(playPauseFab, dark, true);
|
|
||||||
setProgressBarColor(dark);
|
setProgressBarColor(dark);
|
||||||
} else {
|
TintHelper.setTintAuto(playPauseFab, MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(finalColor)), false);
|
||||||
int accentColor = ThemeStore.accentColor(getContext());
|
TintHelper.setTintAuto(playPauseFab, finalColor, true);
|
||||||
setProgressBarColor(accentColor);
|
|
||||||
TintHelper.setTintAuto(playPauseFab,
|
|
||||||
MaterialValueHelper
|
|
||||||
.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(accentColor)),
|
|
||||||
false);
|
|
||||||
TintHelper.setTintAuto(playPauseFab, accentColor, true);
|
|
||||||
}
|
|
||||||
updateRepeatState();
|
updateRepeatState();
|
||||||
updateShuffleState();
|
updateShuffleState();
|
||||||
updatePrevNextColor();
|
updatePrevNextColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProgressBarColor(int newColor) {
|
public void setProgressBarColor(int newColor) {
|
||||||
LayerDrawable ld = (LayerDrawable) progressSlider.getProgressDrawable();
|
TintHelper.setTintAuto(progressSlider, newColor, false);
|
||||||
ClipDrawable clipDrawable = (ClipDrawable) ld.findDrawableByLayerId(android.R.id.progress);
|
|
||||||
clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpPlayPauseFab() {
|
private void setUpPlayPauseFab() {
|
||||||
|
|
|
@ -59,18 +59,17 @@ public abstract class AbsSettingsFragment extends ATEPreferenceFragmentCompat {
|
||||||
setDividerHeight(0);
|
setDividerHeight(0);
|
||||||
setDivider(new ColorDrawable(Color.TRANSPARENT));
|
setDivider(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
//noinspection ConstantConditions
|
||||||
getListView().setPadding(DensityUtil.dip2px(getContext(), 0), 0, 0, 0);
|
getListView().setPadding(DensityUtil.dip2px(getContext(), 0), 0, 0, 0);
|
||||||
getListView().addOnScrollListener(new RecyclerView.OnScrollListener() {
|
getListView().addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
|
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
|
||||||
super.onScrolled(recyclerView, dx, dy);
|
super.onScrolled(recyclerView, dx, dy);
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
((SettingsActivity) getActivity())
|
((SettingsActivity) getActivity()).addAppbarLayoutElevation(recyclerView.canScrollVertically(RecyclerView.NO_POSITION) ? 8f : 0f);
|
||||||
.addAppbarLayoutElevation(recyclerView.canScrollVertically(RecyclerView.NO_POSITION) ? 8f : 0f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//noinspection ConstantConditions
|
|
||||||
getListView().setBackgroundColor(ThemeStore.primaryColor(getContext()));
|
getListView().setBackgroundColor(ThemeStore.primaryColor(getContext()));
|
||||||
getListView().setOverScrollMode(View.OVER_SCROLL_NEVER);
|
getListView().setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||||
invalidateSettings();
|
invalidateSettings();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.graphics.PorterDuff;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.annotation.StringRes;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -57,29 +58,29 @@ public class MainSettingsFragment extends Fragment {
|
||||||
public void onViewClicked(View view) {
|
public void onViewClicked(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.general_settings:
|
case R.id.general_settings:
|
||||||
inflateFragment(new ThemeSettingsFragment());
|
inflateFragment(new ThemeSettingsFragment(), R.string.general_settings_title);
|
||||||
break;
|
break;
|
||||||
case R.id.audio_settings:
|
case R.id.audio_settings:
|
||||||
inflateFragment(new AudioSettings());
|
inflateFragment(new AudioSettings(), R.string.pref_header_audio);
|
||||||
break;
|
break;
|
||||||
case R.id.now_playing_settings:
|
case R.id.now_playing_settings:
|
||||||
inflateFragment(new NowPlayingSettingsFragment());
|
inflateFragment(new NowPlayingSettingsFragment(), R.string.personalize);
|
||||||
break;
|
break;
|
||||||
case R.id.image_settings:
|
case R.id.image_settings:
|
||||||
inflateFragment(new ImageSettingFragment());
|
inflateFragment(new ImageSettingFragment(), R.string.pref_header_images);
|
||||||
break;
|
break;
|
||||||
case R.id.notification_settings:
|
case R.id.notification_settings:
|
||||||
inflateFragment(new NotificationSettingsFragment());
|
inflateFragment(new NotificationSettingsFragment(), R.string.notification);
|
||||||
break;
|
break;
|
||||||
case R.id.other_settings:
|
case R.id.other_settings:
|
||||||
inflateFragment(new OtherSettingsFragment());
|
inflateFragment(new OtherSettingsFragment(), R.string.others);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void inflateFragment(Fragment fragment) {
|
private void inflateFragment(Fragment fragment, @StringRes int title) {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
((SettingsActivity) getActivity()).setupFragment(fragment);
|
((SettingsActivity) getActivity()).setupFragment(fragment, title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,5 @@
|
||||||
package code.name.monkey.retromusic.util;
|
package code.name.monkey.retromusic.util;
|
||||||
|
|
||||||
import static code.name.monkey.retromusic.ui.activities.GenreDetailsActivity.EXTRA_GENRE_ID;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -12,6 +10,7 @@ import android.support.v4.app.ActivityCompat;
|
||||||
import android.support.v4.app.ActivityOptionsCompat;
|
import android.support.v4.app.ActivityOptionsCompat;
|
||||||
import android.support.v4.util.Pair;
|
import android.support.v4.util.Pair;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
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.model.Genre;
|
import code.name.monkey.retromusic.model.Genre;
|
||||||
|
@ -31,6 +30,11 @@ import code.name.monkey.retromusic.ui.activities.SettingsActivity;
|
||||||
import code.name.monkey.retromusic.ui.activities.SupportDevelopmentActivity;
|
import code.name.monkey.retromusic.ui.activities.SupportDevelopmentActivity;
|
||||||
import code.name.monkey.retromusic.ui.activities.UserInfoActivity;
|
import code.name.monkey.retromusic.ui.activities.UserInfoActivity;
|
||||||
|
|
||||||
|
import static code.name.monkey.retromusic.Constants.RATE_ON_GOOGLE_PLAY;
|
||||||
|
import static code.name.monkey.retromusic.ui.activities.GenreDetailsActivity.EXTRA_GENRE_ID;
|
||||||
|
import static code.name.monkey.retromusic.util.RetroUtil.openUrl;
|
||||||
|
|
||||||
|
|
||||||
public class NavigationUtil {
|
public class NavigationUtil {
|
||||||
|
|
||||||
public static void goToAlbum(@NonNull Activity activity, int i,
|
public static void goToAlbum(@NonNull Activity activity, int i,
|
||||||
|
@ -124,7 +128,10 @@ public class NavigationUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void goToSupportDevelopment(Activity activity) {
|
public static void goToSupportDevelopment(Activity activity) {
|
||||||
ActivityCompat
|
ActivityCompat.startActivity(activity, new Intent(activity, SupportDevelopmentActivity.class), null);
|
||||||
.startActivity(activity, new Intent(activity, SupportDevelopmentActivity.class), null);
|
}
|
||||||
|
|
||||||
|
public static void goToPlayStore(Activity activity) {
|
||||||
|
openUrl(activity, RATE_ON_GOOGLE_PLAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class RetroUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void openUrl(AppCompatActivity context, String str) {
|
public static void openUrl(Activity context, String str) {
|
||||||
Intent intent = new Intent("android.intent.action.VIEW");
|
Intent intent = new Intent("android.intent.action.VIEW");
|
||||||
intent.setData(Uri.parse(str));
|
intent.setData(Uri.parse(str));
|
||||||
intent.setFlags(268435456);
|
intent.setFlags(268435456);
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class MetalRecyclerViewPager extends RecyclerView {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(VH holder, int position) {
|
public void onBindViewHolder(@NonNull VH holder, int position) {
|
||||||
int currentItemWidth = itemWidth;
|
int currentItemWidth = itemWidth;
|
||||||
|
|
||||||
if (position == 0) {
|
if (position == 0) {
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
package code.name.monkey.retromusic.views;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.TypedArray;
|
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.graphics.Path;
|
|
||||||
import android.graphics.RectF;
|
|
||||||
import android.graphics.Region;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import code.name.monkey.retromusic.R;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Frame layout that has rounded corners (it clips content too).
|
|
||||||
*
|
|
||||||
* @author Anton Chekulaev
|
|
||||||
*/
|
|
||||||
public class RoundCornerFrameLayout extends FrameLayout {
|
|
||||||
|
|
||||||
private final Path stencilPath = new Path();
|
|
||||||
private float cornerRadius = 0;
|
|
||||||
|
|
||||||
public RoundCornerFrameLayout(Context context) {
|
|
||||||
this(context, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoundCornerFrameLayout(Context context, AttributeSet attrs) {
|
|
||||||
this(context, attrs, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public RoundCornerFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
||||||
super(context, attrs, defStyleAttr);
|
|
||||||
|
|
||||||
TypedArray attrArray = context
|
|
||||||
.obtainStyledAttributes(attrs, R.styleable.RoundCornerFrameLayout, 0, 0);
|
|
||||||
try {
|
|
||||||
cornerRadius = attrArray.getDimension(R.styleable.RoundCornerFrameLayout_corner_radius, 0f);
|
|
||||||
} finally {
|
|
||||||
attrArray.recycle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@Override
|
|
||||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
|
||||||
super.onSizeChanged(w, h, oldw, oldh);
|
|
||||||
|
|
||||||
// compute the path
|
|
||||||
stencilPath.reset();
|
|
||||||
stencilPath.addRoundRect(0, 0, w, h, cornerRadius, cornerRadius, Path.Direction.CW);
|
|
||||||
stencilPath.close();
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected void dispatchDraw(Canvas canvas) {
|
|
||||||
final int count = canvas.save();
|
|
||||||
final Path path = new Path();
|
|
||||||
final RectF rect = new RectF(0, 0, canvas.getWidth(), canvas.getHeight());
|
|
||||||
final float[] arrayRadius = {cornerRadius, cornerRadius, cornerRadius, cornerRadius,
|
|
||||||
cornerRadius, cornerRadius, cornerRadius, cornerRadius};
|
|
||||||
|
|
||||||
path.addRoundRect(rect, arrayRadius, Path.Direction.CW);
|
|
||||||
canvas.clipPath(path, Region.Op.REPLACE);
|
|
||||||
canvas.clipPath(path);
|
|
||||||
|
|
||||||
super.dispatchDraw(canvas);
|
|
||||||
|
|
||||||
canvas.restoreToCount(count);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,6 +6,9 @@ import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.BottomSheetDialog;
|
import android.support.design.widget.BottomSheetDialog;
|
||||||
import android.support.design.widget.BottomSheetDialogFragment;
|
import android.support.design.widget.BottomSheetDialogFragment;
|
||||||
|
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.ui.activities.base.AbsThemeActivity;
|
import code.name.monkey.retromusic.ui.activities.base.AbsThemeActivity;
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
|
@ -19,9 +22,18 @@ public class RoundedBottomSheetDialogFragment extends BottomSheetDialogFragment
|
||||||
@Override
|
@Override
|
||||||
public int getTheme() {
|
public int getTheme() {
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
return
|
if (PreferenceUtil.getInstance(getContext()).getGeneralTheme() == R.style.Theme_RetroMusic_Light) {
|
||||||
PreferenceUtil.getInstance(getContext()).getGeneralTheme() == R.style.Theme_RetroMusic_Light
|
return R.style.BottomSheetDialogTheme;
|
||||||
? R.style.BottomSheetDialogTheme : R.style.BottomSheetDialogThemeDark;
|
} else if (PreferenceUtil.getInstance(getContext()).getGeneralTheme() == R.style.Theme_RetroMusic_Color) {
|
||||||
|
int color = ThemeStore.primaryColor(getContext());
|
||||||
|
if (ColorUtil.isColorLight(color)) {
|
||||||
|
return R.style.BottomSheetDialogTheme;
|
||||||
|
} else {
|
||||||
|
return R.style.BottomSheetDialogThemeDark;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return R.style.BottomSheetDialogTheme;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@ -30,8 +42,6 @@ public class RoundedBottomSheetDialogFragment extends BottomSheetDialogFragment
|
||||||
AbsThemeActivity absThemeActivity = (AbsThemeActivity) getActivity();
|
AbsThemeActivity absThemeActivity = (AbsThemeActivity) getActivity();
|
||||||
if (absThemeActivity != null) {
|
if (absThemeActivity != null) {
|
||||||
absThemeActivity.setLightNavigationBar(true);
|
absThemeActivity.setLightNavigationBar(true);
|
||||||
Dialog dialog = new BottomSheetDialog(getContext(), getTheme());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
return new BottomSheetDialog(getContext(), getTheme());
|
return new BottomSheetDialog(getContext(), getTheme());
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class SansFontCollapsingToolbarLayout extends CollapsingToolbarLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(Context context) {
|
private void init(Context context) {
|
||||||
Typeface typefaceBold = TypefaceHelper.get(context, getResources().getString(R.string.sans_bold));
|
Typeface typefaceBold = TypefaceHelper.get(context, getResources().getString(R.string.circular_std_black));
|
||||||
setExpandedTitleTypeface(typefaceBold);
|
setExpandedTitleTypeface(typefaceBold);
|
||||||
setCollapsedTitleTypeface(typefaceBold);
|
setCollapsedTitleTypeface(typefaceBold);
|
||||||
|
|
||||||
|
|
1
app/src/main/res/drawable/bg_card_line.xml
Normal file
1
app/src/main/res/drawable/bg_card_line.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="2dp"
android:color="?attr/dividerColor" />
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
<solid android:color="@android:color/transparent" />
<padding android:bottom="8dp" />
</shape>
|
|
@ -3,6 +3,7 @@
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<corners
|
<corners
|
||||||
android:topLeftRadius="12dp"
|
android:topLeftRadius="12dp"
|
||||||
android:topRightRadius="12dp"/>
|
android:topRightRadius="12dp" />
|
||||||
<solid android:color="?attr/cardBackgroundColor"/>
|
<solid android:color="?attr/cardBackgroundColor" />
|
||||||
|
<padding android:top="8dp" />
|
||||||
</shape>
|
</shape>
|
|
@ -2,36 +2,43 @@
|
||||||
<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"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleGravity="top"
|
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/action_settings">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
|
tools:ignore="UnusedAttribute"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
app:title="">
|
||||||
app:title="@string/support_development"/>
|
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
tools:ignore="MissingPrefix"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/action_settings"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -44,13 +51,13 @@
|
||||||
android:id="@+id/content_frame"
|
android:id="@+id/content_frame"
|
||||||
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:layout_weight="1" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/detail_content_frame"
|
android:id="@+id/detail_content_frame"
|
||||||
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:layout_weight="1" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<include layout="@layout/status_bar"/>
|
<include layout="@layout/status_bar" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
||||||
app:expandedTitleGravity="top"
|
app:expandedTitleGravity="top"
|
||||||
app:expandedTitleMarginStart="16dp"
|
app:expandedTitleMarginStart="16dp"
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
app:layout_collapseMode="parallax"
|
app:layout_collapseMode="parallax"
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
app:layout_collapseParallaxMultiplier="0.7" />
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/home_toolbar"
|
android:id="@+id/home_toolbar"
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_search_white_24dp"/>
|
android:src="@drawable/ic_search_white_24dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -72,15 +72,15 @@
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:id="@+id/user_image"
|
android:id="@+id/user_image"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_weight="0"
|
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
app:civ_border="false"/>
|
android:layout_weight="0"
|
||||||
|
app:civ_border="false" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.Toolbar>
|
</android.support.v7.widget.Toolbar>
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
||||||
|
@ -99,17 +99,14 @@
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
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:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
android:layout_margin="4dp"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/abs_playlists"/>
|
<include layout="@layout/abs_playlists" />
|
||||||
|
|
||||||
<include layout="@layout/home_section_content"/>
|
<include layout="@layout/home_section_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -82,21 +82,20 @@
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
android:id="@+id/nested_scroll"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="64dp"
|
||||||
|
android:layout_marginEnd="64dp"
|
||||||
|
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
||||||
|
android:elevation="@dimen/card_elevation"
|
||||||
app:behavior_overlapTop="96dp"
|
app:behavior_overlapTop="96dp"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/container"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="64dp"
|
|
||||||
android:layout_marginStart="64dp"
|
|
||||||
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
|
@ -49,10 +49,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="16dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingTop="8dp">
|
android:paddingTop="8dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -64,8 +64,6 @@
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:freezesText="true"
|
android:freezesText="true"
|
||||||
android:marqueeRepeatLimit="marquee_forever"
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
android:paddingLeft="15dip"
|
|
||||||
android:paddingRight="15dip"
|
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
|
113
app/src/main/res/layout-sw600dp/fragment_banner_home.xml
Normal file
113
app/src/main/res/layout-sw600dp/fragment_banner_home.xml
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<include layout="@layout/status_bar"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<android.support.design.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<android.support.design.widget.AppBarLayout
|
||||||
|
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="96dp"
|
||||||
|
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
||||||
|
app:expandedTitleGravity="top"
|
||||||
|
app:expandedTitleMarginStart="16dp"
|
||||||
|
app:expandedTitleMarginTop="48dp"
|
||||||
|
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
||||||
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
app:layout_collapseMode="parallax"
|
||||||
|
app:layout_collapseParallaxMultiplier="0.7"/>
|
||||||
|
|
||||||
|
<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"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
tools:ignore="MissingPrefix"/>
|
||||||
|
|
||||||
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
|
android:id="@+id/user_image"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
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
|
||||||
|
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>
|
||||||
|
</LinearLayout>
|
|
@ -79,20 +79,19 @@
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
android:id="@+id/nested_scroll"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="96dp"
|
||||||
|
android:layout_marginEnd="96dp"
|
||||||
|
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
||||||
app:behavior_overlapTop="112dp"
|
app:behavior_overlapTop="112dp"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
android:id="@+id/container"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="64dp"
|
android:background="@drawable/bg_card_line"
|
||||||
android:layout_marginStart="64dp"
|
|
||||||
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
|
|
|
@ -1,36 +1,45 @@
|
||||||
<?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"
|
||||||
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/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/action_settings">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
android:title="@string/action_settings"
|
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:title="@string/action_settings" />
|
app:title=""
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/action_settings"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -79,21 +79,20 @@
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
android:id="@+id/nested_scroll"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="64dp"
|
||||||
|
android:layout_marginEnd="64dp"
|
||||||
|
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
||||||
app:behavior_overlapTop="96dp"
|
app:behavior_overlapTop="96dp"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/container"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="64dp"
|
android:background="@drawable/bg_card_line"
|
||||||
android:layout_marginStart="64dp"
|
|
||||||
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<include layout="@layout/status_bar"/>
|
<include layout="@layout/status_bar" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -21,40 +21,63 @@
|
||||||
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/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="?colorPrimary"
|
|
||||||
tools:ignore="UnusedAttribute">
|
|
||||||
|
|
||||||
<android.support.design.widget.CollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="62dp"
|
android:layout_height="wrap_content"
|
||||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
||||||
app:titleEnabled="false">
|
app:titleEnabled="false">
|
||||||
|
|
||||||
<View
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
app:layout_collapseMode="parallax"
|
app:layout_collapseMode="pin">
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
style="@style/Toolbar48"
|
|
||||||
android:background="?colorPrimary"
|
|
||||||
tools:ignore="UnusedAttribute"/>
|
|
||||||
|
|
||||||
|
|
||||||
</android.support.design.widget.CollapsingToolbarLayout>
|
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/cab_stub"
|
android:id="@+id/cab_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp" />
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
style="@style/Toolbar48"
|
||||||
|
app:title=""
|
||||||
|
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:background="?roundSelector"
|
||||||
|
android:padding="12dp"
|
||||||
|
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.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</FrameLayout>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +85,7 @@
|
||||||
android:id="@+id/fragment_container"
|
android:id="@+id/fragment_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
|
@ -8,38 +8,46 @@
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/action_about">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
app:title=""
|
||||||
app:title="@string/support_development"/>
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/action_about"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<include layout="@layout/activity_about_content"/>
|
<include layout="@layout/activity_about_content" />
|
||||||
|
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
|
@ -30,12 +30,12 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:transitionName="@string/transition_album_art"
|
android:transitionName="@string/transition_album_art"
|
||||||
tools:src="@drawable/hemanth_s"/>
|
tools:src="@drawable/hemanth_s" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@drawable/shadow_down_strong"/>
|
android:background="@drawable/shadow_down_strong" />
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
|
@ -43,50 +43,47 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:title=""/>
|
app:title="" />
|
||||||
</android.support.design.widget.CollapsingToolbarLayout>
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
|
android:id="@+id/content"
|
||||||
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="@drawable/bg_circular_top_corners"
|
||||||
app:behavior_overlapTop="24dp"
|
app:behavior_overlapTop="24dp"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_circular_top_corners"
|
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="8dp"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingTop="8dp"
|
||||||
android:orientation="horizontal">
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:id="@+id/artist_image"
|
android:id="@+id/artist_image"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_weight="0"
|
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_weight="0"
|
||||||
app:civ_border="false"
|
app:civ_border="false"
|
||||||
app:civ_shadow="false"/>
|
app:civ_shadow="false" />
|
||||||
|
|
||||||
<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:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -95,24 +92,24 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<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:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:freezesText="true"
|
android:freezesText="true"
|
||||||
android:marqueeRepeatLimit="marquee_forever"
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
android:paddingTop="4dp"
|
||||||
android:scrollHorizontally="true"
|
android:scrollHorizontally="true"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:text="Title"/>
|
tools:text="Title" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -122,40 +119,40 @@
|
||||||
fontPath="@string/circular_std_black"
|
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:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:nestedScrollingEnabled="false"/>
|
android:nestedScrollingEnabled="false" />
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/more_title"
|
android:id="@+id/more_title"
|
||||||
fontPath="@string/circular_std_black"
|
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:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/more_recycler_view"
|
android:id="@+id/more_recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:nestedScrollingEnabled="false"
|
android:nestedScrollingEnabled="false"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
|
|
||||||
|
@ -163,8 +160,8 @@
|
||||||
android:id="@+id/action_shuffle_all"
|
android:id="@+id/action_shuffle_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="16dp"
|
||||||
app:layout_behavior="code.name.monkey.retromusic.misc.ScrollAwareFABBehavior"
|
app:layout_behavior="code.name.monkey.retromusic.misc.ScrollAwareFABBehavior"
|
||||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"/>
|
app:srcCompat="@drawable/ic_shuffle_white_24dp" />
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
|
@ -30,12 +30,12 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:transitionName="@string/transition_artist_image"/>
|
android:transitionName="@string/transition_artist_image" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@drawable/shadow_down_strong"/>
|
android:background="@drawable/shadow_down_strong" />
|
||||||
|
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
@ -43,23 +43,22 @@
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"/>
|
app:layout_collapseMode="pin" />
|
||||||
</android.support.design.widget.CollapsingToolbarLayout>
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
|
android:id="@+id/content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_circular_top_corners"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
app:behavior_overlapTop="24dp"
|
app:behavior_overlapTop="24dp"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<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"
|
||||||
android:background="@drawable/bg_circular_top_corners"
|
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -72,9 +71,9 @@
|
||||||
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:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -84,7 +83,7 @@
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:text="Title"/>
|
tools:text="Title" />
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
|
@ -100,7 +99,7 @@
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:text="Title"/>
|
tools:text="Title" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -109,13 +108,13 @@
|
||||||
android:id="@+id/action_shuffle_all"
|
android:id="@+id/action_shuffle_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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:layout_gravity="center"
|
||||||
android:src="@drawable/ic_shuffle_white_24dp"/>
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:src="@drawable/ic_shuffle_white_24dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
|
@ -128,17 +127,17 @@
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/biography"
|
android:id="@+id/biography"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="4"
|
android:maxLines="4"
|
||||||
|
android:padding="16dp"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone" />
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/album_title"
|
android:id="@+id/album_title"
|
||||||
|
@ -148,13 +147,13 @@
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:text="@string/albums"
|
android:text="@string/albums"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
android:textColor="?android:attr/textColorPrimary"/>
|
android:textColor="?android:attr/textColorPrimary" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/album_recycler_view"
|
android:id="@+id/album_recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nestedScrollingEnabled="false"/>
|
android:nestedScrollingEnabled="false" />
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/song_title"
|
android:id="@+id/song_title"
|
||||||
|
@ -165,13 +164,13 @@
|
||||||
android:text="@string/songs"
|
android:text="@string/songs"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nestedScrollingEnabled="false"/>
|
android:nestedScrollingEnabled="false" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
|
|
|
@ -9,31 +9,41 @@
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleGravity="top"
|
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/support_development">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
app:title=""
|
||||||
app:title="@string/support_development" />
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/support_development"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?dividerColor" />
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
|
@ -61,10 +71,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="end|center_vertical"
|
android:gravity="end|center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="@dimen/md_content_padding_top"
|
|
||||||
android:paddingLeft="@dimen/md_dialog_frame_margin"
|
android:paddingLeft="@dimen/md_dialog_frame_margin"
|
||||||
|
android:paddingTop="@dimen/md_content_padding_top"
|
||||||
android:paddingRight="@dimen/md_dialog_frame_margin"
|
android:paddingRight="@dimen/md_dialog_frame_margin"
|
||||||
android:paddingTop="@dimen/md_content_padding_top">
|
android:paddingBottom="@dimen/md_content_padding_top">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
|
@ -88,8 +98,8 @@
|
||||||
android:id="@+id/list"
|
android:id="@+id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingEnd="6dp"
|
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
android:scrollbarStyle="outsideOverlay" />
|
android:scrollbarStyle="outsideOverlay" />
|
||||||
|
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView
|
||||||
|
@ -118,11 +128,10 @@
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
android:text="@string/paypal_summary"
|
android:text="@string/paypal_summary"
|
||||||
android:textColor="@color/md_white_1000" />
|
android:textColor="@color/md_white_1000" />
|
||||||
|
|
||||||
|
|
|
@ -8,40 +8,49 @@
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp">
|
app:title=""
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/equalizer"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<android.support.v7.widget.SwitchCompat
|
<android.support.v7.widget.SwitchCompat
|
||||||
android:id="@+id/equalizer"
|
android:id="@+id/equalizer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
|
android:layout_marginEnd="16dp"
|
||||||
</android.support.v7.widget.Toolbar>
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<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"
|
||||||
|
@ -65,14 +74,14 @@
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="Select preset"
|
android:text="Select preset"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:id="@+id/presets"
|
android:id="@+id/presets"
|
||||||
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:layout_weight="1"
|
||||||
android:background="@android:color/transparent"/>
|
android:background="@android:color/transparent" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -88,20 +97,20 @@
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="@string/bass_boost"
|
android:text="@string/bass_boost"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
|
|
||||||
<SeekBar
|
<SeekBar
|
||||||
android:id="@+id/bass_boost_strength"
|
android:id="@+id/bass_boost_strength"
|
||||||
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:layout_weight="1"
|
||||||
android:padding="16dp"
|
|
||||||
android:max="1000"
|
android:max="1000"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="3dp"
|
||||||
|
android:padding="16dp"
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
android:thumb="@drawable/switch_thumb_material"
|
android:thumb="@drawable/switch_thumb_material"
|
||||||
tools:progress="20"/>
|
tools:progress="20" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -117,35 +126,35 @@
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="@string/virtualizer"
|
android:text="@string/virtualizer"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
|
|
||||||
<SeekBar
|
<SeekBar
|
||||||
android:id="@+id/virtualizer_strength"
|
android:id="@+id/virtualizer_strength"
|
||||||
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:layout_weight="1"
|
||||||
android:padding="16dp"
|
|
||||||
android:max="1000"
|
android:max="1000"
|
||||||
android:maxHeight="3dp"
|
android:maxHeight="3dp"
|
||||||
|
android:padding="16dp"
|
||||||
android:progressDrawable="@drawable/color_progress_seek"
|
android:progressDrawable="@drawable/color_progress_seek"
|
||||||
android:splitTrack="false"
|
android:splitTrack="false"
|
||||||
android:thumb="@drawable/switch_thumb_material"
|
android:thumb="@drawable/switch_thumb_material"
|
||||||
tools:progress="20"/>
|
tools:progress="20" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/bands"
|
android:id="@+id/bands"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp" />
|
||||||
android:orientation="vertical"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:text="*Warning: It's alpha version. We don't recommend to use Equalizer, We believe without using Equalizer songs has better sound quality."/>
|
android:text="*Warning: It's alpha version. We don't recommend to use Equalizer, We believe without using Equalizer songs has better sound quality." />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
|
@ -7,31 +7,43 @@
|
||||||
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/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:focusable="true"
|
android:elevation="0dp"
|
||||||
tools:ignore="UnusedAttribute">
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
tools:ignore="UnusedAttribute" />
|
app:layout_collapseMode="pin"
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
app:title=""
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/licenses"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.v4.widget.NestedScrollView
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="fill_vertical"
|
android:layout_gravity="fill_vertical"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.design.widget.CoordinatorLayout
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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"
|
||||||
|
@ -12,44 +11,66 @@
|
||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorPrimary">
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
<FrameLayout
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
android:layout_width="match_parent"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/cab_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp" />
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
tools:ignore="UnusedAttribute"/>
|
app:layout_collapseMode="pin"
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
app:title=""
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/queue"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</FrameLayout>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/player_queue_sub_header"
|
android:id="@+id/player_queue_sub_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/up_next"
|
android:text="@string/up_next"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?dividerColor" />
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fragment_container"
|
android:id="@+id/fragment_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
|
@ -23,31 +23,51 @@
|
||||||
android:id="@+id/app_bar"
|
android:id="@+id/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:focusable="true"
|
android:elevation="0dp"
|
||||||
tools:ignore="UnusedAttribute">
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<FrameLayout
|
||||||
android:id="@+id/toolbar"
|
android:layout_width="match_parent"
|
||||||
style="@style/Toolbar48"
|
android:layout_height="wrap_content">
|
||||||
tools:ignore="UnusedAttribute" />
|
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
|
||||||
|
|
||||||
<ViewStub
|
<View
|
||||||
android:id="@+id/cab_stub"
|
android:id="@+id/cab_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp" />
|
android:layout_height="48dp" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
style="@style/Toolbar48"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
|
app:title=""
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/queue"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</FrameLayout>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?dividerColor" />
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
||||||
|
|
|
@ -5,68 +5,75 @@
|
||||||
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">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<include layout="@layout/status_bar"/>
|
<include layout="@layout/status_bar" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
<android.support.design.widget.CoordinatorLayout
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/root"
|
android:id="@+id/root"
|
||||||
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/app_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleGravity="top"
|
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/action_search">
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
app:layout_collapseMode="pin">
|
||||||
app:title="@string/action_search"
|
|
||||||
tools:ignore="UnusedAttribute"/>
|
<TextView
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/action_search"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView
|
||||||
android:id="@+id/search"
|
android:id="@+id/search"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
app:cardCornerRadius="25dp">
|
app:cardCornerRadius="25dp">
|
||||||
|
|
||||||
|
|
||||||
<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:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp">
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.IconImageView
|
<code.name.monkey.retromusic.views.IconImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
app:srcCompat="@drawable/ic_search_white_24dp"/>
|
app:srcCompat="@drawable/ic_search_white_24dp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/search_view"
|
android:id="@+id/search_view"
|
||||||
|
@ -75,8 +82,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/search_hint"
|
android:hint="@string/search_hint"
|
||||||
android:inputType="text|textAutoComplete"
|
android:inputType="text|textAutoComplete" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.IconImageView
|
<code.name.monkey.retromusic.views.IconImageView
|
||||||
|
@ -84,9 +90,9 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="8dp"
|
|
||||||
android:background="?roundSelector"
|
android:background="?roundSelector"
|
||||||
app:srcCompat="@drawable/ic_mic_white_24dp"/>
|
android:padding="8dp"
|
||||||
|
app:srcCompat="@drawable/ic_mic_white_24dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
@ -102,23 +108,23 @@
|
||||||
android:id="@android:id/empty"
|
android:id="@android:id/empty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
android:paddingTop="48dp"
|
android:paddingTop="48dp"
|
||||||
android:paddingBottom="48dp"
|
android:paddingBottom="48dp"
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/no_results"
|
android:text="@string/no_results"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:scrollbarStyle="outsideOverlay"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
android:scrollbarStyle="outsideOverlay"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,37 +1,43 @@
|
||||||
<?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"
|
||||||
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/app_bar"
|
android:id="@+id/app_bar"
|
||||||
|
app:elevation="0dp"
|
||||||
|
android:elevation="0dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleGravity="top"
|
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/action_settings">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
app:title=""
|
||||||
app:title="@string/support_development" />
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
fontPath="@string/circular_std_black"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/action_settings"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
1
app/src/main/res/layout/dialog_changelog.xml
Normal file
1
app/src/main/res/layout/dialog_changelog.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<WebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none" />
</FrameLayout>
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<include layout="@layout/status_bar"/>
|
<include layout="@layout/status_bar" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -23,24 +23,21 @@
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="0dp"
|
||||||
|
app:elevation="0dp"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<android.support.design.widget.CollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="62dp"
|
android:layout_height="wrap_content"
|
||||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
app:titleEnabled="false">
|
app:titleEnabled="false">
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/home_toolbar"
|
android:id="@+id/home_toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -54,8 +51,9 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
|
android:background="?roundSelector"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:src="@drawable/ic_search_white_24dp"/>
|
android:src="@drawable/ic_search_white_24dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -66,41 +64,42 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:id="@+id/user_image"
|
android:id="@+id/user_image"
|
||||||
android:layout_width="32dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:layout_weight="0"
|
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
app:civ_border="false"/>
|
android:layout_weight="0"
|
||||||
|
app:civ_border="false" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.Toolbar>
|
</android.support.v7.widget.Toolbar>
|
||||||
</android.support.design.widget.CollapsingToolbarLayout>
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?dividerColor" />
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
android:id="@+id/nested_scroll"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/overlap_toolbar_height"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
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"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:descendantFocusability="blocksDescendants"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:elevation="4dp"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/abs_playlists"/>
|
<include layout="@layout/abs_playlists" />
|
||||||
|
|
||||||
<include layout="@layout/home_section_content"/>
|
<include layout="@layout/home_section_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<include layout="@layout/status_bar"/>
|
<include layout="@layout/status_bar" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<android.support.design.widget.CollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="62dp"
|
android:layout_height="wrap_content"
|
||||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
||||||
app:titleEnabled="false">
|
app:titleEnabled="false">
|
||||||
|
|
||||||
|
@ -39,18 +39,17 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
app:layout_collapseMode="parallax"
|
app:layout_collapseMode="parallax"
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
app:layout_collapseParallaxMultiplier="0.7" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_collapseMode="pin">
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/cab_stub"
|
android:id="@+id/cab_stub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp" />
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
app:layout_collapseParallaxMultiplier="0.7"/>
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
|
@ -71,7 +70,7 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/folders"
|
android:text="@string/folders"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
tools:ignore="MissingPrefix"/>
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.Toolbar>
|
</android.support.v7.widget.Toolbar>
|
||||||
|
@ -83,9 +82,6 @@
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="@dimen/overlap_toolbar_height"
|
|
||||||
android:background="@drawable/bg_circular_top_corners"
|
|
||||||
android:elevation="@dimen/card_elevation"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
||||||
|
@ -94,7 +90,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:layoutAnimation="@anim/layout_animation_fall_down"
|
android:layoutAnimation="@anim/layout_animation_fall_down"
|
||||||
android:scrollbars="none"/>
|
android:scrollbars="none" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@android:id/empty"
|
android:id="@android:id/empty"
|
||||||
|
@ -103,18 +99,23 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:text="@string/empty"
|
android:text="@string/empty"
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textColor="?android:textColorSecondary"
|
||||||
android:textSize="@dimen/empty_text_size"/>
|
android:textSize="@dimen/empty_text_size" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?dividerColor" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.BreadCrumbLayout
|
<code.name.monkey.retromusic.views.BreadCrumbLayout
|
||||||
android:id="@+id/bread_crumbs"
|
android:id="@+id/bread_crumbs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/tab_height"
|
android:layout_height="@dimen/tab_height"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
|
android:elevation="6dp"
|
||||||
android:paddingStart="60dp"
|
android:paddingStart="60dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp" />
|
||||||
android:elevation="6dp"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -15,13 +15,8 @@
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="228dp"
|
android:layout_height="196dp"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
|
||||||
app:contentScrim="?attr/colorPrimary"
|
app:contentScrim="?attr/colorPrimary"
|
||||||
app:expandedTitleGravity="top"
|
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||||
app:statusBarScrim="?attr/colorPrimary"
|
app:statusBarScrim="?attr/colorPrimary"
|
||||||
app:titleEnabled="false">
|
app:titleEnabled="false">
|
||||||
|
@ -50,7 +45,8 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:padding="16dp"
|
android:background="?roundSelector"
|
||||||
|
android:padding="12dp"
|
||||||
android:src="@drawable/ic_search_white_24dp" />
|
android:src="@drawable/ic_search_white_24dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
<include layout="@layout/status_bar"/>
|
<include layout="@layout/status_bar" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -24,35 +24,66 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout
|
<android.support.design.widget.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="96dp"
|
android:layout_height="wrap_content"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsedTitleAppearance"
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
|
||||||
app:expandedTitleGravity="top"
|
app:titleEnabled="false">
|
||||||
app:expandedTitleMarginStart="16dp"
|
|
||||||
app:expandedTitleMarginTop="48dp"
|
|
||||||
app:expandedTitleTextAppearance="@style/ExpandedTitleAppearance"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
||||||
app:title="@string/action_settings">
|
|
||||||
|
|
||||||
<View
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_collapseMode="pin">
|
||||||
|
|
||||||
|
<ViewStub
|
||||||
|
android:id="@+id/cab_stub"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp" />
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar48"
|
style="@style/Toolbar48"
|
||||||
app:layout_collapseMode="pin"/>
|
app:title=""
|
||||||
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.SansFontCollapsingToolbarLayout>
|
<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:background="?roundSelector"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:padding="12dp"
|
||||||
|
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.Large"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.v7.widget.Toolbar>
|
||||||
|
</FrameLayout>
|
||||||
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fragment_container"
|
android:id="@+id/fragment_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
1
app/src/main/res/layout/home_section_recycler_view.xml
Normal file
1
app/src/main/res/layout/home_section_recycler_view.xml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/title"
fontPath="@string/circular_std_black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:text="@string/recent_artists"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:attr/textColorPrimary"
tools:ignore="MissingPrefix"
tools:text="@string/rate_app"
tools:textColor="@color/md_black_1000" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="12dp"
android:background="?attr/dividerColor" />
</LinearLayout>
|
|
@ -5,7 +5,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -23,14 +22,14 @@
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_1"
|
android:id="@+id/image_1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -45,17 +44,18 @@
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_2"
|
android:id="@+id/image_2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
|
@ -66,14 +66,14 @@
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_3"
|
android:id="@+id/image_3"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -87,17 +87,18 @@
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_4"
|
android:id="@+id/image_4"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -116,14 +117,14 @@
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_5"
|
android:id="@+id/image_5"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
|
@ -135,16 +136,17 @@
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_6"
|
android:id="@+id/image_6"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -153,20 +155,20 @@
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_7"
|
android:id="@+id/image_7"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -176,14 +178,14 @@
|
||||||
<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"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_8"
|
android:id="@+id/image_8"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
|
@ -202,7 +204,7 @@
|
||||||
android:id="@+id/image_9"
|
android:id="@+id/image_9"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="4dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:contentPadding="16dp">
|
app:cardUseCompatPadding="true"
|
||||||
|
app:contentPadding="12dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -29,8 +30,8 @@
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="40dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="40dp">
|
android:layout_height="36dp">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.IconImageView
|
<code.name.monkey.retromusic.views.IconImageView
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
|
|
|
@ -19,30 +19,28 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="4dp">
|
android:layout_margin="4dp">
|
||||||
<code.name.monkey.retromusic.views.RoundCornerFrameLayout
|
|
||||||
android:layout_width="match_parent"
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:corner_radius="200dp"
|
|
||||||
>
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
app:civ_border="false"
|
||||||
|
app:civ_shadow="false"
|
||||||
tools:background="@color/md_red_400"
|
tools:background="@color/md_red_400"
|
||||||
tools:ignore="ContentDescription"/>
|
tools:ignore="ContentDescription" />
|
||||||
</code.name.monkey.retromusic.views.RoundCornerFrameLayout>
|
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:paddingStart="4dp"
|
|
||||||
android:paddingEnd="4dp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -52,17 +50,17 @@
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="?android:attr/textColorPrimary"/>
|
android:textColor="?android:attr/textColorPrimary" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:paddingTop="4dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:textSize="12sp"/>
|
android:textSize="12sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
<code.name.monkey.retromusic.views.WidthFitSquareLayout
|
||||||
android:layout_width="128dp"
|
android:layout_width="136dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView
|
||||||
|
@ -15,16 +15,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
app:cardCornerRadius="6dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardElevation="4dp"
|
|
||||||
app:cardPreventCornerOverlap="true">
|
app:cardPreventCornerOverlap="true">
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatImageView
|
<android.support.v7.widget.AppCompatImageView
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop" />
|
||||||
/>
|
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
@ -33,8 +31,8 @@
|
||||||
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:padding="8dp"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="?android:attr/textColorPrimary"/>
|
android:padding="12dp"
|
||||||
|
android:textColor="?android:attr/textColorPrimary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -11,8 +11,7 @@
|
||||||
android:id="@+id/image_container"
|
android:id="@+id/image_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="182dp"
|
android:layout_height="182dp"
|
||||||
app:cardCornerRadius="8dp"
|
app:cardCornerRadius="12dp"
|
||||||
app:cardElevation="6dp"
|
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatImageView
|
<android.support.v7.widget.AppCompatImageView
|
||||||
|
@ -39,9 +38,9 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
tools:text="My top tracks" />
|
tools:text="My top tracks" />
|
||||||
|
|
|
@ -3,17 +3,11 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context=".DrawerActivity">
|
tools:context=".DrawerActivity">
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_search"
|
|
||||||
android:icon="@drawable/ic_search_white_24dp"
|
|
||||||
android:title="@string/action_search"
|
|
||||||
app:showAsAction="ifRoom"/>
|
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_shuffle_all"
|
android:id="@+id/action_shuffle_all"
|
||||||
android:icon="@drawable/ic_shuffle_white_24dp"
|
android:icon="@drawable/ic_shuffle_white_24dp"
|
||||||
android:title="@string/action_shuffle_all"
|
android:title="@string/action_shuffle_all"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size"
|
android:id="@+id/action_grid_size"
|
||||||
|
@ -25,28 +19,28 @@
|
||||||
tools:ignore="HardcodedText">
|
tools:ignore="HardcodedText">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_1"
|
android:id="@+id/action_grid_size_1"
|
||||||
android:title="@string/grid_size_1"/>
|
android:title="@string/grid_size_1" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_2"
|
android:id="@+id/action_grid_size_2"
|
||||||
android:title="@string/grid_size_2"/>
|
android:title="@string/grid_size_2" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_3"
|
android:id="@+id/action_grid_size_3"
|
||||||
android:title="@string/grid_size_3"/>
|
android:title="@string/grid_size_3" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_4"
|
android:id="@+id/action_grid_size_4"
|
||||||
android:title="@string/grid_size_4"/>
|
android:title="@string/grid_size_4" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_5"
|
android:id="@+id/action_grid_size_5"
|
||||||
android:title="@string/grid_size_5"/>
|
android:title="@string/grid_size_5" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_6"
|
android:id="@+id/action_grid_size_6"
|
||||||
android:title="@string/grid_size_6"/>
|
android:title="@string/grid_size_6" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_7"
|
android:id="@+id/action_grid_size_7"
|
||||||
android:title="@string/grid_size_7"/>
|
android:title="@string/grid_size_7" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size_8"
|
android:id="@+id/action_grid_size_8"
|
||||||
android:title="@string/grid_size_8"/>
|
android:title="@string/grid_size_8" />
|
||||||
</group>
|
</group>
|
||||||
</menu>
|
</menu>
|
||||||
</item>
|
</item>
|
||||||
|
@ -54,25 +48,24 @@
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_sort_order"
|
android:id="@+id/action_sort_order"
|
||||||
android:title="@string/action_sort_order">
|
android:title="@string/action_sort_order">
|
||||||
<menu>
|
<menu></menu>
|
||||||
</menu>
|
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_sleep_timer"
|
android:id="@+id/action_sleep_timer"
|
||||||
android:orderInCategory="98"
|
android:orderInCategory="98"
|
||||||
android:title="@string/action_sleep_timer"
|
android:title="@string/action_sleep_timer"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_equalizer"
|
android:id="@+id/action_equalizer"
|
||||||
android:orderInCategory="99"
|
android:orderInCategory="99"
|
||||||
android:title="@string/equalizer"
|
android:title="@string/equalizer"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_settings"
|
android:id="@+id/action_settings"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
android:title="@string/action_settings"
|
android:title="@string/action_settings"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never" />
|
||||||
</menu>
|
</menu>
|
|
@ -5,6 +5,7 @@
|
||||||
<item>@string/only_on_wifi</item>
|
<item>@string/only_on_wifi</item>
|
||||||
<item>@string/never</item>
|
<item>@string/never</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<string-array name="pref_general_theme_list_titles">
|
<string-array name="pref_general_theme_list_titles">
|
||||||
<item>@string/light_theme_name</item>
|
<item>@string/light_theme_name</item>
|
||||||
<item>@string/dark_theme_name</item>
|
<item>@string/dark_theme_name</item>
|
||||||
|
@ -16,19 +17,23 @@
|
||||||
<item>@string/normal_style</item>
|
<item>@string/normal_style</item>
|
||||||
<item>@string/card_style</item>
|
<item>@string/card_style</item>
|
||||||
<item>@string/card_color_style</item>
|
<item>@string/card_color_style</item>
|
||||||
|
<item>@string/card_circular_style</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="pref_grid_style_list_values">
|
<string-array name="pref_grid_style_list_values">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
<item>1</item>
|
<item>1</item>
|
||||||
<item>2</item>
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<array name="pref_grid_style_layout">
|
<array name="pref_grid_style_layout">
|
||||||
<item>@layout/item_grid</item>
|
<item>@layout/item_grid</item>
|
||||||
<item>@layout/item_card</item>
|
<item>@layout/item_card</item>
|
||||||
<item>@layout/item_card_color</item>
|
<item>@layout/item_card_color</item>
|
||||||
|
<item>@layout/item_grid_circle</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<string-array name="pref_general_theme_list_values">
|
<string-array name="pref_general_theme_list_values">
|
||||||
<item>light</item>
|
<item>light</item>
|
||||||
<item>dark</item>
|
<item>dark</item>
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
<attr format="color" name="iconColor"/>
|
<attr format="color" name="iconColor"/>
|
||||||
<attr format="color" name="dividerColor"/>
|
<attr format="color" name="dividerColor"/>
|
||||||
|
|
||||||
<declare-styleable name="RoundCornerFrameLayout">
|
|
||||||
<attr format="dimension" name="corner_radius"/>
|
|
||||||
</declare-styleable>
|
|
||||||
|
|
||||||
<declare-styleable name="BlurLayout">
|
<declare-styleable name="BlurLayout">
|
||||||
<attr format="float" name="blk_downscaleFactor"/>
|
<attr format="float" name="blk_downscaleFactor"/>
|
||||||
|
@ -26,6 +23,7 @@
|
||||||
<declare-styleable name="NetworkImageView">
|
<declare-styleable name="NetworkImageView">
|
||||||
<attr format="string" name="url_link"/>
|
<attr format="string" name="url_link"/>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="LyricView">
|
<declare-styleable name="LyricView">
|
||||||
<attr format="string" name="hint"/>
|
<attr format="string" name="hint"/>
|
||||||
<attr format="color" name="hintColor"/>
|
<attr format="color" name="hintColor"/>
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
<string name="hosur_india" translatable="false">Hosur, India</string>
|
<string name="hosur_india" translatable="false">Hosur, India</string>
|
||||||
<string name="circular_std_black" translatable="false">fonts/circular_std_black.otf</string>
|
<string name="circular_std_black" translatable="false">fonts/circular_std_black.otf</string>
|
||||||
<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_bold" translatable="false">fonts/product_sans_bold.ttf</string>
|
|
||||||
<string name="marko_name" translatable="false">Marko Ivanović </string>
|
<string name="marko_name" translatable="false">Marko Ivanović </string>
|
||||||
<string name="marko_summary" translatable="false">Contributor</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>
|
||||||
|
|
|
@ -120,6 +120,7 @@
|
||||||
|
|
||||||
<string name="card">Card</string>
|
<string name="card">Card</string>
|
||||||
<string name="card_color_style">Colored Card</string>
|
<string name="card_color_style">Colored Card</string>
|
||||||
|
<string name="card_circular_style">Circular</string>
|
||||||
<string name="card_style">Card</string>
|
<string name="card_style">Card</string>
|
||||||
|
|
||||||
<string name="cast">Cast</string>
|
<string name="cast">Cast</string>
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
package code.name.monkey.retromusic.ui.fragments.settings;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Hemanth S (h4h13).
|
|
||||||
*/
|
|
||||||
public class PersonaliseSettingsFragmentTest extends TestCase {
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue