如何清除 TextView 的值? [英] How I can clear the value of TextView?

查看:34
本文介绍了如何清除 TextView 的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TextView 的值是通过选择 List (ArrayList) 上的 Item 来插入的.当我再次关闭并打开应用程序时,TextView 中的值仍然存在.有什么办法可以清除TextView的值?

The value of the TextView is inserted by selecting the Item on List (ArrayList). When I close and open the app again the value in the TextView is still there. There is some way to clear the value of TextView?

推荐答案

TextView myTextView = (TextView) findViewById(R.id.myTextView);
myTextView.setText("");

这篇关于如何清除 TextView 的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆