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.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
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.PreferenceUtil;
|
||||
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.Callback;
|
||||
import retrofit2.Response;
|
||||
|
@ -158,14 +155,13 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
|||
//noinspection ConstantConditions
|
||||
getSupportActionBar().setTitle(null);
|
||||
|
||||
|
||||
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);
|
||||
toolbar.setLayoutParams(params);
|
||||
}
|
||||
|
||||
|
||||
int primaryColor = ThemeStore.primaryColor(this);
|
||||
TintHelper.setTintAuto(contentContainer, primaryColor, true);
|
||||
|
||||
|
@ -173,7 +169,8 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
|||
appBarLayout.setBackgroundColor(primaryColor);
|
||||
appBarLayout.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||
@Override
|
||||
public void onStateChanged(AppBarLayout appBarLayout, AppBarStateChangeListener.State state) {
|
||||
public void onStateChanged(AppBarLayout appBarLayout,
|
||||
AppBarStateChangeListener.State state) {
|
||||
int color;
|
||||
switch (state) {
|
||||
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 (biography == null && lang != null) {
|
||||
loadBiography(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue