设置图片的渐变淡出 效果
新建 xml
在Activity中无法引用 报错:
'default' is not a best match for any device/locale combination.
[2016-09-09 15:34:27 - Pro_UserInfo] Displaying it with ', , Locale Language ___Region __, Left To Right, sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, Normal, Day time, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Exposed navigation, Trackball navigation, Screen resolution 800x480, API Level 20' which is compatible, but will actually be displayed with another more specific version of the layout.
Activity:
public class AuditActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ViewFlipper viewFilpper = (ViewFlipper) findViewById(R.drawable.gezhi);
viewFilpper.setInAnimation(AnimationUtils.loadAnimation(this,R.anim.push_in));
viewFilpper.setOutAnimation(AnimationUtils.loadAnimation(this,
R.anim.push_out));
viewFilpper.startFlipping();
}
}
你的代码中ViewFlipper为什么findviewbyid后面是R.drawable呢 应该是id不是?
id 也无法引用