edit2Textbox不会消失
我有一个奇怪的问题。 我有一个 test.xml 文件,它包含 2 个编辑文本框(edit1 和 edit2)。 我从 test.xml 中完全删除了 edit2text 框,但当我运行程序时它仍然出现?
我已经从手机中删除了该应用程序并重新启动了 eclipse 和手机,但似乎没有任何帮助。 它不断回来。
FY:我在没有模拟器的情况下运行 eclipse,我不知道这是否与此有关。
有人知道 edit2 如何消失吗?
我的代码,调用 test.xml
@Override
protected void onPostExecute(String result) {
// create the grid item mapping
ListView kp = (ListView)findViewById(R.id.kpn);
String[] from = new String[] {"col_1"};
int[] to = new int[] { R.id.editText1 }; <<< should only be 1 edittext
List<HashMap<String, String>> fillMaps = new ArrayList<HashMap<String, String>>();
HashMap<String, String> map;
Document doc = Jsoup.parse(kpn);
Elements tdsFromSecondColumn = doc.select("td");
for (Element tdFromSecondColumn : tdsFromSecondColumn) {
map = new HashMap<String, String>();
map.put("col_1", tdFromSecondColumn.text());
fillMaps.add(map);
System.out.println("Hashmap: " + map);
}
SimpleAdapter adapter = new SimpleAdapter(AndroidLogin.this, fillMaps, R.layout.test, from, to);
kp.setAdapter(adapter);
编辑:通过删除 test.xml 中 edit1text 框中的这段代码来解决,我不知道这与 edit2 框有什么关系,但是好的,它做到了:
android:editable="false"
android:enabled="true"
android:inputType="textMultiLine"
I have a weird problem.
I have a test.xml file, it included 2 edittext boxes (edit1 and edit2).
I removed the edit2text box completly from the test.xml but it keeps apparing when i run my program?
I already deleted the app from the phone and restarted eclipse and phone but nothing seems to help.
It keeps coming back.
FY: Im running eclipse without a emulator, i don
t know if this has something to do with it.
Does somebody know how the edit2 goes away?
My code, which calls the test.xml
@Override
protected void onPostExecute(String result) {
// create the grid item mapping
ListView kp = (ListView)findViewById(R.id.kpn);
String[] from = new String[] {"col_1"};
int[] to = new int[] { R.id.editText1 }; <<< should only be 1 edittext
List<HashMap<String, String>> fillMaps = new ArrayList<HashMap<String, String>>();
HashMap<String, String> map;
Document doc = Jsoup.parse(kpn);
Elements tdsFromSecondColumn = doc.select("td");
for (Element tdFromSecondColumn : tdsFromSecondColumn) {
map = new HashMap<String, String>();
map.put("col_1", tdFromSecondColumn.text());
fillMaps.add(map);
System.out.println("Hashmap: " + map);
}
SimpleAdapter adapter = new SimpleAdapter(AndroidLogin.this, fillMaps, R.layout.test, from, to);
kp.setAdapter(adapter);
Edit: Solved by removing this code in the edit1text box in test.xml, i don`t know what this has to do with the edit2 box but ok, it did the trick:
android:editable="false"
android:enabled="true"
android:inputType="textMultiLine"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
清理项目 :-) 你似乎有旧的 XML 文件
Clean the project :-) you seem to have old XML files