gpt4 book ai didi

java - 如何在我的 Activity 中实现 "do not show again"功能?

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

Basically i have a splash screen followed by a getting started activity with a button at the bottom and a checkbox to not show again said activity. How can i implement it so that it does what i intend it to do? I am a self taught new developer. I don't need the answer to be straight forward, just point me in the right direction.

<CheckBox
android:id="@+id/do_not_show_again"
android:layout_width="249dp"
android:layout_height="21dp"
android:layout_marginTop="12dp"
android:text="@string/do_not_show_again"
android:textAlignment="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.513"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/get_started_button" />

</androidx.constraintlayout.widget.ConstraintLayout>

最佳答案

不要使用 Splash Activity 。延迟用户 3 或 4 秒是没有用的。相反,使用完整 View fragment ,这将有助于加载主 Activity 的 UI 元素。将 boolean 值存储在共享首选项中以永久消失 fragment 。

关于java - 如何在我的 Activity 中实现 "do not show again"功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58085712/

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