久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Android EditText 在其可繪制對(duì)象和文本之間繪制分隔

Android EditText draw a divider line between its drawable and its text(Android EditText 在其可繪制對(duì)象和文本之間繪制分隔線)
本文介紹了Android EditText 在其可繪制對(duì)象和文本之間繪制分隔線的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

我有一個(gè)帶有 drawableLeft 圖像的 EditText.我需要在我的 drawableLeft 旁邊的 EditText 中添加一條垂直線,如下例所示:

I have an EditText with a drawableLeft image. I need to add a vertical line in EditText right beside my drawableLeft like this example:

我能想到的最簡(jiǎn)單的方法是將這條線添加到我的可繪制圖像中.但是一般有沒(méi)有其他方法可以做到這一點(diǎn)?

Easiest way that I can think of is to add that line into my drawable image. But generally is there any other way to do this?

推薦答案

  1. 在 res/drawable/shape.xml 中創(chuàng)建一個(gè)矩形圓角形狀

  1. Create a rectangular rounded corner shape in res/drawable/shape.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="3dip" android:color="@android:color/darker_gray" />
<corners android:radius="10dip"/>
<padding android:left="10dip" android:top="10dip" android:right="10dip"        android:bottom="10dip" />
</shape>

  • 現(xiàn)在創(chuàng)建一個(gè)布局

  • Now create a layout

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/shape"
    android:gravity="center_vertical">
    
    
    <ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/imageView"
    android:src="@drawable/ic_launcher"/>
    
    <View
    android:layout_width="2dp"
    android:layout_height="match_parent"
    android:background="@android:color/darker_gray"
    android:layout_marginLeft="10dp"/>
    
    <EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/editText"
    android:layout_weight="1"
    android:background="@null"
    android:layout_marginLeft="10dp"
    android:hint="Your bitcoin address here"/>
    
    
    </LinearLayout>
    

  • 我已將線性布局背景設(shè)置為矩形圓角形狀.和urs的圖片預(yù)覽一模一樣.

  • I have set the Linear layout background with th rectangular rounded corner shape. It looks exactly as the image preview of urs.

    這篇關(guān)于Android EditText 在其可繪制對(duì)象和文本之間繪制分隔線的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

    【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!
  • 相關(guān)文檔推薦

    Cut, copy, paste in android(在android中剪切、復(fù)制、粘貼)
    android EditText blends into background(android EditText 融入背景)
    Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
    EditText showing numbers with 2 decimals at all times(EditText 始終顯示帶 2 位小數(shù)的數(shù)字)
    Changing where cursor starts in an expanded EditText(更改光標(biāo)在展開(kāi)的 EditText 中的開(kāi)始位置)
    EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問(wèn)題)
    主站蜘蛛池模板: 日韩中文字幕在线观看 | 日本精品一区二区三区视频 | 在线观看免费av网站 | 国产成人精品一区二区三区在线 | 精品视频久久久久久 | 国产精品视频区 | 亚洲国产成人精品女人久久久野战 | 国产成人综合在线 | 久草视频观看 | 福利影院在线看 | 欧美一区二区三区精品免费 | 日韩中文字幕在线 | 久久a久久 | 久久综合一区二区三区 | 在线视频成人 | 欧美日韩中文字幕在线 | 国产成人久久精品 | 国产精品久久久久久网站 | www.久久 | 91精品国产91久久久久久吃药 | 国产成人精品亚洲日本在线观看 | 91精品国产综合久久久久 | 在线免费av电影 | 精品国产乱码久久久久久蜜柚 | 特黄色一级毛片 | 国产精品久久久久久久久免费丝袜 | 欧美精品一区二区三区在线播放 | 久久婷婷国产麻豆91 | 亚洲一二三区在线观看 | 欧美日韩国产一区二区三区 | 欧美久久久 | 亚洲天堂一区二区 | 日韩图区| www.久久久久久久久久久 | 黄色片视频 | 欧美日韩在线免费观看 | 欧美精品一二三区 | 欧美一级小视频 | 国产精品久久久久久亚洲调教 | a级黄色毛片免费播放视频 国产精品视频在线观看 | 久久久国产亚洲精品 |