我是 Android 应用程序开发的新手。
android:layout_someproperty
我想知道指定和之间有什么区别android:someproperty
。例如android:layout_height
和android:height
。
My Eclipse on hover 提供以下信息
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
标签中设置。android:height
在LinerLayout
标签中设置。android:height
在TextView
标签中设置。
据我的理解,LinearLayout
将是TextView
(如果我错了,请纠正我)的父母。