Good day to all! There is an active design. The main part is a list or table. I'm leaning closer to the table option. Pictures preview in the first column, the name and date - in the second, and the number of pictures in each document - in the third. But for me, for the time being it is difficult to think of how to show 2 lines of text in one cell at once. And these 2 lines of different style. Screen design attached. I hope at least just for advice.
1 answer
listview + regular adapter. Look at this lesson and this one .
In short, one list item is also a View, which you can make it for you. At least three lines and two pictures.
- @KoVadim, yes I know what the Adapter returns. I have already worked with this and wrote my own adapters. But in this case, I need to return not one View, but the ViewGroup. So I wonder what to return. Which is better to choose? Because the calculation goes on a large number of lines on the main screen. - Lucky_spirit
- Why did you decide that ViewGroup? A large number of lines is how much? Believe me, by the links that I sent, you can do your task. - KoVadim
- I know what you can. You won’t answer my question. View means a container under one widget (for example, a picture or text). ViewGroup is a container for more widgets. That is, you can apply LinearLayout, GridView and many others. So I want to decide what to choose BETTER. To spend less memory on it. I already have a preview of the whole memory eaten. I do not want to spend on the container. - Lucky_spirit
- oneMaybe just incorrectly put the question? One line is all the same View. As I would do, I would most likely put a LinearLayout, horizontal, add a picture to it, another vertical LinearLayout with two TextViews, and at the end of the first one another TextView to display the count. Memory will not spend a lot, especially if you properly reuse strings. >> My preview and so almost all the memory eaten. so maybe the wrong side of the dig began? - KoVadim
- @KoVadim, I finally heard it. Yes, I guess I'll do it now too with the help of a pair of LinearLayouts. And about the previews do not worry. I read a lot of articles on this subject yesterday. With BitMapFactory, in principle, figured out and where the memory is heavily spent there. Especially one article with Habra helped. In my case, just a lot of pictures, so they eat. That is, it's not about optimization. - Lucky_spirit
|