gpt4 book ai didi

java - 如何让我的微调器与我的 EditText 具有相同的宽度?

转载 作者:行者123 更新时间:2023-12-02 02:51:28 25 4
gpt4 key购买 nike

我将 EditText 宽度设置为 wrap_content

<EditText
android:id="@+id/reg_password_retype"
android:ems="10"
android:hint="@string/passwordRetype"
android:inputType="textPassword"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>

在它下面我有我的微调器,如下所示:

   <Spinner
android:id="@+id/states_options"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/send"
android:popupBackground="@android:color/transparent"/>

我来自 iOS 开发,我们有一种叫做“等宽”的东西,Android 上有没有一种方法可以让我将微调器的宽度设置为与编辑文本完全相同?

最佳答案

就像在 iOS 中设置“尾随和前导空格”一样,在 Android 中为 EditText 和 Spinner 设置相同的“布局左右边距”。或许可以解决这个问题。

关于java - 如何让我的微调器与我的 EditText 具有相同的宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43785098/

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