开发者

Android Update Layout Content

开发者 https://www.devze.com 2022-12-24 18:35 出处:网络
I\'m looking for a way to update a layout\'s content with a new view. Is there any way to easily do this. It would be similar to how t开发者_如何学Pythonabs work, but I don\'t want to have to get into

I'm looking for a way to update a layout's content with a new view. Is there any way to easily do this. It would be similar to how t开发者_如何学Pythonabs work, but I don't want to have to get into extending the current tab structure if I don't have to.

The final result would be a few buttons that would switch the content in a specific linearlayout for each button.

Any help?


Have a look at ViewSwitcher. This is designed to help with the kind of things you are suggesting.

If you want the contents in entirely different layout files, you can use a LayoutInflater and add the inflated view to the parent view.

0

精彩评论

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

关注公众号