About layout change in SQLite
When I click the ListView in layout1, it will go to layout2 and show some imformation.
But when I click the button I designed to back to layout1, I can't see the ListView.
Just 开发者_运维问答black background.
Here is the Button code:
Button backButton = (Button) findViewById(R.id.widget39);
backButton.setOnClickListener(new Button.OnClickListener()
{
public void onClick(android.view.View v) {
setContentView(R.layout.layout1);
myListView = (ListView) findViewById(R.id.ListView);
myCursor = ToDoDB.select();
}
});
You are not putting any data in your ListView. Hence, the ListView will be empty.
加载中,请稍侯......
精彩评论