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

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

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

問題描述

限時送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.

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

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 玖玖国产 | 日韩福利片| 国产大片一区 | 91视频国产一区 | 国产精品精品视频一区二区三区 | 亚洲人成人一区二区在线观看 | 欧美日韩国产一区二区三区不卡 | 国产成人福利 | 亚洲精品久久久一区二区三区 | 亚洲欧美激情国产综合久久久 | 亚洲精品一区二 | 免费 视频 1级 | 美女拍拍拍网站 | 日韩精品免费看 | 国产高清一区二区三区 | 精品久久久999 | 国产精品福利网站 | 日韩精品一区二区三区免费视频 | 久久在线看 | 一区二区三区四区国产 | 99re6在线视频精品免费 | 男女网站免费观看 | 久久久综合精品 | 日本不卡一区二区三区 | 欧美中文字幕在线观看 | 亚洲三区在线观看 | 亚洲一页 | 激情欧美日韩一区二区 | 亚洲综合三区 | 国产精品日日夜夜 | 日韩高清国产一区在线 | 1204国产成人精品视频 | 老牛影视av一区二区在线观看 | 天天综合干 | 中文在线视频 | 亚洲精品在线视频 | 欧美视频第三页 | 国产精品亚洲欧美日韩一区在线 | 精品国产乱码一区二区三区 | 久精品久久 | 91成人|