Buttons in TableLayout cropped on Android 1.6 and 2.1 (but not on 1.5 or 2.2)

喜夏-厌秋 提交于 2019-12-01 12:35:38

I also ran into the same problem on 1.6 and 2.1 but not on 1.5 nor 2.2.

I use LineraLayout and set its weight instead and skip the problem using TableLayout.

<LinearLayout
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <LinearLayout android:layout_width="fill_parent"
        android:layout_weight="1" android:layout_height="wrap_content"
        android:gravity="center">
        <ImageButton
            android:layout_width="wrap_content" android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout android:layout_width="fill_parent"
        android:layout_weight="1" android:layout_height="wrap_content"
        android:gravity="center">
        <ImageButton
            android:layout_width="wrap_content" android:layout_height="wrap_content" />
    </LinearLayout>
    <LinearLayout android:layout_width="fill_parent"
        android:layout_weight="1" android:layout_height="wrap_content"
        android:gravity="center">
        <ImageButton
            android:layout_width="wrap_content" android:layout_height="wrap_content" />
    </LinearLayout>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!