Skip to main content

how to make a gap between the list items?

2 replies [Last post]
ousys
Offline
Joined: 2008-05-14
Points: 0

Hi,

The url is a list making by LWUIT, I wanna know how to develop a gap between those items, in shai's blog , I see there is a very cool List picture, and in the list, there are gaps between items, which is very nice.

The way to do that is by LookAndFeel? An application can only apply one LookAndFeel? How could an application figure out which part in my application should apply this LookAndFeel?

Looking forward to your replies, thank you.
Best Regards

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi,
I'm not exactly clear what your problem is. Hopefully one of these
methods is what you are looking for:
list.setItemGap(int);
list.getStyle().setPadding(int, int, int, int);
list.getStyle().setMargin(int, int, int, int);
listRenderer.getStyle().setPadding(int, int, int, int);
listRenderer.getStyle().setMargin(int, int, int, int);

You can try playing with padding/margin in the resource editor to see
its effect live. You do not need to manipulate the look and feel, the
theme should be enough for you!
Manipulating the look and feel and my pimp series are for advanced
special usages.

Thanks.

> Hi,
> [URL=ousysrobin.photo.hexun.com/45896001_d.html][IMG]http://
> photo14.hexun.com/p/2008/0730/229480/
> b_89130EE139E23186B8391C17E305AD56.jpg[/IMG][/URL]
>
> The url is a list making by LWUIT, I wanna know how to develop a
> gap between those items, in shai's blog , I see there is a very
> cool List picture, and in the list, there are gaps between items,
> which is very nice.
>
> The way to do that is by LookAndFeel? An application can only apply
> one LookAndFeel? How could an application figure out which part in
> my application should apply this LookAndFeel?
>
> Looking forward to your replies, thank you.
> Best Regards
> [Message sent by forum member 'ousys' (ousys)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290266
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

ousys
Offline
Joined: 2008-05-14
Points: 0

Shai, your reply is very helpful for me , thank you very much.