本文整理了Java中android.widget.ImageButton.setImageTintList()
方法的一些代码示例,展示了ImageButton.setImageTintList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.setImageTintList()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:setImageTintList
暂无
代码示例来源:origin: codekidX/storage-chooser
mBackButton.setImageTintList(ColorStateList.valueOf(scheme[Theme.SEC_ADDRESS_TINT_INDEX]));
代码示例来源:origin: gateship-one/odyssey
case REPEAT_OFF:
mBottomRepeatButton.setImageResource(R.drawable.ic_repeat_24dp);
mBottomRepeatButton.setImageTintList(ColorStateList.valueOf(ThemeUtils.getThemeColor(getContext(), R.attr.odyssey_color_text_accent)));
break;
case REPEAT_ALL:
mBottomRepeatButton.setImageResource(R.drawable.ic_repeat_24dp);
mBottomRepeatButton.setImageTintList(ColorStateList.valueOf(ThemeUtils.getThemeColor(getContext(), android.R.attr.colorAccent)));
break;
case REPEAT_TRACK:
mBottomRepeatButton.setImageResource(R.drawable.ic_repeat_one_24dp);
mBottomRepeatButton.setImageTintList(ColorStateList.valueOf(ThemeUtils.getThemeColor(getContext(), android.R.attr.colorAccent)));
break;
mBottomRandomButton.setImageTintList(ColorStateList.valueOf(ThemeUtils.getThemeColor(getContext(), R.attr.odyssey_color_text_accent)));
break;
case RANDOM_ON:
mBottomRandomButton.setImageTintList(ColorStateList.valueOf(ThemeUtils.getThemeColor(getContext(), android.R.attr.colorAccent)));
break;
代码示例来源:origin: gateship-one/odyssey
/**
* Set the viewswitcher of cover/playlist view to the requested state.
*
* @param view the view which should be displayed.
*/
public void setViewSwitcherStatus(NowPlayingDragStatusReceiver.VIEW_SWITCHER_STATUS view) {
int color = 0;
switch (view) {
case COVER_VIEW:
// change the view only if the requested view is not displayed
if (mViewSwitcher.getCurrentView() != mCoverImage) {
mViewSwitcher.showNext();
}
color = ThemeUtils.getThemeColor(getContext(), R.attr.odyssey_color_text_accent);
TooltipCompat.setTooltipText(mTopPlaylistButton, getResources().getString(R.string.action_npv_show_playlist));
break;
case PLAYLIST_VIEW:
// change the view only if the requested view is not displayed
if (mViewSwitcher.getCurrentView() != mPlaylistView) {
mViewSwitcher.showNext();
}
color = ThemeUtils.getThemeColor(getContext(), R.attr.colorAccent);
TooltipCompat.setTooltipText(mTopPlaylistButton, getResources().getString(R.string.action_npv_show_cover));
break;
}
// tint the button according to the requested view
mTopPlaylistButton.setImageTintList(ColorStateList.valueOf(color));
}
内容来源于网络,如有侵权,请联系作者删除!