gpt4 book ai didi

Android: TextView 数组

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:19:36 24 4
gpt4 key购买 nike

我正在制作一个应用程序,我想在其中更改字符串数组中 TextView 的文本。为此,我需要制作 TextView 数组。该怎么做??谁能帮我解决这个问题

最佳答案

您可以像这样创建 TextView:

int textViewCount = 10;

TextView[] textViewArray = new TextView[textViewCount];

for(int i = 0; i < textViewCount; i++) {
textViewArray[i] = new TextView(this);
}

关于Android: TextView 数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7694824/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com