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.
我需要在 ViewAnimator 的视图开头添加一个视图。我怎样才能做到这一点?ViewAnimator.addView(view) 将视图添加到列表的末尾。但我需要在开头添加它。谢谢!
ViewAnimator 有一个额外的方法来添加视图。您可以在索引 0 处添加视图。
addView(View child, int index, ViewGroup.LayoutParams params) Adds a child view with the specified layout parameters.