I
I
IceJOKER2014-12-23 16:39:25
Android
IceJOKER, 2014-12-23 16:39:25

Android fragments - how to write an application for different screens?


I want to write an application that will show the content of the site (categories -> list of data of the selected category -> details of the selected item) the list shows the details of the selected item), and on large screens, the categories are shown first, when you click the screen is divided into two parts and the second part shows a list of the data of this category, and when you click on the item, the detailed data of the element is shown (the screen can either be divided into 3 , and preferably hide and show the category data list and details of the selected item).
Whether the screen is large I check as follows:
I create a values-large resource folder, inside the string.xml file in which bool is_large is true, and in just values/string bool is_large is false
I display data using ListFragment
Share your experience and recommendations on how best to show / hide the necessary fragments, how best to catch clicks on elements in the list (in an activity or in a fragment), for each fragment (in this case 3 fragments) create separate activities or leave one, etc.
Many thanks for the great ideas/recommendations!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2014-12-24
@mbelskiy

Why reinvent the wheel out of the blue?
developer.android.com/training/basics/supporting-d...
developer.android.com/guide/practices/screens_supp...
developer.android.com/training/multiscreen/index.html
Enjoy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question