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

如何檢查 EditText 是否已更改?

How to check if an EditText was changed or not?(如何檢查 EditText 是否已更改?)
本文介紹了如何檢查 EditText 是否已更改?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時(shí)送ChatGPT賬號..

我需要知道 EditText 是否被更改,而不是用戶是否在字段中輸入了一些文本,而只需要知道 String 是否被更改.

I need to know if an EditText was changed or not, not whether or not the user inputted some text in the field, but only the if String was changed.

推薦答案

你需要一個(gè)TextWatcher

在這里查看它的實(shí)際效果:

See it here in action:

EditText text = (EditText) findViewById(R.id.YOUR_ID);
text.addTextChangedListener(textWatcher);


private TextWatcher textWatcher = new TextWatcher() {

  public void afterTextChanged(Editable s) {
  }

  public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  }

  public void onTextChanged(CharSequence s, int start, int before,
          int count) {

  }
}

這篇關(guān)于如何檢查 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(更改光標(biāo)在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 久久久久久久综合 | 中文字幕av久久爽av | 神马午夜久久 | 人人干人人爱 | 日韩精品久久 | 国产免费自拍视频 | 亚洲天堂一区二区三区 | 91成人精品一区在线播放 | 国产老头视频 | 色吧五月天 | 亚洲另类视频 | 日韩欧美一区在线 | wwwxxx欧美 | 日韩精品片 | 中文字幕高清在线 | 久久新视频 | 97精品国产 | 久久精品久久久久 | 插插插视频 | 天天插天天射 | 五月激情综合网 | 青青在线视频 | 成人福利在线观看 | 毛片在线免费 | 日韩精品视频在线免费观看 | 日韩一区二区视频在线观看 | 国产精品99久久久久久久久久久久 | 秋霞一区二区 | 久久精视频| 亚洲天堂一区二区三区 | 色爽| 高潮一区二区三区乱码 | 日韩香蕉视频 | 久久精品视频一区二区 | 久久综合激情 | 精品国产乱码久久久久 | 国产精品久久久久久99 | 一级大片免费看 | 成人午夜又粗又硬又大 | 成人一区在线观看 | 日韩8x8x|