Android controls/layouts (How Instagram app does do that?)

戏子无情 提交于 2019-12-13 19:29:14

问题


I would want to know that how Instagram application listing/showing feed page?

Here is a screenshot: (I found it via Google and resized via tinypic.com. Here is the original file: http://www.digitaltrends.com/wp-content/uploads/2012/04/screenshotsjvc.jpg)

I am talking about 1st and 2nd screens.

As you know, when you go your feed (2nd screen) you can slide down and view other shares.

Every share has these:

  • Owner picture and username, shared time, a photo and a few things.

How to wrap all these datas in one control/layout in order to multiply?

Which control(s) (LinearLayout, Fragment, TableLayout and its TableRow(s)) are relevant for this kind of application?

I am not an expert Android application developer, that's why I want to know. I have confusion about that.

Thanks in advance.


回答1:


As per my understanding screen 1 and screen 2 probably different fragments (take a look about fragments here). 1st fragment contains GridView (or some similar control) and 2nd one contains ListView.

I would suggest to begin with ListView. Basically, You will need to develop layout for single item (I think single RelativeLayout might be appropriate here) and then use it as item in the adapter.



来源:https://stackoverflow.com/questions/16577529/android-controls-layouts-how-instagram-app-does-do-that

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!