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


Java IconicsImageView.setIcon方法代码示例

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


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

示例1: convert

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
@Override
protected void convert(BaseViewHolder holder, Content content) {
    if (content != null) {
        IconicsImageView typeIndicator = holder.getView(R.id.type);
        if (content.isDir()) {
            typeIndicator.setIcon(Octicons.Icon.oct_file_directory);
        } else if (content.isFile()) {
            typeIndicator.setIcon(Octicons.Icon.oct_file_binary);
        } else if (content.isSubmodule()) {
            typeIndicator.setIcon(Octicons.Icon.oct_file_submodule);
        } else {
            typeIndicator.setIcon(Octicons.Icon.oct_file_symlink_file);
        }
        holder.setText(R.id.file_name, content.name);
    }
}
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:17,代码来源:RepoContentAdapter.java

示例2: convert

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
@Override
protected void convert(BaseViewHolder holder, Content content) {

    IconicsImageView typeIndicator = holder.getView(R.id.type);
    if (content.isDir()) {
        typeIndicator.setIcon(Octicons.Icon.oct_file_directory);
    }
    else if (content.isFile()) {
        typeIndicator.setIcon(Octicons.Icon.oct_file_binary);
    }
    else if (content.isSubmodule()) {
        typeIndicator.setIcon(Octicons.Icon.oct_file_submodule);
    }
    else {
        typeIndicator.setIcon(Octicons.Icon.oct_file_symlink_file);
    }

    holder.setText(R.id.file_name, content.name);
}
 
开发者ID:mingjunli,项目名称:GithubApp,代码行数:20,代码来源:RepoContentAdapter.java

示例3: updateIcon

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
@Override
    public void updateIcon(BaseSetting<Value, CLASS, SettData, VH> data, boolean globalSetting) {
        IIcon icon = data.getIcon();
        if (icon != null) {
            getIconView().setVisibility(View.VISIBLE);
            IconicsImageView iv = (IconicsImageView) getIconView();
            IconicsDrawable drawable = new IconicsDrawable(iv.getContext(), icon);
            drawable.paddingDp(data.getIconPaddingDp());
            if (data.getIconColor() != null) {
                drawable.color(data.getIconColor());
            } else {
                drawable.color(Util.getTextColor());
            }
            iv.setIcon(drawable);

//            IconicsDrawable d = ((IconicsDrawable) getIconView().getDrawable());
//            d.icon(icon).color(Util.getTextColor()).paddingDp(data.getIconPaddingDp());
        } else {
            getIconView().setVisibility(View.GONE);
        }

        if (!globalSetting) {
            int dividerMarginLeft = (int) getInnerDivider().getContext().getResources().getDimension(icon == null ? R.dimen.divider_left_margin_no_image : R.dimen.divider_left_margin_with_image);
            int row2PaddingLeft = (int) getInnerDivider().getContext().getResources().getDimension(icon == null ? R.dimen.row2_left_padding_no_image : R.dimen.row2_left_padding_with_image);
            ((ViewGroup.MarginLayoutParams) getInnerDivider().getLayoutParams()).leftMargin = dividerMarginLeft;
            getRow2().setPadding(row2PaddingLeft, getRow2().getPaddingTop(), getRow2().getPaddingRight(), getRow2().getPaddingBottom());
        }
    }
 
开发者ID:MFlisar,项目名称:RecyclerViewPreferences,代码行数:29,代码来源:BaseSettingViewHolder.java

示例4: error

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
public void error() {
    for (int i = 0; i < size; i++) {
        final IconicsImageView currentDot = theDots.get(i);
        currentDot.setIcon(errorIcon);
    }
    this.startAnimation(shakeAnim);
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:8,代码来源:IndicatorDotView.java

示例5: isPolicyRespected

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
@Override
public boolean isPolicyRespected() {
	TextView textView = (TextView) getView().findViewById(R.id.disableLockTxtBt);
	IconicsImageView imageView = (IconicsImageView) getView().findViewById(R.id.intro_disableSLImage);
	KeyguardManager keyguardManager = (KeyguardManager) getContext().getSystemService(KEYGUARD_SERVICE);
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
		if (!keyguardManager.isKeyguardSecure()) {
			AppLogger.info("Lockscreen is turned off!");
			textView.setText(R.string.disableSLBTLockDisabled);
			textView.setClickable(false);
			imageView.setImageDrawable(new IconicsDrawable(getActivity()).icon(GoogleMaterial.Icon.gmd_check_circle));


			return true;

		} else {
			AppLogger.info("Lockscreen is turned on!");
			if (forceEnabledSystemLockScreen == true) {
				AppLogger.info("User wants to keep system lock on!");
				textView.setText(R.string.disableSLBTLockForced);
				textView.setClickable(false);
				imageView.setIcon(new IconicsDrawable(getActivity()).icon(GoogleMaterial.Icon.gmd_check_circle));

				return true;
			} else {
				return false;
			}
		}
	} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
		if (!keyguardManager.isDeviceSecure()) {
			AppLogger.info("Lockscreen is turned off!");
			textView.setText(R.string.disableSLBTLockDisabled);
			textView.setClickable(false);
			imageView.setImageDrawable(new IconicsDrawable(getActivity()).icon(GoogleMaterial.Icon.gmd_check_circle));
			return true;
		} else {
			AppLogger.info("Lockscreen is turned on!");
			if (forceEnabledSystemLockScreen == true) {
				AppLogger.info("User wants to keep system lock on!");
				textView.setText(R.string.disableSLBTLockForced);
				textView.setClickable(false);
				imageView.setIcon(new IconicsDrawable(getActivity()).icon(GoogleMaterial.Icon.gmd_check_circle));
				return true;
			} else {
				return false;
			}
		}
	}
	AppLogger.info("Lockscreen is turned on!");
	return false;
}
 
开发者ID:NovaViper,项目名称:TrinityLocker,代码行数:52,代码来源:DisableSystemLockFragment.java

示例6: ViewHolder

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
public ViewHolder(View view) {
    super(view);
    arrow = (IconicsImageView) view.findViewById(R.id.material_drawer_arrow);
    arrow.setIcon(new IconicsDrawable(view.getContext(), MaterialDrawerFont.Icon.mdf_expand_more).sizeDp(16).paddingDp(2).color(Color.BLACK));
}
 
开发者ID:LeMinhAn,项目名称:MaterialDrawer,代码行数:6,代码来源:ExpandableDrawerItem.java

示例7: unmarkCurrent

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
private void unmarkCurrent() {
    final IconicsImageView currentDot = theDots.get(index);
    currentDot.setIcon(unmarkedIcon);
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:5,代码来源:IndicatorDotView.java

示例8: markCurrent

import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
private void markCurrent() {
    final IconicsImageView currentDot = theDots.get(index);
    currentDot.setIcon(markedIcon);
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:5,代码来源:IndicatorDotView.java


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