【发布时间】:2010-11-25 04:17:35
【问题描述】:
资源 myResources = getResources();
CharSequence styledText = myResources.getText(R.string.stop_message); 可绘制图标 = myResources.getDrawable(R.drawable.app_icon);
int opaqueBlue = myResources.getColor(R.color.opaque_blue);
float borderWidth = myResources.getDemension(R.dimen.standard_border);
Animation tranout = AnimationUtils.loadAnimation(this, R.anim.spin_shrink_fade);
String{} stringArray = myResources.getStringArray(R.array.string_array);
int[] intArray = myResources.getIntArray(R.array.integer_array);
资源 myResources = getResources(); AnimationDrawable rocket = (AnimationDrawable)myResources.getDrawable (R.drawable.frame_by_frame);
我正在将最后几个语句与前面的语句进行比较。我的问题是,为什么在上面的其他示例中不需要强制转换时,AnimationDrawable 会显式转换?
【问题讨论】:
标签: android oop inheritance casting