这是最好的,Java或XML来开发Android应用这是、最好的、Java、XML

2023-09-08 09:17:37 作者:我是贱人爱过烂人@

我知道Java核心,我想开发Android应用,在一些网站,我看到在应用程序中的XML几个Java.Which是最好的,易于使用的Java或XML?

I have know core java, I want to develop android apps, in few sites I saw apps in XML in few Java.Which is best and easy to use Java or XML?

推荐答案

我假设你正在谈论的UI,而不是完整的应用程序:

I'm assuming you are talking about the UI, not the complete app:

有关的一切静态我使用XML,因为它很容易在你的项目的结构发现。

For everything statically I use XML, because it is easy to find in the structure of your project.

要动态创建和你没有其他选择,然后使用code某些部分。很聪明,在此,因此,如果您需要添加一些意见指出,看起来是一样的做到这一点。

Some parts you want to create dynamically and you have no other choice then to use Code. Be smart, in this, so if you have to add several Views that look the same do this

请的XML你的看法在在其中添加多个视图循环,膨胀这个XML,设置你的ID等,并将其添加

您可以拥有所有的基础知识,样式等你的XML,并且仍然动态添加的东西。

You can have all the basics, styles etc in your XML, and still add stuff dynamically.

也许你想检查出一些的hello world code的?

 
精彩推荐
图片推荐