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. Interaction between TimerTask and android Animations

I'm afraid that I won't be able to figure this one out without some
help.  This code works just fine with the timer delay is set to 100.
Changing it to anything more, say 1000 or 1 second, the animation
doesn't run.  Log entries show up correctly no matter what I set for a
delay.  There must be something that I need to understand about
animations that I don't yet. Can someone help me. Here is the code
that I'm working with:

-- Thanks

public class FirstAnnim extends Activity {
    /** Called when the activity is first created. */

        private static  int     INVISIBLE = 0X4;
        private static int VISIBLE =0x0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Make image invisable
        findViewById(R.id.image).setVisibility(INVISIBLE);

        // create an animation routine
        MyAnimationRoutine mar = new MyAnimationRoutine
();
        Timer t1 = new Timer ();
        t1.schedule(mar, 100);
        Log.i("FirstAnnim"," Task started");
    }
    private class MyAnimationRoutine extends TimerTask {
           @Override
           public void run () {
                   Log.i("FirstAnnim"," Timer task started");
                        // Make image visable
                        findViewById(R.id.image).setVisibility(VISIBLE);
                        Animation run_anim= AnimationUtils.loadAnimation
(getApplicationContext(), R.anim.layout_controller);
                        run_anim.setDuration(5000);
                                
findViewById(R.id.image).startAnimation(run_anim);
                        findViewById(R.id.image).setVisibility(INVISIBLE);
           }
    }
}

-- 

2. Question on TouchRotateActivity sample

This may very well just be my inexperience with Java (and I'm almost
certain it is) but I felt best I ask anyway.

In this sample, GLSurfaceView is subclassed as TouchSurfaceView.
However, in the main Activity, there is a declaration of:
private GLSurfaceView mGLSurfaceView;

And when instantiated/initialized there is this call in onCreate():
mGLSurfaceView = new TouchSurfaceView(this);

So the probably very basic question is... why wasn't it declared with:
private TouchSurfaceView mTouchSurceView; ??

-- 

3. why Java, not Python?

4. How to build test project from command line?

5. MapView & onTouch events

6. How can I get the video file properties (codec, resolution...etc)

7. Apps silently close due to low memory (in remote Content Providers)