0

I am working on an android app and I have to Implement the below screen. That screen has two buttons at the top just like we have in tab view, on changing the button 1 is for opening the Picture view and other is to view the videos screen. Below that buttons I have to Implement two listviews for video screen that will each contain one header like one for songs (below that will be a listview of songs) and second header is for films (below that will be a listview of films). And the data for both songs and films is coming from two different services, just like for songs http://mywebsite.com/songs and for films http://mywebsite.com/films. Now I am little bit confused about the UI that there are many alternatives to implement it, but not sure which one will be best for me.

Please give me some ideas about how to implement it. Should I use a Radio group for the above buttons and on State change it should call the respective method, for a view of video and picture. But for each view I will have to make two listviews , just like in the video screen one for songs and other for films. And making two listviews is little bit complex than a single listview. Is there any way to handle it by only one adapter and in that view the same headers should be there. Ad if someone has any good idea then please share it. Any help will be highly appreciated.

enter image description here

asked Apr 20, 2014 at 18:34

2 Answers 2

1

You should consider to use fragments for your tab functionslity.

An alternative for two list views could be one expendablelistview. With two groups. You can add multiple types of items to any list view. You just have to overwrite the getitemtype Methode and define the different types you want to display in your listview.

answered Apr 20, 2014 at 19:01
Sign up to request clarification or add additional context in comments.

3 Comments

as you said "You can add multiple types oft items to any list view. You just have to overwrite the getitemtype Methode and define the different types you want to display in your listview". Can you please give me some link to an example or code?
and using expandable listview there will be problems of empty space between groups. b.coz it also effects the childs when you do a background color as in my case.
Here is a good tutorial about listviews in general which also covers expendablelistviews: vogella.com/tutorials/AndroidListView/article.html You should be able to style the group spacing to no spacing by using a custom listview style
0

1) hey bro, firstly u hv to create a swap view with a navigation tab functionality on it. check out this link http://developer.android.com/training/implementing-navigation/lateral.html

2) the above example will provide you 2 fragment pages that you can use for picture and videos separately. You can create the layout of every page as you like via using separate fragment with their own layout as you wish.

3) Now in video layout fragment, you can use 2 list views one by one in the linear layout with orientation vertical. Check this link to get idea how to implement your custom list view. http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/

4) You have to put the value of Android:weightSum="2" in parent layout( linear layout with orientation vertical) and put Android:layout_height="0dp" & Android:layout_weight="1" in each list view. This will provide equal space for both the list view in single screen for each type of device.

answered Feb 2, 2015 at 9:22

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.