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

如何從 Android 中的 EditText 字段中刪除下劃線?

How to remove the underline from the EditText field in Android?(如何從 Android 中的 EditText 字段中刪除下劃線?)
本文介紹了如何從 Android 中的 EditText 字段中刪除下劃線?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

每當在 EditText 框中鍵入一個單詞時,我總是會在正在鍵入的單詞下方看到一個下劃線.但是當我在那個詞后面按一個空格時,我不再看到下劃線.

Whenever a word is typed in the EditText box, I always see an underline under the word being typed. But when I press a space after that word I no longer see the underline.

我的要求是在用戶鍵入消息時刪除該下劃線.

My reqirement is to remove that underline when the user is typing the message.

添加了屏幕截圖,我們看到 Smith 帶有下劃線.但我不希望這種情況發(fā)生.

Added is the screenshot and we see that Smith is underlined. But I don't want this to happen.

下面是我用于警報對話框的 xml.

Below is the xml that I use for the AlertDialog box.

<?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:orientation="vertical">

<TextView 
    android:id="@+id/name_view"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_marginLeft="20dip"
    android:layout_marginRight="20dip"
    android:text="@string/alert_dialog_name"
    android:gravity="left"
    android:textAppearance="?android:attr/textAppearanceMedium" />

<EditText
    android:id="@+id/username_edit"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:layout_marginLeft="20dip"
    android:layout_marginRight="20dip"
    android:scrollHorizontally="true"
    android:autoText="false"
    android:inputType="textPersonName"
    android:capitalize="none"
    android:gravity="fill_horizontal"
    android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>

推薦答案

您不必使用任何邏輯來刪除下劃線——當您想使用該值時,只需調(diào)用 getText().toString() 即可.它不會包含特殊格式或任何內(nèi)容.

You don't have to use any logic to remove the underlines -- just call getText().toString() when you want to use the value. It won't include special formatting or anything.

這篇關于如何從 Android 中的 EditText 字段中刪除下劃線?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關文檔推薦

Cut, copy, paste in android(在android中剪切、復制、粘貼)
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(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 在线观看国产视频 | 国产精品一区久久久 | 一区日韩 | 国产一区二区精品在线观看 | 最新黄色在线观看 | 亚洲狠狠爱 | 国产精品中文在线 | 美女久久 | 国产天堂 | 午夜久久久 | 亚洲国产精品久久久久婷婷老年 | 国产91一区 | 亚洲成人精品在线 | 99色综合| 国产又爽又黄的视频 | www亚洲精品 | 国产免费又色又爽又黄在线观看 | 国产精品中文字幕在线 | 免费av毛片 | 欧美亚洲高清 | 国产精品不卡一区 | 久久久久国产精品人 | 另类a v| 国产精品视频一区二区三区不卡 | 国产在线播放一区二区三区 | 国产精品日韩欧美一区二区三区 | 风间由美一区二区三区在线观看 | 国产精品99久久久久久宅男 | 国产91亚洲精品一区二区三区 | 一区二区三区四区视频 | 精品成人av | 亚洲视频免费观看 | caoporn地址| 91精品麻豆日日躁夜夜躁 | 欧美日韩国产在线观看 | 午夜影院在线观看视频 | 亚洲综合三区 | 欧美影院| 久久久国产精品入口麻豆 | 午夜男人天堂 | 黄色一级片视频 |