Dynamically extend the height of the ListView row background image?

by javame_android » Fri, 23 Apr 2010 18:57:07 GMT

Sponsored Links

Just to make it more clear, I want to have some text displayed at the
bottom of the image. An example of the view that I want is as below.

|  "Certain content goes here"                      |
|  "some text"                                                |

What I want is that image should extend itself if the content is more
than the height of the image. For this reason, I have used .9.png
image but no success. Also, the text at the bottom should always be at
the bottom.

First I was using "?android:attr/listPreferredItemHeight" this to set
the height of listview row. When I tried with wrap_content then the
height is increasing according to the contents but then the content
that I wish to have at the bottom don't remain at the bottom.

Can someone now let me know what may be the issue?



Dynamically extend the height of the ListView row background image?

by Kumar Bibek » Fri, 23 Apr 2010 20:01:24 GMT

 I think there's something wrong with your layout. Put some lines of
the xml and we will try to figure out your problem.

Thanks and Regards,
Kumar Bibek


Sponsored Links

Other Threads

1. connections problem ...


Sorry to trouble you ... i'm new to  developing for android and i have
a problem.
I cant debug my app on the device ... by running abd devices i can
only see the emulator!

any ideeas?



2. Issue with populating a ViewFlipper child View with a ListView


I am trying to populate a ViewFlipper with a ListView when a certain
button is clicked...but I only get a NullPointerException for
lv.setAdapter(new ArrayAdapter<String>(this,
R.layout.specialeffectsview, specialEffects));

To be honest I don't really know how to do this, I just learned about
the ViewFlipper today and I haven't fully understood how to use it
yet. If anyone could help me find how what I have done wrong, that
would be great.

Thanks in advance.

Here is the code I use:

public void onClick(View v){
                        if (v == btnExposure){


                        else if (v == btnProperties){

                        else if (v == btnSpecialEffects){
                                String[] specialEffects =
                        lv.setAdapter(new ArrayAdapter<String>(this,
R.layout.specialeffectsview, specialEffects));



3. LVL Sample application problems

4. Solved: Static variables cleared in JUnit tests! (???)

5. Droid's Hardware cannot handle mobile hotspot.. says Motorola.. :)

6. isReachable() is about 1000X slower than it should be

7. Jigsaw puzzle image source