Fixed tag editor coloring bugs.
This commit is contained in:
parent
8a48983dc0
commit
3d7d69da36
4 changed files with 19 additions and 8 deletions
|
|
@ -59,7 +59,7 @@ public abstract class AbsThemeActivity extends ATHToolbarActivity {
|
|||
statusBar.setBackgroundColor(color);
|
||||
}
|
||||
} else if (Build.VERSION.SDK_INT >= 21) {
|
||||
getWindow().setStatusBarColor(color);
|
||||
getWindow().setStatusBarColor(ColorUtil.darkenColor(color));
|
||||
setLightStatusbarAuto(color);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,13 +235,8 @@ public abstract class AbsTagEditorActivity extends AbsBaseActivity {
|
|||
observableScrollView.setPadding(0, Util.getActionBarSize(this), 0, 0);
|
||||
observableScrollViewCallbacks.onScrollChanged(observableScrollView.getCurrentScrollY(), false, false);
|
||||
|
||||
paletteColorPrimary = getIntent().getIntExtra(EXTRA_PALETTE, ThemeStore.primaryColor(this));
|
||||
setColors(getIntent().getIntExtra(EXTRA_PALETTE, ThemeStore.primaryColor(this)));
|
||||
toolbar.setBackgroundColor(paletteColorPrimary);
|
||||
header.setBackgroundColor(paletteColorPrimary);
|
||||
|
||||
setStatusbarColor(paletteColorPrimary);
|
||||
setNavigationbarColor(paletteColorPrimary);
|
||||
setTaskDescriptionColor(paletteColorPrimary);
|
||||
}
|
||||
|
||||
protected void dataChanged() {
|
||||
|
|
@ -267,7 +262,7 @@ public abstract class AbsTagEditorActivity extends AbsBaseActivity {
|
|||
setColors(bgColor);
|
||||
}
|
||||
|
||||
private void setColors(int color) {
|
||||
protected void setColors(int color) {
|
||||
paletteColorPrimary = color;
|
||||
observableScrollViewCallbacks.onScrollChanged(observableScrollView.getCurrentScrollY(), false, false);
|
||||
header.setBackgroundColor(paletteColorPrimary);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|||
import com.bumptech.glide.request.animation.GlideAnimation;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.kabouzeid.appthemehelper.util.ATHUtil;
|
||||
import com.kabouzeid.appthemehelper.util.ToolbarContentTintHelper;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.glide.palette.BitmapPaletteTranscoder;
|
||||
import com.kabouzeid.gramophone.glide.palette.BitmapPaletteWrapper;
|
||||
|
|
@ -278,4 +279,10 @@ public class AlbumTagEditorActivity extends AbsTagEditorActivity implements Text
|
|||
}
|
||||
return scaledBitmap;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setColors(int color) {
|
||||
super.setColors(color);
|
||||
albumTitle.setTextColor(ToolbarContentTintHelper.toolbarTitleColor(this, color));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import android.text.Editable;
|
|||
import android.text.TextWatcher;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.kabouzeid.appthemehelper.util.ToolbarContentTintHelper;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.loader.SongLoader;
|
||||
|
||||
|
|
@ -132,4 +133,12 @@ public class SongTagEditorActivity extends AbsTagEditorActivity implements TextW
|
|||
public void afterTextChanged(Editable s) {
|
||||
dataChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setColors(int color) {
|
||||
super.setColors(color);
|
||||
int toolbarTitleColor = ToolbarContentTintHelper.toolbarTitleColor(this, color);
|
||||
songTitle.setTextColor(toolbarTitleColor);
|
||||
albumTitle.setTextColor(toolbarTitleColor);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue