2013-02-26 60 views
0

我是下载例如Android应用程序问关于Android XML

那么XML文件的INI下面

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="horizontal" > 

    <net.example.view 
     android:id="@+id/view" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_weight="10" /> 

    <TextView 
     android:id="@+id/text" 
     android:layout_width="fill_parent" 
     android:layout_height="346dp" 
     android:layout_weight="79.81" 
     android:gravity="center_horizontal|center_vertical" 
     android:text="" 
     android:textSize="16pt" /> 

</LinearLayout> 

我想请教一下这个XML

<net.example.view 
     android:id="@+id/view" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_weight="10" /> 

什么XML高于平均和目的是什么?

回答

2

这是一个自定义视图。

自定义视图可以在扩展现有视图的Java类中定义,然后可以在布局XML中使用。

您可以在Android Developers指南的Creating Custom Views部分阅读更多关于它们(并学习如何创建自己的内容)。