1
我在ScrollView中嵌入了一個TableLayout,因此它可以滾動。它是建立像這樣(沒有什麼特別的地方):如果可滾動的TableLayout是空的,則顯示一條消息
<ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/rejectDataTypeButton"
android:layout_above="@id/datalist_nextButton" >
<TableLayout android:id="@+id/dataListTable"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1" />
</ScrollView>
我如何使它顯示一條消息,如果是空的,類似的方式ListActivity不是嗎?這是甚至可能的,因爲TableLayout沒有像ListView
那樣的.setEmptyView(View)
方法?