Activity还是Fragment用于SearchView?

huangapple go评论65阅读模式
英文:

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.

Main View

-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

huangapple
  • 本文由 发表于 2020年10月11日 08:10:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/64299475.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定