在添加@ + id/secondLayout之前,一切都顯示正常。突然,在添加它之後,桌面佈局不再顯示。 任何想法?在Android中添加LinearLayout後不會顯示TableLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/firstLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/secondLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<Chronometer
android:id="@+id/chrono"
android:textColor="#4169E1"
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Chronometer"
/>
</LinearLayout>
<TableLayout
android:id="@+id/parentLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/chrono"
>
</TableLayout>
</LinearLayout>
在此先感謝您的時間。
和什麼是天文鐘? –
@Rod_Algonquin它是一個Android小部件來顯示一個天文臺... http://developer.android.com/reference/android/widget/Chronometer.html – iversoncru
我認爲你有一個重複的ID ..確保它是獨特的.. –