【发布时间】:2015-12-23 12:25:21
【问题描述】:
我有一个基本的 LinearLayout,里面有一个 TableLayout 和 ImageView,我想把表格放在顶部,然后把图片放在底部中心,我该如何解决这个问题? 周四,我将所有行添加到 TableLayout 中的 java 代码,所以希望在代码中看到。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="match_parent"
app:showAsAction="ifRoom">
<TableLayout
android:id="@+id/Table"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1"
android:shrinkColumns="0">
</TableLayout>
<!--<LinearLayout-->
<!--android:layout_gravity="bottom"-->
<!--android:id="@+id/secLayout"-->
<!--android:orientation="vertical"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content">-->
<ImageView
android:id="@+id/pic1"
android:src="@mipmap/pic1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</ImageView>
<!--</LinearLayout>-->
有什么想法吗?
【问题讨论】:
标签: android layout imageview tablelayout