本文實(shí)例講述了Android編程實(shí)現(xiàn)圓角邊框布局效果的方法。分享給大家供大家參考,具體如下:
這里用的是TableLayout布局的。先看效果圖
下面看下布局文件
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:Android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFF" android:orientation="vertical" > <!-- 表格布局 --> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dip" > <!-- 表格布局:第一行 --> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/shape_top_corner_no_bottom_line" android:padding="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginRight="10dip" android:text="姓名:" > </TextView> <EditText android:id="@+id/bankingYourNameEditText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:background="@null" android:singleLine="true" > </EditText> </TableRow> <!-- 表格布局:第二行 --> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/shape_no_corner_without_bottom" android:padding="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginRight="10dip" android:text="聯(lián)系電話:" > </TextView> <EditText android:id="@+id/bankingContactTelEditText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:background="@null" android:inputType="phone" android:singleLine="true" > </EditText> </TableRow> <!-- 表格布局:第三行 --> <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/shape_bottom_corner_no_top_line" android:padding="10dip" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginRight="10dip" android:text="聯(lián)系電話:" > </TextView> <EditText android:id="@+id/bankingContactTelEditText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:background="@null" android:inputType="phone" android:singleLine="true" > </EditText> </TableRow> </TableLayout> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="Button" /> </LinearLayout>
名稱(chēng)欄目:Android編程實(shí)現(xiàn)圓角邊框布局效果的方法-創(chuàng)新互聯(lián)
當(dāng)前網(wǎng)址:http://vcdvsql.cn/article0/jsjio.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄、網(wǎng)站排名、做網(wǎng)站、移動(dòng)網(wǎng)站建設(shè)、動(dòng)態(tài)網(wǎng)站、小程序開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容