开发者

About layout change in SQLite

开发者 https://www.devze.com 2023-01-05 14:29 出处:网络
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.

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.

0

精彩评论

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

关注公众号