Restoring view hierarchy from saved state does not restore views added programmatically

后端 未结 3 545
悲&欢浪女
悲&欢浪女 2020-12-06 10:42

I am attempting to save and restore a view hierarchy consisting of a table of buttons. The number of table rows and buttons required in the table is not known until runtime

3条回答
  •  失恋的感觉
    2020-12-06 11:37

    If it works with Views with an ID, why not give each button an ID in the table when you are creating them? See if that works.

    How can I assign an ID to a view programmatically?

提交回复
热议问题