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

如何創建帶有交叉(x)按鈕的EditText?

How to create EditText with cross(x) button at end of it?(如何創建帶有交叉(x)按鈕的EditText?)
本文介紹了如何創建帶有交叉(x)按鈕的EditText?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

是否有像 EditText 這樣包含十字按鈕的小部件,或者是否有 EditText 的任何屬性可以自動創建它?我希望十字按鈕刪除寫在 EditText 中的任何文本.

Is there any widget like EditText which contains a cross button, or is there any property for EditText by which it is created automatically? I want the cross button to delete whatever text written in EditText.

推薦答案

使用如下布局:

<FrameLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="9dp"
    android:padding="5dp">

    <EditText
        android:id="@+id/calc_txt_Prise"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:inputType="numberDecimal"  
        android:layout_marginTop="20dp"
        android:textSize="25dp"
        android:textColor="@color/gray"
        android:textStyle="bold"
        android:hint="@string/calc_txt_Prise"
        android:singleLine="true" />

    <Button
        android:id="@+id/calc_clear_txt_Prise"      
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="10dp"
        android:layout_gravity="right|center_vertical"
        android:background="@drawable/delete" />

</FrameLayout>

您還可以使用按鈕的 id 并對其 onClickListener 方法執行您想要的任何操作.

You can also use the button's id and perform whatever action you want on its onClickListener method.

這篇關于如何創建帶有交叉(x)按鈕的EditText?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

EditText: Disable Paste/Replace menu pop-up on Text Selection Handler click event(EditText:禁用文本選擇處理程序單擊事件上的粘貼/替換菜單彈出)
Multiline EditText with Done SoftInput Action Label on 2.3(2.3 上帶有完成 SoftInput 操作標簽的多行 EditText)
How to detect the swipe left or Right in Android?(如何在 Android 中檢測向左或向右滑動?)
Prevent dialog dismissal on screen rotation in Android(防止在Android中的屏幕旋轉對話框解除)
How do I handle ImeOptions#39; done button click?(如何處理 ImeOptions 的完成按鈕點擊?)
How do you set EditText to only accept numeric values in Android?(您如何將 EditText 設置為僅接受 Android 中的數值?)
主站蜘蛛池模板: 日韩精品一区二区三区免费观看 | 国产免费观看一级国产 | 日韩欧美一区二区三区四区 | 亚洲精品国产一区 | 91 在线| 欧美二区乱c黑人 | 亚洲激情一区二区三区 | 色伊人久久 | 日韩一区二区三区在线观看 | 亚洲一二三区精品 | 国产精品久久久久久久7电影 | 一区二区三区四区电影视频在线观看 | 91视频亚洲 | 欧美成人a∨高清免费观看 91伊人 | 国产精品一二三区 | 久久久无码精品亚洲日韩按摩 | 欧美日本韩国一区二区 | 亚洲一区二区视频在线播放 | 中国一级特黄真人毛片 | 亚洲一区日韩 | 黄网免费看 | jizz中国日本 | 国精产品一区一区三区免费完 | 欧美福利 | 久久久成人精品 | 免费在线视频精品 | 91视频88av| 精品日韩一区二区三区av动图 | 中文字幕韩在线第一页 | 91色在线 | 欧洲亚洲一区 | 国产男女精品 | 久久精品一区二区三区四区 | 91精品一区二区三区久久久久 | 精品中文视频 | 9久久精品| 欧美专区在线 | h视频在线免费 | 青青99 | 一级大黄色片 | 热久久999|