setting max height of listview with initial height is wrap content(it may be empty)

by jalandar » Tue, 13 Jan 2009 20:50:32 GMT

Sponsored Links
 Hello everybody I want set initial height of list view with wrap
content, and later it will be expanded as per data added to specific
limit of height. I used wrap_content for height and android:maxHeight
="100px", but it is not working properly the list grows in height
beyond the maxHeight as the list item added.
Is there any other solution.

Other Threads

1. I want to know to get browse history on android ?

 I mean, I want to pull out web histroy from content provider  for my

I have some coding. But I got exception .

So, how can I do ?please help me.
Here are my coding

import android.database.Cursor;
import android.os.Bundle;
import android.widget.ListAdapter;
import android.widget.SimpleCursorAdapter;

public class BrowserApp extends ListActivity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {

        String []proj= new String
        Cursor results=

android.provider.Browser.SearchColumns.URL+" ASC");
       /* if (results.moveToFirst())
            do {
            } while (results.moveToNext());

    public void DisplayTitle(Cursor c)



        ListAdapter adapter = new SimpleCursorAdapter(
                this, // Context.
                android.R.layout.two_line_list_item,  // Specify the row
template to use (here, two columns bound to the two retrieved cursor rows).
                results,                                    // Pass in the
cursor to bind to.
                proj, // Array of cursor columns to bind to.
                new int[0]);                                 // Parallel
array of which template objects to bind to those columns.

        // Bind to our new adapter.



2. Audio input- capturing external audio

Has anyone experimented with an external audio connector, so the Dream/
G1 could be connected to a high quality, external microphone through
the USB connector?

3. multiple selection in drop down list -spinner like widget

4. Efficiency of requestLocationUpdates() and how to save these gps data

5. Default keyboard pop up

6. onKeyDown event unavailable for space key in ListView

7. Build time optimization while copying workspace