gpt4 book ai didi

Android - 如何用叠加 View 屏蔽 EditView

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

我正在尝试用另一个 View 覆盖 EditText。我的布局似乎有效,但 EditText 仍可点击。我错过了什么?

这是我的基本布局:

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">

<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/editText"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:inputType="text"/>

<LinearLayout
android:orientation="vertical"
android:background="#00aa00"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true">
</LinearLayout>

这是模拟器 View :

enter image description here

更新:我正在为 LinearLayout 设置动画以显示或隐藏 EditText

最佳答案

只需将 android:clickable="true" 放入 LinearLayout

关于Android - 如何用叠加 View 屏蔽 EditView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16940597/

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