我想随机安装Android:Text和Android:id by TexTView by programe as Layout Bellow
<RelativeLayout
android:id="@+id/drag"
android:layout_below="@+id/color_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true" >
<TextView
android:id="@+id/1"
android:layout_width="85dp"
android:layout_height="33dp"
android:layout_margin="2dp"
android:text="1"
android:textColor="@color/white"
android:background="@drawable/choice_drag"
android:gravity="center"
android:textStyle="bold"/>
<TextView
android:id="@+id/2"
android:layout_width="85dp"
android:layout_height="33dp"
android:layout_toRightOf="@+id/1"
android:layout_margin="2dp"
android:text="2"
android:textColor="@color/white"
android:background="@drawable/choice_drag"
android:gravity="center"
android:textStyle="bold"/>
<TextView
android:id="@+id/3"
android:layout_width="85dp"
android:layout_height="33dp"
android:layout_toRightOf="@+id/2"
android:layout_margin="2dp"
android:text="3"
android:textColor="@color/white"
android:background="@drawable/choice_drag"
android:gravity="center"
android:textStyle="bold"/>
<TextView
android:id="@+id/4"
android:layout_width="85dp"
android:layout_height="33dp"
android:layout_toRightOf="@+id/3"
android:layout_margin="2dp"
android:text="4"
android:textColor="@color/white"
android:background="@drawable/choice_drag"
android:gravity="center"
android:textStyle="bold"/>
<TextView
android:id="@+id/5"
android:layout_width="85dp"
android:layout_height="33dp"
android:layout_toRightOf="@+id/4"
android:layout_margin="2dp"
android:text="5"
android:textColor="@color/white"
android:background="@drawable/choice_drag"
android:gravity="center"
android:textStyle="bold"/>
</RelativeLayout>
我想随机启动活动时TextView的位置总是改变位置。 示例我将有3次启动Activity:
1st start activity : TextView ID and Text, will range as (1,2,3,4,5)
2nd start activity : TextView ID and Text, will range as (2,4,5,1,3)
3rd start activity : TextView ID and Text, will range as (4,5,1,2,3)
任何方法都可以这样做?
请!