0

私はサンプルのAndroidアプリケーションをダウンロードしています

次に、以下のxmliniをファイルします

<?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は何を意味し、どのような目的ですか?

4

1 に答える 1

2

これはカスタムビューです。

カスタムビューは、既存のビューを拡張するJavaクラスで定義でき、レイアウトXMLで使用できます。

Androidデベロッパーガイドの「カスタムビューの作成」セクションで、それらの詳細を読むことができます(そして独自のビューを作成する方法を学ぶことができます) 。

于 2013-02-26T16:23:50.793 に答える