



我希望为gridview的项目设置动画,使每个项目集中到视图中心并且一个项目可见,然后网格项目再次移回其原始位置.为清晰起见,我添加了图片.动画流程如图1-图2-图3 - 图4 - 图1.怎么做?
我必须动态地将CheckBox添加到我的Activity布局中,布局的XML如下所示
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parentSV"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/parentLL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp" >
<RelativeLayout
android:id="@+id/feedbackRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/feedbackCustomerNameLL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:text="Name : "
android:textColor="@android:color/black" />
<TextView
android:id="@+id/feedbackCustomerName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:id="@+id/feedbackPlansLL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/feedbackCustomerNameLL"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Plans Explained"
android:textColor="@android:color/black" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/feedbackPlansCheckBoxLL"
android:orientation="horizontal" >
<!--
Required to Add CheckBoxes Here Dynamically
-->
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
` …