0
爲什麼fragment
的屬性爲class
,但是ImageView
沒有?爲什麼我們需要這個class
屬性?例如,考慮:類屬性如何用於片段和常規視圖?
<fragment class="com.expample.testfragment.Title"
android:id="@+id/title"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
/>
也:
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/Img1"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="fitXY"
/>