gpt4 book ai didi

android - 以前的 fragment View 获得焦点

转载 作者:行者123 更新时间:2023-11-29 00:12:44 25 4
gpt4 key购买 nike

我有一个 Activity ,其中添加了两个 fragment 。当我点击顶部 fragment 时,前一个 fragment 的 View 获得焦点。出于其他目的,我应该将前一个 fragment 放在 backstack 中。如何清除之前 fragment 的焦点?

最佳答案

将当前布局的可点击设置为true

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

Fragment over another fragment issue

关于android - 以前的 fragment View 获得焦点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29011181/

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