简体   繁体   English

如何以编程方式将自定义视图添加到布局 Android Studio

[英]How do I add a custom view to a layout programatically Android Studio

I want to implement a custom view into a LinearLayout that's inside of a ScrollLayout , but I don't know how many views I'll implement into the LinearLayout .我想在ScrollLayout内的LinearLayout中实现一个自定义视图,但我不知道要在LinearLayout中实现多少个视图。 What I want is like a scrolling box of interactive cards.我想要的就像一个滚动的交互式卡片框。 How can I do this?我怎样才能做到这一点?

What I want is like a scrolling box of interactive cards.我想要的就像一个滚动的交互式卡片框。

Use RecyclerView instead of LinearLayout .使用RecyclerView而不是LinearLayout

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM