code refactor

This commit is contained in:
h4h13 2018-07-30 22:51:53 +05:30
parent e98fbb3b41
commit 4910b3fdc6

View file

@ -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;
}
}