本文整理了Java中android.widget.ImageView.refreshDrawableState()
方法的一些代码示例,展示了ImageView.refreshDrawableState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.refreshDrawableState()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:refreshDrawableState
暂无
代码示例来源:origin: stackoverflow.com
public View getView(int position, View convertView, ViewGroup parent)
{
// Use this code if you want to load from resources
ImageView i = new ImageView(mContext);
i.refreshDrawableState();
Log.e("position==", ""+position);
if(sel_pos==position)
{
i.setImageResource(selectedImage[position]);
}
else
{
i.setImageResource(UnselectedImage[position]);
}
i.setLayoutParams(new CoverFlow.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
i.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
// Make sure we set anti-aliasing otherwise we get jaggies
BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
return i;
}
代码示例来源:origin: stackoverflow.com
Drawable d = Drawable.createFromPath(path);
MyImageView.setImageDrawable(d);
MyImageView.refreshDrawableState();
代码示例来源:origin: stackoverflow.com
i.refreshDrawableState();
i.setDrawingCacheEnabled(false);
i.setAdjustViewBounds(true);
代码示例来源:origin: hypeapps/FixMath
private void resetCalculation() {
TextView calcElement;
ImageView calcElementIV;
//FIGURY
for (int i = 0; i <= 4; i++) {
String TextViewId = "t_var" + i;
int ID = getResources().getIdentifier(TextViewId, "id", getPackageName());
calcElement = (TextView) findViewById(ID);
calcElement.setVisibility(View.GONE);
calcElement.setTag("");
calcElement.setText("");
String ImageViewId = "t_var_ImageView_" + i;
int ivID = getResources().getIdentifier(ImageViewId, "id", getPackageName());
calcElementIV = (ImageView) findViewById(ivID);
calcElementIV.refreshDrawableState();
calcElementIV.setVisibility(View.GONE);
}
//SYMBOLE
for (int i = 0; i <= 3; i++) {
String TextViewId = "t_symbol" + i;
int ID = getResources().getIdentifier(TextViewId, "id", getPackageName());
calcElement = (TextView) findViewById(ID);
calcElement.setVisibility(View.GONE);
calcElement.setText("");
}
keyboard = new TimeKeyboard(this, sfxManager);
}
代码示例来源:origin: stackoverflow.com
imageView.refreshDrawableState();
imageView.setImageDrawable(drawables[i]);
内容来源于网络,如有侵权,请联系作者删除!