这是最好的,Java或XML来开发Android应用 [英] Which is best, Java or Xml for developing android apps

查看:75
本文介绍了这是最好的,Java或XML来开发Android应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道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


  1. 请的XML你的看法

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

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

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

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

这篇关于这是最好的,Java或XML来开发Android应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆