Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Listview - Header , footer issue
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jovish P  
View profile  
 More options Oct 9 2012, 3:15 am
From: Jovish P <android.f...@gmail.com>
Date: Tue, 9 Oct 2012 12:43:54 +0530
Local: Tues, Oct 9 2012 3:13 am
Subject: Listview - Header , footer issue

In one of screen  we want to come up with a desing like this

Textview
Listview
Textview
Listview

First we thought of putting everything inside a linear layout with vertical
orientation and put that layout inside
a scroll view. Then we come to know that it is not a good idea. So right
now what we are trying to do is
add header and footer for listview. Header view will be a text view and
footer view will be a layout which conatins
a texview and listview. The problem what we are facing now is ,  we are not
able to scroll the second listview which is in
footerview layout. Is it a good solution ? If not wht is the best way to do
this ? Share your thoughts about this.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Piren  
View profile  
 More options Oct 9 2012, 5:55 am
From: Piren <gpi...@gmail.com>
Date: Tue, 9 Oct 2012 02:55:21 -0700 (PDT)
Local: Tues, Oct 9 2012 5:55 am
Subject: Re: Listview - Header , footer issue

Android doesn't support putting two scrollable views one inside the other
and i assume you dont want to divide the screen area between the listviews
and make each take a constant size.

You're best (and probably only) choice is to just do everything manually.
put a linear layout inside a scrollview and inflate everything in it
manually. (the two textviews and the two listviews).
you can actually use the same code you wrote for your listviews to do that
with some modifications.
It sounds like a lot of effort, but after doing it a few times i've noticed
that it isnt. in some instances it even makes stuff easier.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jovish P  
View profile  
 More options Oct 10 2012, 1:25 am
From: Jovish P <android.f...@gmail.com>
Date: Wed, 10 Oct 2012 10:53:13 +0530
Local: Wed, Oct 10 2012 1:23 am
Subject: Re: [android-developers] Re: Listview - Header , footer issue

Sorry , we are not able to understand you fully. Wht is the difference
between the first approach we explained in the mail and the approach u
suggested .  Up to our knowledge both are same . Wht difference it is going
to make if u inflate every view programmatically instead of using xml ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Piren  
View profile  
 More options Oct 10 2012, 8:56 am
From: Piren <gpi...@gmail.com>
Date: Wed, 10 Oct 2012 05:56:41 -0700 (PDT)
Local: Wed, Oct 10 2012 8:56 am
Subject: Re: [android-developers] Re: Listview - Header , footer issue

Maybe i delivered what i meant wrong...
You can still inflate rows predefined using XML, but your the way to create
the specific inner layout would have to be created manually.

you want to do something like this:
<scrollview>
   <linearlayout>
      <textview/>
      <listview/>
      <textview/>
      <listview/>
   </linearlayout>
</scrollview>

You can't do that in android (well, you can, it just wouldn't work as you
expect it to).

The best option is to just do:
<scrollview>
   <linearlayout/>
</scrollview>

and then "inflate" all the information inside that linear layout.
Practically making your entire page one ListView (a listview is exactly
that.. a linear layout inside a scrollview with some fancy wrapper code to
make your life easier)

Your "adapter" would just have to know how to inflate the "rows"
differently according to their type.
i.e - the first row is just a regular textview (the header).
the second to X row would be rows of the first "listview" you wanted.
X+1 row is again a textview (the footer) and then X+2 to the end are rows
of the second listview type.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jovish P  
View profile  
 More options Oct 11 2012, 4:58 am
From: Jovish P <android.f...@gmail.com>
Date: Thu, 11 Oct 2012 14:26:54 +0530
Local: Thurs, Oct 11 2012 4:56 am
Subject: Re: [android-developers] Re: Listview - Header , footer issue

Thanks for the clarification. Wil give a try this.

Regards,
Jovish


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »