开发步骤: 在res下layout下创建一个Toast的布局资源文件toast_customer.在最外层布局组件中为该布局添加android:id属性 1 //toast_customer. 2 3 <??> 4 <LinearLayout =&quo ...
开发步骤:
- 在res下layout下创建一个Toast的布局资源文件toast_customer.
- 在最外层布局组件中为该布局添加android:id属性
1 //toast_customer. 2 3 <??> 4 <LinearLayout ="http://schemas.android.com/apk/res/android" 5 android:id="@+id/toast_layout_root" //在最外层布局组件中为该布局添加android:id属性 6 android:layout_width="match_parent" 7 android:layout_height="match_parent" 8 android:orientation="horizontal" 9 10 <TextView11 android:id="@+id/toastMessage"12 android:layout_width="wrap_content"13 android:layout_height="30dp"14 android:gravity="center_horizontal|center_vertical"15 android:textSize="13dp"16 android:textColor="#000000"17 />18 </LinearLayout>
原标题:提示框的优化之自定义Toast组件之(一)Toast组件的布局实现
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。