gpt4 book ai didi

android - CheckBox 被夹在平板电脑中

转载 作者:行者123 更新时间:2023-11-29 00:42:43 24 4
gpt4 key购买 nike

我有这样的布局:

<LinearLayout 
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center_vertical"
android:layout_marginLeft="10dp">

<CheckBox
android:id="@+id/screen_login_checkbox"
android:button="@drawable/login_screen_checkbox_image_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<TextView
android:layout_width="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/screen_login_checkboxLabel"
android:layout_alignBaseline="@id/screen_login_checkbox"
android:textColor="@color/black"
android:textSize="@dimen/screen_login_check_text"
android:layout_height="wrap_content"/>
</LinearLayout>

问题是这在智能手机上有效,但在平板电脑上无法正常工作。在平板电脑上,CheckBox 在右侧被夹住,我不知道为什么。

有人知道如何解决这个问题吗?

最佳答案

尝试将 android:paddingRight 添加到您的 CheckBox。如果您使用 dp 而不是 px 作为填充值来添加填充

,它应该也适用于表格和小屏幕

关于android - CheckBox 被夹在平板电脑中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8416836/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com