Hi phyll,
Thanks for your reply.
What exactly i did is
The code i used to get response from my server and adding it into a list is
Using java Syntax Highlighting
public static List<String> list = new ArrayList<String>();
public void onCreate(Bundle savedInstanceState) {
..........
..........
ok.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
String response = CustomHttpClient.executeHttpGet("MY_SERVER_URL_HERE");
response = response.replace("(", "").replace(");","");
JSONObject obj = new JSONObject(response);
JSONArray array = obj.getJSONArray("items");
for(int i = 0 ; i < array.length() ; i++){
list2.add(edit1);
list.add("##"+i+"--"+array.getJSONObject(i).getString("No_")+"__ "+array.getJSONObject(i).getString("Description")
);
Parsed in 0.034 seconds, using
GeSHi 1.0.8.4
So now my list having the array of strings.
next, to display the list in emulator following code i used
Using java Syntax Highlighting
Intent i = new Intent(getApplicationContext(), ListViewActivity.class);
startActivity(i);
Parsed in 0.030 seconds, using
GeSHi 1.0.8.4
in ListViewActivity i created an adapter and printed the list as follows
Using java Syntax Highlighting
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, list));
ListView lv = getListView();
lv.setTextFilterEnabled(true);
Parsed in 0.034 seconds, using
GeSHi 1.0.8.4
Here, list_item.xml file having a text view in it.
Up to now am able to display the text in a list view perfectly.
What my present requirement is..
under every list element(i.e we can assume as first element's next line, second element's next line.....) i want to create a text and right to that a edittext box.
Here i tried to add a xml layout having text view and a edit text. But did not get the out put.
If you have any idea, please share it.
Thanks
shailaja