Framelayout即帧布局,使用这种布局可以把几个控件叠加在一起。使用Framelayout结合textview就可以实现一个简单的霓虹灯效果。一、首先在<??><FrameLayout ="http://schemas.android.com/a ...
Framelayout即帧布局,使用这种布局可以把几个控件叠加在一起。使用Framelayout结合textview就可以实现一个简单的霓虹灯效果。
一、首先在
<??><FrameLayout ="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView" android:layout_gravity="right" android:width="160pt" android:height="160pt" android:background="#f00" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView2" android:layout_gravity="right" android:width="140pt" android:height="140pt" android:background="#88ff00"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView3" android:layout_gravity="right" android:width="120pt" android:height="120pt" android:background="#ffffff"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView4" android:layout_gravity="right" android:width="100pt" android:height="100pt" android:background="#3be407"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView5" android:layout_gravity="right" android:width="80pt" android:height="80pt" android:background="#ffff88"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView6" android:layout_gravity="right" android:width="60pt" android:height="60pt" android:background="#8329c7"/></FrameLayout>
原标题:帧布局实现霓虹灯效果
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。