use of net.steamcrafted.materialiconlib.MaterialDrawableBuilder in project Timber by naman14.
the class BaseNowplayingFragment method updateRepeatState.
public void updateRepeatState() {
if (repeat != null && getActivity() != null) {
MaterialDrawableBuilder builder = MaterialDrawableBuilder.with(getActivity()).setIcon(MaterialDrawableBuilder.IconValue.REPEAT).setSizeDp(30);
if (getActivity() != null) {
if (MusicPlayer.getRepeatMode() == 0) {
builder.setColor(Config.textColorPrimary(getActivity(), ateKey));
} else
builder.setColor(Config.accentColor(getActivity(), ateKey));
}
repeat.setImageDrawable(builder.build());
repeat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleRepeat();
updateRepeatState();
updateShuffleState();
}
});
}
}
use of net.steamcrafted.materialiconlib.MaterialDrawableBuilder in project Timber by naman14.
the class Timber6 method updateRepeatState.
@Override
public void updateRepeatState() {
if (repeat != null && getActivity() != null) {
MaterialDrawableBuilder builder = MaterialDrawableBuilder.with(getActivity()).setIcon(MaterialDrawableBuilder.IconValue.REPEAT).setSizeDp(30);
if (MusicPlayer.getRepeatMode() == 0) {
builder.setColor(Color.WHITE);
} else
builder.setColor(accentColor);
repeat.setImageDrawable(builder.build());
repeat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleRepeat();
updateRepeatState();
updateShuffleState();
}
});
}
}
use of net.steamcrafted.materialiconlib.MaterialDrawableBuilder in project Timber by naman14.
the class Timber6 method updateShuffleState.
@Override
public void updateShuffleState() {
if (shuffle != null && getActivity() != null) {
MaterialDrawableBuilder builder = MaterialDrawableBuilder.with(getActivity()).setIcon(MaterialDrawableBuilder.IconValue.SHUFFLE).setSizeDp(30);
if (MusicPlayer.getShuffleMode() == 0) {
builder.setColor(Color.WHITE);
} else
builder.setColor(accentColor);
shuffle.setImageDrawable(builder.build());
shuffle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleShuffle();
updateShuffleState();
updateRepeatState();
}
});
}
}
use of net.steamcrafted.materialiconlib.MaterialDrawableBuilder in project Timber by naman14.
the class BaseNowplayingFragment method updateShuffleState.
public void updateShuffleState() {
if (shuffle != null && getActivity() != null) {
MaterialDrawableBuilder builder = MaterialDrawableBuilder.with(getActivity()).setIcon(MaterialDrawableBuilder.IconValue.SHUFFLE).setSizeDp(30);
if (getActivity() != null) {
if (MusicPlayer.getShuffleMode() == 0) {
builder.setColor(Config.textColorPrimary(getActivity(), ateKey));
} else
builder.setColor(Config.accentColor(getActivity(), ateKey));
}
shuffle.setImageDrawable(builder.build());
shuffle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleShuffle();
updateShuffleState();
updateRepeatState();
}
});
}
}
use of net.steamcrafted.materialiconlib.MaterialDrawableBuilder in project Timber by naman14.
the class Timber4 method updateShuffleState.
@Override
public void updateShuffleState() {
if (shuffle != null && getActivity() != null) {
MaterialDrawableBuilder builder = MaterialDrawableBuilder.with(getActivity()).setIcon(MaterialDrawableBuilder.IconValue.SHUFFLE).setSizeDp(30);
if (MusicPlayer.getShuffleMode() == 0) {
builder.setColor(Color.WHITE);
} else
builder.setColor(accentColor);
shuffle.setImageDrawable(builder.build());
shuffle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleShuffle();
updateShuffleState();
updateRepeatState();
}
});
}
}
Aggregations