code refactor
This commit is contained in:
parent
e98fbb3b41
commit
4910b3fdc6
1 changed files with 324 additions and 328 deletions
|
@ -25,12 +25,6 @@ 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;
|
||||||
|
@ -60,6 +54,9 @@ 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;
|
||||||
|
@ -158,14 +155,13 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
getSupportActionBar().setTitle(null);
|
getSupportActionBar().setTitle(null);
|
||||||
|
|
||||||
|
|
||||||
if (toolbar != null && !PreferenceUtil.getInstance(this).getFullScreenMode()) {
|
if (toolbar != null && !PreferenceUtil.getInstance(this).getFullScreenMode()) {
|
||||||
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) toolbar.getLayoutParams();
|
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) toolbar
|
||||||
|
.getLayoutParams();
|
||||||
params.topMargin = RetroUtil.getStatusBarHeight(this);
|
params.topMargin = RetroUtil.getStatusBarHeight(this);
|
||||||
toolbar.setLayoutParams(params);
|
toolbar.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int primaryColor = ThemeStore.primaryColor(this);
|
int primaryColor = ThemeStore.primaryColor(this);
|
||||||
TintHelper.setTintAuto(contentContainer, primaryColor, true);
|
TintHelper.setTintAuto(contentContainer, primaryColor, true);
|
||||||
|
|
||||||
|
@ -173,7 +169,8 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
appBarLayout.setBackgroundColor(primaryColor);
|
appBarLayout.setBackgroundColor(primaryColor);
|
||||||
appBarLayout.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
appBarLayout.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(AppBarLayout appBarLayout, AppBarStateChangeListener.State state) {
|
public void onStateChanged(AppBarLayout appBarLayout,
|
||||||
|
AppBarStateChangeListener.State state) {
|
||||||
int color;
|
int color;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case COLLAPSED:
|
case COLLAPSED:
|
||||||
|
@ -312,7 +309,6 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
||||||
// If the "lang" parameter is set and no biography is given, retry with default language
|
// If the "lang" parameter is set and no biography is given, retry with default language
|
||||||
if (biography == null && lang != null) {
|
if (biography == null && lang != null) {
|
||||||
loadBiography(null);
|
loadBiography(null);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue