英文:
Activity or Fragment for a SearchView?
问题
我正在进行我的最终学位项目,我选择使用Firebase Firestore开发一个Android应用程序,这个想法很酷,因为我正在学习如何在Android上编程,但是使用的是Java。
因此,我已经开发了启动屏幕(SplashScreen)、登录表单(Login form)、注册表单(SignIn form)并且能够成功地与Firebase连接,但是现在我遇到了一个关于主活动(Main Activity)的问题,这是用户会看到最多的活动。
- 想法是设置一个用于搜索的框,但是一旦用户点击它,右侧应该出现视图。主要问题是它应该是一个Fragment还是一个新的Activity呢?
提前感谢。
英文:
I´m doing my final degree project and I have chose to develop and Android app using Firebase Firestore, the idea it´s cool because I´m learning how to program on Android, but on Java.
So, I have develop the SplashScreen, Login form, SignIn form and able to connect succesfully with Firebase but right now I´m having a problem about thinking the main activity, which is the one that the user will see the most.
-The idea is to set a box for search, but once the user click on it, should appear the view on the right. The main question is if it should be a Fragment or a new Activity?
Thanks in advance.
答案1
得分: 0
很好地使用DialogFragment。
https://developer.android.com/reference/android/app/DialogFragment
英文:
It's good to use DialogFragment.
https://developer.android.com/reference/android/app/DialogFragment
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论