Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get JSON Array's key,value dynamically and bind to Listview without generating Custom Layout

Posted on 2012-04-07
1
Medium Priority
?
1,131 Views
Last Modified: 2012-04-24
Hello,
I want to bind Json array directly to the Listview.but my field name will be change everytime. so i can't specify the field name hardcoded.and number of fields also varies.so how can i define Simple adapter as my view is not fix.
i.e. some time 2 textview,some time 3 textview

pls guide.

thanks & regards
0
Comment
Question by:citadelind
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 2000 total points
ID: 37821115
even with simple adapter, you pass it an xml layout for the row.
SimpleAdapter's ctor takes few parameters that you can actually provide externally as parameters. Besides, you could consider SimpleAdapter.ViewBinder.

if you explain what you have in mind in more details, perhaps it'll be easier to come up with better solution.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question