Android ImageShow的使用
2010-05-18 16:34:00 来源:WEB开发网LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
i.setBackgroundResource(R.drawable.picture_frame);
return i;
}
private Context mContext;
}
private Integer[] mThumbIds = {
R.drawable.sample_thumb_0, R.drawable.sample_thumb_1,
R.drawable.sample_thumb_2, R.drawable.sample_thumb_3,
R.drawable.sample_thumb_4, R.drawable.sample_thumb_5,
R.drawable.sample_thumb_6, R.drawable.sample_thumb_7};
private Integer[] mImageIds = {
R.drawable.sample_0, R.drawable.sample_1, R.drawable.sample_2,
R.drawable.sample_3, R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7};
}
//frameworksasecoreesesanimfade_in.xml
Java代码
1. < alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@anim/accelerate_interpolator"
2. android:fromAlpha="1.0"
3. android:toAlpha="0.0"
4. android:duration="@android:integer/config_mediumAnimTime"
5. / >
< alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@anim/accelerate_interpolator"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="@android:integer/config_mediumAnimTime"
/ >
//frameworksasecoreesesanimfade_out.xml
Java代码
1. < alpha xmlns:android="http://schemas.android.com/apk/res/android"
2. android:interpolator="@anim/decelerate_interpolator"
3. android:fromAlpha="0.0" android:toAlpha="1.0"
4. android:duration="@android:integer/config_longAnimTime" / >
< alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@anim/decelerate_interpolator"
更多精彩
赞助商链接