Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个列表视图,其中每个列表项都有一个图像和 4 个文本视图。我只想更改 2 个文本视图而不更改项目列表和列表。这些文本视图每秒都会更改。在安卓中可以吗?
您可以像这样更新 listView 的文本项:
private void updateText(int index){ View v = ListView.getChildAt(index); TextView updatedText = (TextView) v.findViewById(R.id.txt_view); updatedText .setText("changed Text"); }