Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old September 24th, 2012, 09:25 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying the List view

Hi,
I have two list view which is display data from the web service.

List 1 -- with different background
List 2 -- with different background

I have two ArrayAdapter<String> to handle the values. I have issue in the display. my xml file is structured as

<Linear Layout>
<ListView> </ListView>
<ListView> </ListView>
<Linear Layout>

its displays the two list items by dividing the screen into two equal parts and scrolls within the list individually.
I wanted the List 1 to be displayed fully and then followed by List 2 and also it should screen should be scroll not with in the list but full screen so that List 2 could be seen below.
Do help.. i tired many ways but still the results are not fine.

Thanking in advance..

SaumyaSam is offline  
Reply With Quote
Sponsors
Old September 24th, 2012, 09:49 AM   #2 (permalink)
eschew obfuscation
 
Unforgiven's Avatar
 
Join Date: Jun 2010
Location: Douglas, MA
Gender: Male
Posts: 14,541
 
Device(s): OG Droid, DroidX2, HTC Rhyme, Kindle Fire, Galaxy Nexus, Nexus 7 (8GB & 16GB)
Carrier: VZW

Thanks: 7,173
Thanked 8,131 Times in 4,639 Posts
Default

Welcome to Android Forums SaumyaSam. I moved your thread to the Application Development forum to get some better eyes on it.
__________________

If someone helped, hit Thanks, if you see rude or abusive posts, spam, or threads that need staff attention, hit Report.
Site Rules / Android Forums FAQ
*** Check out the new AF forum app!!! ***

I'm supporting BabyBlues with this. Please consider this worthy cause. Details

Unforgiven is online now  
Reply With Quote
Old September 24th, 2012, 11:37 AM   #3 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,938
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 469 Times in 290 Posts
Default

You will need to wrap your LinearLayout in a ScrollView, and then wrap that ScrollView in a LinearLayout.

Also, you will need to make sure your attrributes are corrrect.
jonbonazza is online now  
Reply With Quote
Old September 25th, 2012, 02:20 AM   #4 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Since am new to the android development please help me.

the xml file


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dha_list_layout"
androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ScrollView
android:id="@+id/dha_list_scroll"
androidrientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>

<LinearLayout
android:id="@+id/dha_listlayout"
androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>

<ListView
android:id="@+id/FListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadeScrollbars="false"
>

</ListView>

<ListView
android:id="@+id/NListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fadeScrollbars="false"
>

</ListView>
</LinearLayout>
</ScrollView>
</LinearLayout>

Am getting proper values from the webservice. I print those values in logcat.

private ArrayAdapter<String> flistAdapter ;
private ArrayAdapter<String> nlistAdapter ;

ArrayList<String> flist_name = new ArrayList<String>();
ArrayList<String> nlist_name = new ArrayList<String>();

ListView flistview,nlistview;

flistAdapter = new ArrayAdapter<String>(this, R.layout.featuredrow,flist_name);
flistview.setAdapter(flistAdapter);

nlistAdapter = new ArrayAdapter<String>(this, R.layout.normalrow,nlist_name);
nlistview.setAdapter(nlistAdapter);

I hope the code is fine. Please help me to display the items in listview.
SaumyaSam is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:22 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.