tags:

views:

1023

answers:

2

I want to create the following layout

  1. Section '1' is linear layout contains imageview and textview
  2. Section '2' is listview with customze items list

I want to place both components under single verticle scrollbar, means i do not want scrollbar only for listview, currently i am achieving following layout through placing things in tableview but i want functionality like listview items..

alt text

A: 

Hi
You could make a "Section 1" to be a part of your list. Just add another type for your customized items list, add "section 1" as first element of your list , and your scrollbar will work as you desired.
I think that is the most convenient approach.
Regards!

Ramps
A: 

You can programmatically add 'Section 1' as a header view to the ListView using ListView.addHeaderView(View v). See docs here.

Example code here:

View headerView = getLayoutInflater().inflate(
     R.layout.foo_list_header, null);

mListView = (ListView) findViewById(...);
mListView.addHeaderView(headerView);

setListAdapter(...);
Roman Nurik