【发布时间】:2014-01-19 04:19:11
【问题描述】:
所以我在 android/java 中有这个 TextView,我想沿着它所在的水平轴随机定位。这是我到目前为止的代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:layout_width="100dp" //This is the width I want to randomize
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/n5"/>
我的目标是,通过随机化android:layout_width= 行中的100dp,我可以将TextView 移动一定的随机量。有人知道怎么做吗?
谢谢!
【问题讨论】:
-
emm...您想移动定义、随机数量的东西吗?看来你想做不可能的事。