Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm making huge android client application (a lot of modules and views) you can compare it to facebook app.
In small projects I was using 1-2 activities and many fullscreen fragments.
But in this project it's fundametal to decide when use activity and when fragments.
Atm i have 2 activities
-LoginActivity(Launcher)
-MainActivity- it contains toolbar and one main layout where I replace all fragments.
Am I doing right ?
It's really depends on your logic. However, you can devide your view into categories (each category is an activity) while fragment can be as sub category... :)
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am new to Android development and I was wondering if is it possible to make this kind of layout?
Yes.
The view is tabs, and to create it you use a combination of two views, fragments and an adapter
Views:
TabLayout
ViewPager
Read about fragment adapter and tabs
Here's a good tutorial
https://www.androidhive.info/2015/09/android-material-design-working-with-tabs/
If you're looking for an easy solution you can you the library I created it offer multiple customization options and it's really easy to use
https://github.com/gilgoldzweig/EasyTabs
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
i want to make a Class Diagram from my Android app but I've never worked with UML in android so i have some stupid question.
Should I include all activities and classes or only class like DB_manage, preferences, etc. ?
Thanks in advance.
Activity,Fragnment, etc, it is just a system ui containers not related to your logic. You should include entities such as MVP (MVVM) interfaces, implemented by activity, fragment because it show your logic and when UI is supposed to do. Placing everything in activity is a bad practice)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Why we call android activity visual representation of android app when it also does background tasks which have nothing to do with visual representation.
A lot of programmers consider it a bad programming style to write code for background tasks into an Activity class. When aiming towards a clean architecture one would ideally only find representational code in activities. Thus, updating the views that make up the activity. As your question implies, background tasks are better found in separate classes that make up the business logic layer of an Android app.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
There is a drawer menu in my app and have four click item in drawer,now,i want to know which way is better:
There are four fragment in a activity,when a click item clicked,just need to change fragment.
There are two fragment in a activity,and hava another two activity.
Could you please tell me which one is better and why?
My suggestion as per your requirement fragment is best.
Well fragments are better in the case of a navigationDrawer because they will help building a dynamic UI, but it doesn't mean you are restricted to fragments only. You can have an activity with a navigationDrawer and multiple fragments in it, and for example another activity for the login or for a chat. It really depends on what you want to do.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am aware of the different methods for switching back and forth between android screens. I was wondering wich method, if any, is the best practice for doing so. Switching activites seems to be the most popular, but how processor friendly is it?
EDIT:
This question seems too objective, so I guess I will modify it by asking if anyone knows what method is most processor friendly.
Yes, apps are typically separated by multiple activities. These days, the activities contain fragments to better support multiple devices, layouts, etc. They are popular for a reason!
It's all very friendly. ;)