我正在研究包含表格和行的android應用程序。每一行都會有三個值。問題是這些值是如此接近對方,我想增加他們之間的空間,讓每一個將其列以上,這樣的:Android增加單詞間距
,但它顯示是這樣的:
這裏是在XML文件中的表格佈局:
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="name"
android:layout_weight="1" />
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="email"
android:layout_weight="1" />
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="password"
android:layout_weight="1" />
</TableRow>
<TextView
android:id="@+id/user_info"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="get user info"/>
</TableLayout>
,這中形成在Java文件中的用戶的:
String userData = "" + Html.fromHtml(userName + userEmail + userPassword);