0

I want to use a single layout for displaying different information. Ihave a list view. When the user selects a item from the list view it should open the layout for that list item. List view contains the name and image of the entity.In the layout it should display all the other information. This single layout has to be used for displaying the information for all the entity of the list view as per the users selection.

Bst way to picturize it is the google play store. we have a list and according to our choice the same layout is used for displaying the information for all applications..

in the list view,layout the data will be fetched from internet.

pls help..

Akshay Sharma
  • 418
  • 3
  • 12
  • `I want to use a single layout for displaying different information.` ... `In the other layout it should display all the other information.` ... Isn't there a bit of **confusion**? – Phantômaxx Mar 13 '14 at 11:30
  • thanks, i will correct it..sorry for my bad english.. – Akshay Sharma Mar 13 '14 at 11:32

2 Answers2

1

You are basically looking for a master detail flow i guess ... Check THIS LINK which is exactly similar to what you want ... I think the selected answer here applies to you to your question too.

Community
  • 1
  • 1
Viral Patel
  • 32,418
  • 18
  • 82
  • 110
  • this is actually what i want but would it work when the list is generated from a fragment containing button. first category is chosen and then list is generated according to category and then acording to the list item its information is displayed in another layout. – Akshay Sharma Mar 13 '14 at 11:44
  • i think it should. trying it out and checking is always the best option rather than waiting for a full proof ready made code. If you get an error post it here and we can help further. – Viral Patel Mar 13 '14 at 11:50
  • and also the no of items in the list is not predefined. and the items have to be fetched from internet.wont think that it wud work in that case. – Akshay Sharma Mar 13 '14 at 11:51
  • BUt i will try if it cud work.. anyways thanks for the help..:) – Akshay Sharma Mar 13 '14 at 11:53
  • in that case figure out a common structure with maximum possibilities and create your layout accordingly. Hide the fields when not available. – Viral Patel Mar 13 '14 at 11:53
0

You just need to do it throught your java code i dont know what exactly you want to change so i cant provide a code but you may easly find some in this website. From a quick search i found this : Editing data in a List View item and it seems to be what you want.

Community
  • 1
  • 1
  • no thats not i want. just picture play store. we have the list of applications, we click on the desired one and we get all the information about the application which also has the download link for the application. In the same way user has a list when he clicks it he should get the information about the entity in the list. – Akshay Sharma Mar 13 '14 at 11:38