当前位置: 首页>>代码示例>>Java>>正文


Java ApiCompatibilityUtils.getColorStateList方法代码示例

本文整理汇总了Java中org.chromium.base.ApiCompatibilityUtils.getColorStateList方法的典型用法代码示例。如果您正苦于以下问题:Java ApiCompatibilityUtils.getColorStateList方法的具体用法?Java ApiCompatibilityUtils.getColorStateList怎么用?Java ApiCompatibilityUtils.getColorStateList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.chromium.base.ApiCompatibilityUtils的用法示例。


在下文中一共展示了ApiCompatibilityUtils.getColorStateList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateVisualsForState

import org.chromium.base.ApiCompatibilityUtils; //导入方法依赖的package包/类
/**
 * Call to force the UI to update the state of various buttons based on whether or not the
 * current tab is incognito.
 */
@Override
public void updateVisualsForState() {
    if (updateUseDarkColors() || mIsEmphasizingHttpsScheme != shouldEmphasizeHttpsScheme()) {
        updateSecurityIcon(getSecurityLevel());
    }
    ColorStateList colorStateList = ApiCompatibilityUtils.getColorStateList(getResources(),
            mUseDarkColors ? R.color.dark_mode_tint : R.color.light_mode_tint);
    mMicButton.setTint(colorStateList);
    mDeleteButton.setTint(colorStateList);

    setNavigationButtonType(mNavigationButtonType);
    mUrlBar.setUseDarkTextColors(mUseDarkColors);

    if (mSuggestionList != null) {
        mSuggestionList.setBackground(getSuggestionPopupBackground());
    }
    mSuggestionListAdapter.setUseDarkColors(mUseDarkColors);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:23,代码来源:LocationBarLayout.java

示例2: updateVisualsForTabModel

import org.chromium.base.ApiCompatibilityUtils; //导入方法依赖的package包/类
@Override
protected void updateVisualsForTabModel(boolean isIncognito) {
    int queryTextColorId;
    if (isIncognito) {
        setBackgroundResource(R.color.incognito_primary_color);
        ColorStateList white = ApiCompatibilityUtils.getColorStateList(getResources(),
                R.color.light_mode_tint);
        mFindNextButton.setTint(white);
        mFindPrevButton.setTint(white);
        mCloseFindButton.setTint(white);
        queryTextColorId = R.color.find_in_page_query_white_color;
    } else {
        setBackgroundColor(Color.WHITE);
        ColorStateList dark = ApiCompatibilityUtils.getColorStateList(getResources(),
                R.color.dark_mode_tint);
        mFindNextButton.setTint(dark);
        mFindPrevButton.setTint(dark);
        mCloseFindButton.setTint(dark);
        queryTextColorId = R.color.find_in_page_query_color;
    }
    mFindQuery.setTextColor(
            ApiCompatibilityUtils.getColor(getContext().getResources(), queryTextColorId));
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:24,代码来源:FindToolbarPhone.java

示例3: DownloadItemView

import org.chromium.base.ApiCompatibilityUtils; //导入方法依赖的package包/类
/**
 * Constructor for inflating from XML.
 */
public DownloadItemView(Context context, AttributeSet attrs) {
    super(context, attrs);
    mIconBackgroundColor =
            ApiCompatibilityUtils.getColor(context.getResources(), R.color.light_active_color);
    mIconBackgroundColorSelected =
            ApiCompatibilityUtils.getColor(context.getResources(), R.color.google_grey_600);
    mWhiteTint =
            ApiCompatibilityUtils.getColorStateList(getResources(), R.color.white_mode_tint);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:13,代码来源:DownloadItemView.java

示例4: ToolbarLayout

import org.chromium.base.ApiCompatibilityUtils; //导入方法依赖的package包/类
/**
 * Basic constructor for {@link ToolbarLayout}.
 */
public ToolbarLayout(Context context, AttributeSet attrs) {
    super(context, attrs);
    mToolbarHeightWithoutShadow = getResources().getDimensionPixelOffset(
            getToolbarHeightWithoutShadowResId());
    mDarkModeTint =
            ApiCompatibilityUtils.getColorStateList(getResources(), R.color.dark_mode_tint);
    mLightModeTint =
            ApiCompatibilityUtils.getColorStateList(getResources(), R.color.light_mode_tint);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:13,代码来源:ToolbarLayout.java

示例5: TintedDrawable

import org.chromium.base.ApiCompatibilityUtils; //导入方法依赖的package包/类
public TintedDrawable(Resources res, Bitmap bitmap) {
    super(res, bitmap);
    mTint = ApiCompatibilityUtils.getColorStateList(res, R.color.dark_mode_tint);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:5,代码来源:TintedDrawable.java


注:本文中的org.chromium.base.ApiCompatibilityUtils.getColorStateList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。