简体   繁体   English

替换ListView项目,每按一个按钮

[英]Replace ListView Item each press a Button

I want to create a listview which can accommodate different types of data, each data type is displayed when I press a button of some kind of button that I provide. 我想创建一个可以容纳不同类型数据的列表视图,当我按下提供的某种按钮时,每种数据类型都会显示出来。 How to change the data displayed when I press a different button?? 当我按下其他按钮时,如何更改显示的数据? Anyone who knows,please tell me how to do it... Thanks 知道的人,请告诉我该怎么做...谢谢

You should look at "Shared Preference", where you can have list of different type of datas and letting user to pick one. 您应该查看“共享首选项”,在其中可以找到不同类型的数据的列表,并让用户选择其中一个。

Take a look at here 看看这里

You can have Shared Preference in the setting. 您可以在设置中拥有“共享首选项”。 It will look better than having button to change the data. 看起来比用按钮更改数据要好。

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM