[英]Can I create interface for Android programmatically
I'm learning about Android development, and I read that if you want to create an interface you need to use an XML file. 我正在学习Android开发,并且读到如果要创建接口,则需要使用XML文件。
However, Android has classes in android.views
and android.widgets
. 不过,Android在班
android.views
和android.widgets
。 Can I create the same interface programmatically? 我可以通过编程方式创建相同的界面吗? I don't want to know how, only if I can.
我只想知道就不要知道。
Almost all you can do by xml you can reproduce it programmatically. 几乎您可以通过xml进行的所有操作都可以以编程方式重现。
This is the best resource you can read: 这是您可以阅读的最佳资源:
http://developer.android.com/guide/topics/ui/declaring-layout.html http://developer.android.com/guide/topics/ui/declaring-layout.html
Yes, you can do that. 是的,你可以这么做。 Just look at the documentation :)
只需看一下文档:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.