Android, how to populate a CharSequence array dynamically (not initializing?)

后端 未结 6 1582
旧时难觅i
旧时难觅i 2021-01-07 18:19

How do I change something like this:

CharSequence cs[] = { \"foo\", \"bar\" };

to:

CharSequence cs[];

cs.add(\"foo\"); //          


        
6条回答
  •  广开言路
    2021-01-07 19:08

    If you want it to be dynamical, you should think in an another structure and then convert it to a CharSequence when you need. Alternatively, that thread can be useful.

提交回复
热议问题