之間的區別我是Android應用程序開發的新手。android:layout_property和android:屬性
我想知道是什麼規定android:layout_someproperty
和android:someproperty
之間的差異。例如android:layout_height
和android:height
。
我的Eclipse上懸停提供以下信息
android:layout_height : Specifies the basic height of the view.[dimension.enum]
android:height : Makes the TextView exactly this many pixel tall[dimention]
但我不明白這一點。我的代碼是一樣的東西
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/mainscreen_background"
android:layout_gravity="center"
android:padding="30dip"
android:orientation="vertical"
tools:context=".TicTacToe" >
<TextView
android:text="@string/game_title"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_marginBottom="25dip"
android:layout_gravity="center"
android:textSize="24.5sp"/>
</LinearLayout>
情理之中的事情,並沒有各有什麼影響?
- 設置
android:layout_height
在LinerLayout
標記。 - 設置
android:layout_height
在TextView
標記。 - 在
LinerLayout
標籤設置android:height
。 - 在
TextView
標籤設置android:height
。
至於我的理解去LinearLayout
將是TextView
(糾正我,如果我錯了)的母公司。