Is there any type of "spacer" type widget?

by Danny » Sat, 14 Jun 2008 03:45:10 GMT

Sponsored Links
 It would be nice to have some sort of spacer widget rather than having
to continuously play with marginBottom or padding attributes.  Just a
quick and dirty way of adding a gap to signify something between say,
two EditText's in vertical LinearLayout.

I guess I could make a custom view, but anyone else have a better idea
than that or padding/margin settings?


Is there any type of "spacer" type widget?

by Romain Guy » Sat, 14 Jun 2008 03:50:24 GMT

 You can just use a View and give it the appropriate layout
width/height. For instance:

<View layout_width="2dip" layout_height="wrap_content" />

Romain Guy


Sponsored Links

Is there any type of "spacer" type widget?

by Danny » Sat, 14 Jun 2008 04:08:39 GMT

 great idea, thought of using the parent class as a widget never
occurred to me.


Is there any type of "spacer" type widget?

by Romain Guy » Sat, 14 Jun 2008 04:13:21 GMT

 You can see a few uses of View in the ApiDemos, for instance to create
a horizontal ruler in the TableLayout demos.

Romain Guy


Other Threads

1. Developing websites for Android

I'd like to develop some websites in mobile format for Android/
iPhone.  Are there any templates out there, perhaps for MS Publisher?
Specifically, I'd like to do something that looks like the mobile website, but I'm not a web "designer/
programmer."  Does anyone have any templates they could share?


2. contacts.extensions

Hi guys,
I'm trying to extend the contacts by adding additional fields to
contacts.people using contacts.extensions. My only problem is that have no
idea how to query the contacts.people using a join with contacts.extensions.
I'm not trying to modify/extend the contacts provider.

One very very ugly solution would be to query on contacts.extensions and
using the person ids to query the contacts.people (manual join) ... The idea
is to create an ListActivity which displays only the extended contacts.

I would like to be able to create a content provider that uses directly the
contacts.db (from the content provider) where i could use my join queries...
but from what I know this is not possible.

Do the content providers support joins? Or is there another way to create
this kind of joins?

One more thing... How can I use Contacts.People.Extensions?



3. Spinner setSelection(int) problem

4. Implementing a custom Suggestions Provider

5. How to get image file from Google Chart API

6. Playing Audio in web apps on Android

7. Saving images from MMS