1.为界面增加淡入淡出的动画效果。在res目录下创建anim_listview.xml,设置了一个Alpha动画,从无到有的过程
<?xml version="1.0" encoding="utf-8"?>
<alpha>
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromAlpha="0.0"
android:toAlpha="1.0">
</alpha>
2.显示每条成语的详细信息。layout下新建布局文件dialog_info.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_ling"
android:orientation="vertical" >
<TextView
android:id="@+id/tvIdiomInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
3.
<?xml version="1.0" encoding="utf-8"?>
<layoutAnimation
xmlns:android="http://schemas.andriod.com/apk/res/android"
android:anmation="@anim/anim_listview"
android:anmationOrder="random"
android:delay="0.2">
</layoutAnimation>