本文整理汇总了Java中net.steamcrafted.materialiconlib.MaterialDrawableBuilder.setColor方法的典型用法代码示例。如果您正苦于以下问题:Java MaterialDrawableBuilder.setColor方法的具体用法?Java MaterialDrawableBuilder.setColor怎么用?Java MaterialDrawableBuilder.setColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.steamcrafted.materialiconlib.MaterialDrawableBuilder
的用法示例。
在下文中一共展示了MaterialDrawableBuilder.setColor方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateShuffleState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
@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();
}
});
}
}
示例2: updateRepeatState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
@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();
}
});
}
}
示例3: updateShuffleState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
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();
}
});
}
}
示例4: updateRepeatState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
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();
}
});
}
}
示例5: updateRepeatState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
@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.BLACK);
} else builder.setColor(accentColor);
repeat.setImageDrawable(builder.build());
repeat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleRepeat();
updateRepeatState();
updateShuffleState();
}
});
}
}
示例6: updateShuffleState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
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(Color.BLACK);
} else builder.setColor(accentColor);
}
shuffle.setImageDrawable(builder.build());
shuffle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MusicPlayer.cycleShuffle();
updateShuffleState();
updateRepeatState();
}
});
}
}
示例7: updateShuffleState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
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(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();
}
});
}
}
示例8: updateRepeatState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
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(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();
}
});
}
}
示例9: updateShuffleState
import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; //导入方法依赖的package包/类
@Override
public void updateShuffleState() {
if (shuffle != null && getActivity() != null) {
MaterialDrawableBuilder builder = MaterialDrawableBuilder.with(getActivity())
.setIcon(MaterialDrawableBuilder.IconValue.SHUFFLE)
.setSizeDp(30);
builder.setColor(TimberUtils.getBlackWhiteColor(accentColor));
shuffle.setImageDrawable(builder.build());
shuffle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
MusicPlayer.setShuffleMode(MusicService.SHUFFLE_NORMAL);
MusicPlayer.next();
recyclerView.scrollToPosition(MusicPlayer.getQueuePosition());
}
}, 150);
}
});
}
}