开发者

Why doesn't my Android activity refresh/redraw?

RoomInfoActivity.java: http://pastebin.com/L9fFsFeH (note: this is the 3rd activity launched by the same application, not that it should matter..)

AndroidManifest.xml: http://pastebin.com/QbvQaTf3

room_info.xml: http://pastebin.com/DFNABSNF

Image: http://dl.dropbox.com/u/16952797/temp_stuff/elfapp_ss04.PNG (note: when I click on the button, "nothing" happens.)

Description: So what happens is the code compi开发者_开发问答les just fine, and the .apk is launched and run without any issues, but the RoomInfoActivity doesn't reflect the changes that are supposed to be made (such as changing the text of the TextViews and Button) when I click on the button. I'm looking for the least complicated way to do these.

EDIT: I have now made a change, I added this line buttonCleaned.setClickable(true); under this:

rumInfo.setText(getIntent().getExtras().getString("entry"));
buttonCleaned.setText("Färdig med städningen");
rumStatus.setText("Status: "+checkStatus());


Is your onClick() method ever called? I think you need to set the Activity as a click listener on the button, using the setOnClickListener method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜