setting margins for ListView entries

by Jason Proctor » Sat, 19 Sep 2009 06:00:38 GMT


Sponsored Links
 i'm having a little trouble getting a ListView with custom views in 
it to look right, i wonder if i'm missing something basic.

i'd like the scrollbar for the ListView to remain at hard right, but 
the actual view items to be inset inside the view frame. padding adds 
space inside the item view frames, seems like, and there's no 
setMargins() call in AbsListView.LayoutParams.

any help appreciated!

thanks
-- 
jason.vp.engineering.particle

--~--~---------~--~----~------------~-------~--~----~



setting margins for ListView entries

by Jason Proctor » Wed, 23 Sep 2009 07:24:28 GMT


 anyone?

i worked around it by making the list view contain another 
LinearLayout, with itself having a margin. it works, but when 
scrolled there is black horridness introduced, before ListView 
realises the background is transparent and fills with pattern. yuck.

starting to think i'm a bit hosed here.





-- 
jason.vp.engineering.particle

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Cannot load library: link_image[1995]: failed to link libmedia_jni.so

Hi All,

I am working on android froyo. I am getting "Cannot load library:
link_image[1995]: failed to link libmedia_jni.so" error while booting.

below is the logcat:

D/AndroidRuntime( 1674): >>>>>>>>>>>>>> AndroidRuntime START
<<<<<<<<<<<<<<
D/AndroidRuntime( 1674): CheckJNI is ON
D/AndroidRuntime( 1674): --- registering native functions ---
I/SamplingProfilerIntegration( 1674): Profiler is disabled.
I/Zygote  ( 1674): Preloading classes...
D/dalvikvm( 1674): GC_EXPLICIT freed 816 objects / 47208 bytes in 8ms
D/dalvikvm( 1674): GC_EXPLICIT freed 219 objects / 13560 bytes in 19ms
D/dalvikvm( 1674): GC_EXPLICIT freed 253 objects / 14336 bytes in 20ms
D/dalvikvm( 1674): GC_EXPLICIT freed 466 objects / 28872 bytes in 22ms
D/dalvikvm( 1674): GC_EXPLICIT freed 2090 objects / 108312 bytes in
26ms
I/dalvikvm( 1674): Unable to dlopen(/system/lib/libmedia_jni.so):
Cannot load library: link_image[1995]: failed to link libmedia_jni.so
I/dalvikvm( 1674):
W/dalvikvm( 1674): Exception Ljava/lang/UnsatisfiedLinkError; thrown
during Landroid/media/DecoderCapabilities;.<clinit>
W/dalvikvm( 1674): Exception Ljava/lang/ExceptionInInitializerError;
thrown during Landroid/media/MediaFile;.<clinit>
E/Zygote  ( 1674): Error preloading android.media.MediaFile.
E/Zygote  ( 1674): java.lang.ExceptionInInitializerError
E/Zygote  ( 1674):      at java.lang.Class.classForName(Native Method)
E/Zygote  ( 1674):      at java.lang.Class.forName(Class.java:235)
E/Zygote  ( 1674):      at java.lang.Class.forName(Class.java:182)
E/Zygote  ( 1674):      at
com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:302)
E/Zygote  ( 1674):      at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:589)
E/Zygote  ( 1674):      at dalvik.system.NativeStart.main(Native
Method)
E/Zygote  ( 1674): Caused by: java.lang.ExceptionInInitializerError
E/Zygote  ( 1674):      at
android.media.MediaFile.isWMAEnabled(MediaFile.java:106)
E/Zygote  ( 1674):      at
android.media.MediaFile.<clinit>(MediaFile.java:131)
E/Zygote  ( 1674):      ... 6 more
E/Zygote  ( 1674): Caused by: java.lang.UnsatisfiedLinkError: Library
media_jni not found
E/Zygote  ( 1674):      at java.lang.Runtime.loadLibrary(Runtime.java:
461)
E/Zygote  ( 1674):      at java.lang.System.loadLibrary(System.java:
557)
E/Zygote  ( 1674):      at
android.media.DecoderCapabilities.<clinit>(DecoderCapabilities.java:
46)
E/Zygote  ( 1674):      ... 8 more
D/AndroidRuntime( 1674): Shutting down VM
W/dalvikvm( 1674): threadid=1: thread exiting with uncaught exception
(group=0x4001d7f0)
init: untracked pid 1675 exited
D/skia    ( 1674): purging 6K from font cache [1 entries]
D/AndroidRuntime( 1679):
D/AndroidRuntime( 1679): >>>>>>>>>>>>>> AndroidRuntime START
<<<<<<<<<<<<<<


Please help me to solve this error.

Regards
Ashwani

-- 

2. Default Buttons appearing as black rectangles on DROIDX?

Hopefully someone can point me in the right direction as to what is
going on here:

In my app, I use standard buttons and spinners, which have always
appeared as basic beveled silver buttons.  I have seen these look fine
on my Nexus One running 2.2.1 as well as a couple of other phones.

I just saw a friend's brand new DROIDX running 2.2.1, and when viewing
my app on that device all the buttons and spinners are ugly black
rectangles that look horrible and ruin the layout.

Any ideas on what is going on here?

This is an example of the standard buttons and spinners I am talking
about:

<Button android:text="Previous"
        android:id="@+id/previousresults"
        android:layout_width="fill_parent"
       android:layout_height="wrap_content">
</Button>

<Spinner android:id="@+id/mySpinner"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:drawSelectorOnTop="true"
                android:prompt="@string/myPrompt"
                android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true"
                android:paddingTop="2dip"
                android:paddingBottom="2dip">
</Spinner>

-- 

3. Voice search/Record Error

4. twlauncher activity - phone hangs continuously

5. Connecting to Licensing server through Local/Remote Server

6. How to change the color..?

7. Maximum size of APK that can Upload to Android Market