【问题标题】:i need to get the data here and the method [ getText() ] not working with me in android studio我需要在这里获取数据,并且方法 [getText()] 在 android studio 中无法与我一起使用
【发布时间】:2021-11-18 18:59:15
【问题描述】:

FacilityN = (EditText) findViewById(R.id.FacilityName);

String FacilityName = FacilityN.getEditableText().getText().toString();

【问题讨论】:

  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。

标签: java android-studio


【解决方案1】:

不使用 getEditableText 方法,只需使用 getText().toString()。这样做会首先返回 EditText 正在显示的 TextView,然后是文本的 String

【讨论】:

    猜你喜欢
    • 2022-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-23
    • 2018-12-09
    • 1970-01-01
    • 2021-04-23
    • 2021-10-01
    相关资源
    最近更新 更多