diff --git a/app/build.gradle b/app/build.gradle
index 34a91caa..53ea0994 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -51,8 +51,8 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId 'com.kabouzeid.gramophone'
- versionCode 155
- versionName '0.16.9'
+ versionCode 157
+ versionName '1.0.0 BETA 2'
}
buildTypes {
release {
diff --git a/app/src/main/assets/phonograph-changelog.html b/app/src/main/assets/phonograph-changelog.html
index ced146cf..72c330ef 100644
--- a/app/src/main/assets/phonograph-changelog.html
+++ b/app/src/main/assets/phonograph-changelog.html
@@ -26,6 +26,18 @@
You can view the changelog dialog again at any time from the about section.
+We are coming closer to the first final release!
+
+Version 1.0.0 BETA 2
+
+ - NEW: Artist page redesign
+ - IMPROVEMENT: Improved the look of the new album page
+
+
+Version 1.0.0 BETA 1
+
+ - NEW: Album page redesign
+
Version 0.16.9
diff --git a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AboutActivity.java b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AboutActivity.java
index 02d4944f..990717aa 100644
--- a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AboutActivity.java
+++ b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AboutActivity.java
@@ -56,6 +56,9 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
private static String EUGENE_CHEUNG_GITHUB = "https://github.com/arkon";
private static String EUGENE_CHEUNG_WEBSITE = "https://echeung.me/";
+ private static String ADRIAN_TWITTER = "https://twitter.com/froschgames";
+ private static String ADRIAN_WEBSITE = "https://froschgames.com/";
+
@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.app_version)
@@ -102,6 +105,10 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
AppCompatButton eugeneCheungGitHub;
@BindView(R.id.eugene_cheung_website)
AppCompatButton eugeneCheungWebsite;
+ @BindView(R.id.adrian_twitter)
+ AppCompatButton adrianTwitter;
+ @BindView(R.id.adrian_website)
+ AppCompatButton adrianWebsite;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -156,6 +163,8 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
aleksandarTesicGooglePlus.setOnClickListener(this);
eugeneCheungGitHub.setOnClickListener(this);
eugeneCheungWebsite.setOnClickListener(this);
+ adrianTwitter.setOnClickListener(this);
+ adrianWebsite.setOnClickListener(this);
}
@Override
@@ -228,6 +237,10 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
openUrl(EUGENE_CHEUNG_GITHUB);
} else if (v == eugeneCheungWebsite) {
openUrl(EUGENE_CHEUNG_WEBSITE);
+ } else if (v == adrianTwitter) {
+ openUrl(ADRIAN_TWITTER);
+ } else if (v == adrianWebsite) {
+ openUrl(ADRIAN_WEBSITE);
}
}
diff --git a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java
index a133aa67..1bbc1ea2 100644
--- a/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java
+++ b/app/src/main/java/com/kabouzeid/gramophone/ui/activities/AlbumDetailActivity.java
@@ -2,7 +2,7 @@ package com.kabouzeid.gramophone.ui.activities;
import android.content.Context;
import android.content.Intent;
-import android.os.Build;
+import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -24,8 +24,6 @@ import com.afollestad.materialcab.MaterialCab;
import com.afollestad.materialdialogs.MaterialDialog;
import com.afollestad.materialdialogs.util.DialogUtils;
import com.bumptech.glide.Glide;
-import com.bumptech.glide.request.RequestListener;
-import com.bumptech.glide.request.target.Target;
import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView;
import com.kabouzeid.appthemehelper.util.ColorUtil;
import com.kabouzeid.appthemehelper.util.MaterialValueHelper;
@@ -36,7 +34,6 @@ import com.kabouzeid.gramophone.dialogs.DeleteSongsDialog;
import com.kabouzeid.gramophone.dialogs.SleepTimerDialog;
import com.kabouzeid.gramophone.glide.PhonographColoredTarget;
import com.kabouzeid.gramophone.glide.SongGlideRequest;
-import com.kabouzeid.gramophone.glide.palette.BitmapPaletteWrapper;
import com.kabouzeid.gramophone.helper.MusicPlayerRemote;
import com.kabouzeid.gramophone.interfaces.CabHolder;
import com.kabouzeid.gramophone.interfaces.LoaderIds;
@@ -51,13 +48,13 @@ import com.kabouzeid.gramophone.model.Song;
import com.kabouzeid.gramophone.ui.activities.base.AbsSlidingMusicPanelActivity;
import com.kabouzeid.gramophone.ui.activities.tageditor.AbsTagEditorActivity;
import com.kabouzeid.gramophone.ui.activities.tageditor.AlbumTagEditorActivity;
+import com.kabouzeid.gramophone.util.MusicUtil;
import com.kabouzeid.gramophone.util.NavigationUtil;
import com.kabouzeid.gramophone.util.PhonographColorUtil;
import com.kabouzeid.gramophone.util.Util;
-import java.util.Locale;
-
import java.util.ArrayList;
+import java.util.Locale;
import butterknife.BindView;
import butterknife.ButterKnife;
@@ -84,19 +81,33 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
ImageView albumArtImageView;
@BindView(R.id.toolbar)
Toolbar toolbar;
- @BindView(R.id.title)
- TextView albumTitleView;
- @BindView(R.id.list_background)
- View songsBackgroundView;
+ @BindView(R.id.header)
+ View headerView;
+ @BindView(R.id.header_overlay)
+ View headerOverlay;
+
+ @BindView(R.id.artist_icon)
+ ImageView artistIconImageView;
+ @BindView(R.id.duration_icon)
+ ImageView durationIconImageView;
+ @BindView(R.id.song_count_icon)
+ ImageView songCountIconImageView;
+ @BindView(R.id.album_year_icon)
+ ImageView albumYearIconImageView;
+ @BindView(R.id.artist_text)
+ TextView artistTextView;
+ @BindView(R.id.duration_text)
+ TextView durationTextView;
+ @BindView(R.id.song_count_text)
+ TextView songCountTextView;
+ @BindView(R.id.album_year_text)
+ TextView albumYearTextView;
private AlbumSongAdapter adapter;
private MaterialCab cab;
- private int headerOffset;
- private int titleViewHeight;
- private int albumArtViewHeight;
+ private int headerViewHeight;
private int toolbarColor;
- private float toolbarAlpha;
@Nullable
private Spanned wiki;
@@ -109,8 +120,6 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
setDrawUnderStatusbar(true);
ButterKnife.bind(this);
- supportPostponeEnterTransition();
-
lastFMRestClient = new LastFMRestClient(this);
setUpObservableListViewParams();
@@ -128,43 +137,32 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
private final SimpleObservableScrollViewCallbacks observableScrollViewCallbacks = new SimpleObservableScrollViewCallbacks() {
@Override
public void onScrollChanged(int scrollY, boolean b, boolean b2) {
- scrollY += albumArtViewHeight + titleViewHeight;
- float flexibleRange = albumArtViewHeight - headerOffset;
-
- // Translate album cover
- albumArtImageView.setTranslationY(Math.max(-albumArtViewHeight, -scrollY / 2));
-
- // Translate list background
- songsBackgroundView.setTranslationY(Math.max(0, -scrollY + albumArtViewHeight));
+ scrollY += headerViewHeight;
// Change alpha of overlay
- toolbarAlpha = Math.max(0, Math.min(1, (float) scrollY / flexibleRange));
- toolbar.setBackgroundColor(ColorUtil.withAlpha(toolbarColor, toolbarAlpha));
- setStatusbarColor(ColorUtil.withAlpha(toolbarColor, cab != null && cab.isActive() ? 1 : toolbarAlpha));
+ float headerAlpha = Math.max(0, Math.min(1, (float) 2 * scrollY / headerViewHeight));
+ headerOverlay.setBackgroundColor(ColorUtil.withAlpha(toolbarColor, headerAlpha));
// Translate name text
- int maxTitleTranslationY = albumArtViewHeight;
- int titleTranslationY = maxTitleTranslationY - scrollY;
- titleTranslationY = Math.max(headerOffset, titleTranslationY);
-
- albumTitleView.setTranslationY(titleTranslationY);
+ headerView.setTranslationY(Math.max(-scrollY, -headerViewHeight));
+ headerOverlay.setTranslationY(Math.max(-scrollY, -headerViewHeight));
+ albumArtImageView.setTranslationY(Math.max(-scrollY, -headerViewHeight));
}
};
private void setUpObservableListViewParams() {
- albumArtViewHeight = getResources().getDimensionPixelSize(R.dimen.header_image_height);
- toolbarColor = DialogUtils.resolveColor(this, R.attr.defaultFooterColor);
- int toolbarHeight = Util.getActionBarSize(this);
- titleViewHeight = getResources().getDimensionPixelSize(R.dimen.title_view_height);
- headerOffset = toolbarHeight;
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- headerOffset += getResources().getDimensionPixelSize(R.dimen.status_bar_padding);
- }
+ headerViewHeight = getResources().getDimensionPixelSize(R.dimen.detail_header_height);
}
private void setUpViews() {
setUpRecyclerView();
setUpSongsAdapter();
+ artistTextView.setOnClickListener(v -> {
+ if (album != null) {
+ NavigationUtil.goToArtist(AlbumDetailActivity.this, album.getArtistId());
+ }
+ });
+ setColors(DialogUtils.resolveColor(this, R.attr.defaultFooterColor));
}
private void loadAlbumCover() {
@@ -172,19 +170,6 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
.checkIgnoreMediaStore(this)
.generatePalette(this).build()
.dontAnimate()
- .listener(new RequestListener