本文整理汇总了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);
}
}
示例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);
}
示例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());
}
}
示例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);
}
示例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;
}
示例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));
}
示例7: unmarkCurrent
import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
private void unmarkCurrent() {
final IconicsImageView currentDot = theDots.get(index);
currentDot.setIcon(unmarkedIcon);
}
示例8: markCurrent
import com.mikepenz.iconics.view.IconicsImageView; //导入方法依赖的package包/类
private void markCurrent() {
final IconicsImageView currentDot = theDots.get(index);
currentDot.setIcon(markedIcon);
}