Java Code Examples for com.kabouzeid.appthemehelper.util.MaterialValueHelper#getSecondaryTextColor()

The following examples show how to use com.kabouzeid.appthemehelper.util.MaterialValueHelper#getSecondaryTextColor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AlbumDetailActivity.java    From Phonograph with GNU General Public License v3.0 6 votes vote down vote up
private void setColors(int color) {
    toolbarColor = color;
    headerView.setBackgroundColor(color);

    setNavigationbarColor(color);
    setTaskDescriptionColor(color);

    toolbar.setBackgroundColor(color);
    setSupportActionBar(toolbar); // needed to auto readjust the toolbar content color
    setStatusbarColor(color);

    int secondaryTextColor = MaterialValueHelper.getSecondaryTextColor(this, ColorUtil.isColorLight(color));
    artistIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    durationIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    songCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    albumYearIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    artistTextView.setTextColor(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(color)));
    durationTextView.setTextColor(secondaryTextColor);
    songCountTextView.setTextColor(secondaryTextColor);
    albumYearTextView.setTextColor(secondaryTextColor);
}
 
Example 2
Source File: ArtistDetailActivity.java    From Music-Player with GNU General Public License v3.0 6 votes vote down vote up
private void setColors(int color) {
    toolbarColor = color;
    headerView.setBackgroundColor(color);

    setNavigationbarColor(color);
    setTaskDescriptionColor(color);

    toolbar.setBackgroundColor(color);
    setSupportActionBar(toolbar); // needed to auto readjust the toolbar content color
    setStatusbarColor(color);

    int secondaryTextColor = MaterialValueHelper.getSecondaryTextColor(this, ColorUtil.isColorLight(color));
    durationIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    songCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    albumCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    durationTextView.setTextColor(secondaryTextColor);
    songCountTextView.setTextColor(secondaryTextColor);
    albumCountTextView.setTextColor(secondaryTextColor);
}
 
Example 3
Source File: AlbumDetailActivity.java    From Music-Player with GNU General Public License v3.0 6 votes vote down vote up
private void setColors(int color) {
    toolbarColor = color;
    headerView.setBackgroundColor(color);

    setNavigationbarColor(color);
    setTaskDescriptionColor(color);

    toolbar.setBackgroundColor(color);
    setSupportActionBar(toolbar); // needed to auto readjust the toolbar content color
    setStatusbarColor(color);

    int secondaryTextColor = MaterialValueHelper.getSecondaryTextColor(this, ColorUtil.isColorLight(color));
    artistIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    durationIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    songCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    albumYearIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    artistTextView.setTextColor(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(color)));
    durationTextView.setTextColor(secondaryTextColor);
    songCountTextView.setTextColor(secondaryTextColor);
    albumYearTextView.setTextColor(secondaryTextColor);
}
 
Example 4
Source File: ArtistDetailActivity.java    From Phonograph with GNU General Public License v3.0 6 votes vote down vote up
private void setColors(int color) {
    toolbarColor = color;
    headerView.setBackgroundColor(color);

    setNavigationbarColor(color);
    setTaskDescriptionColor(color);

    toolbar.setBackgroundColor(color);
    setSupportActionBar(toolbar); // needed to auto readjust the toolbar content color
    setStatusbarColor(color);

    int secondaryTextColor = MaterialValueHelper.getSecondaryTextColor(this, ColorUtil.isColorLight(color));
    durationIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    songCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    albumCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    durationTextView.setTextColor(secondaryTextColor);
    songCountTextView.setTextColor(secondaryTextColor);
    albumCountTextView.setTextColor(secondaryTextColor);
}
 
Example 5
Source File: FlatPlaybackControlsFragment.java    From RetroMusicPlayer with GNU General Public License v3.0 6 votes vote down vote up
public void setDark(int dark) {
    int color = ATHUtil.resolveColor(getActivity(), android.R.attr.colorBackground);
    if (ColorUtil.isColorLight(color)) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    if (PreferenceUtil.getInstance(getContext()).getAdaptiveColor()) {
        updateTextColors(dark);
        setProgressBarColor(dark);
        TintHelper.setTintAuto(mPlayerPlayPauseFab, dark, true);
    } else {
        int accentColor = ThemeStore.accentColor(getContext());
        updateTextColors(accentColor);
        setProgressBarColor(accentColor);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updateProgressTextColor();
}
 
Example 6
Source File: PlayerPlaybackControlsFragment.java    From RetroMusicPlayer with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void setDark(int dark) {
    int color = ATHUtil.resolveColor(getActivity(), android.R.attr.colorBackground);
    if (ColorUtil.isColorLight(color)) {
        lastPlaybackControlsColor = MaterialValueHelper
                .getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper
                .getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper
                .getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper
                .getPrimaryDisabledTextColor(getActivity(), false);
    }

    if (PreferenceUtil.getInstance(getContext()).getAdaptiveColor()) {
        TintHelper.setTintAuto(playPauseFab, dark, true);
        setProgressBarColor(progressSlider, dark);
        text.setTextColor(dark);
    } else {
        text.setTextColor(ThemeStore.accentColor(getContext()));
    }
    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
}
 
Example 7
Source File: AlbumDetailActivity.java    From VinylMusicPlayer with GNU General Public License v3.0 6 votes vote down vote up
private void setColors(int color) {
    toolbarColor = color;
    headerView.setBackgroundColor(color);

    setNavigationbarColor(color);
    setTaskDescriptionColor(color);

    toolbar.setBackgroundColor(color);
    setSupportActionBar(toolbar); // needed to auto readjust the toolbar content color
    setStatusbarColor(color);

    int secondaryTextColor = MaterialValueHelper.getSecondaryTextColor(this, ColorUtil.isColorLight(color));
    artistIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    durationIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    songCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    albumYearIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    artistTextView.setTextColor(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(color)));
    durationTextView.setTextColor(secondaryTextColor);
    songCountTextView.setTextColor(secondaryTextColor);
    albumYearTextView.setTextColor(secondaryTextColor);
}
 
Example 8
Source File: ArtistDetailActivity.java    From VinylMusicPlayer with GNU General Public License v3.0 6 votes vote down vote up
private void setColors(int color) {
    toolbarColor = color;
    headerView.setBackgroundColor(color);

    setNavigationbarColor(color);
    setTaskDescriptionColor(color);

    toolbar.setBackgroundColor(color);
    setSupportActionBar(toolbar); // needed to auto readjust the toolbar content color
    setStatusbarColor(color);

    int secondaryTextColor = MaterialValueHelper.getSecondaryTextColor(this, ColorUtil.isColorLight(color));
    durationIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    songCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    albumCountIconImageView.setColorFilter(secondaryTextColor, PorterDuff.Mode.SRC_IN);
    durationTextView.setTextColor(secondaryTextColor);
    songCountTextView.setTextColor(secondaryTextColor);
    albumCountTextView.setTextColor(secondaryTextColor);
}
 
Example 9
Source File: CardPlayerPlaybackControlsFragment.java    From Music-Player with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updateProgressTextColor();
}
 
Example 10
Source File: CardPlayerPlaybackControlsFragment.java    From Phonograph with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updateProgressTextColor();
}
 
Example 11
Source File: FlatPlayerPlaybackControlsFragment.java    From Phonograph with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updatePlayPauseColor();
    updateProgressTextColor();
}
 
Example 12
Source File: CardPlayerPlaybackControlsFragment.java    From VinylMusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updateProgressTextColor();
}
 
Example 13
Source File: FlatPlayerPlaybackControlsFragment.java    From VinylMusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updatePlayPauseColor();
    updateProgressTextColor();
}
 
Example 14
Source File: CardPlayerPlaybackControlsFragment.java    From Orin with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updateProgressTextColor();
}
 
Example 15
Source File: FlatPlayerPlaybackControlsFragment.java    From Orin with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updatePlayPauseColor();
    updateProgressTextColor();
}
 
Example 16
Source File: FlatPlayerPlaybackControlsFragment.java    From Music-Player with GNU General Public License v3.0 5 votes vote down vote up
public void setDark(boolean dark) {
    if (dark) {
        lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(getActivity(), true);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(getActivity(), true);
    } else {
        lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(getActivity(), false);
        lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(getActivity(), false);
    }

    updateRepeatState();
    updateShuffleState();
    updatePrevNextColor();
    updatePlayPauseColor();
    updateProgressTextColor();
}
 
Example 17
Source File: FullPlaybackControlsFragment.java    From RetroMusicPlayer with GNU General Public License v3.0 4 votes vote down vote up
private void updateProgressTextColor() {
    int color = MaterialValueHelper.getSecondaryTextColor(getContext(), false);
    //songTotalTime.setTextColor(color);
    //songCurrentProgress.setTextColor(color);
}
 
Example 18
Source File: FlatPlaybackControlsFragment.java    From RetroMusicPlayer with GNU General Public License v3.0 4 votes vote down vote up
private void updateProgressTextColor() {
    int color = MaterialValueHelper.getSecondaryTextColor(getContext(), false);
    //songTotalTime.setTextColor(color);
    //songCurrentProgress.setTextColor(color);
}