What I'm trying to achieve is this:

A label with "Band" in it, and next to it a textbox in which to type
the band's name, then underneath the "Band" label a label "Members",
and next to it a textbox to type the members.
Then underneath all of this, a save button and a cancel button.

Undortunately, all my attempts to use a linearlayout have caused the
buttons to disappear....

Thanks for the advice on the hierarchyviewer though. I'm now able to
see whats happening, but it still makes no difference. I can't make it
display the way I want it to

On 5 Sep, 22:30, Mark Murphy <[email protected]> wrote:
> Carl wrote:
> > I'm trying to show a simple layout where I can call this activity and
> > fill in some values, then hit the save or cancel button. Unfortunately
> > the save and cancel buttons never appear. Can someone help please?
>
> Use hierarchyviewer to figure out where your missing widgets are:
>
> http://developer.android.com/guide/developing/tools/hierarchy-viewer....
>
> Here are some things that are unusual about your XML:
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > android"
> >    android:layout_width="fill_parent"
> >    android:layout_height="wrap_content"
>
> It is strange that you have the top-level container have a layout_height
> of wrap_content, particularly when you later attempt to use a
> layout_height of fill_parent for the second of the children. Consider
> making layout_height fill_parent here.
>
> >    <TableLayout
> >            android:orientation="horizontal"
>
> TableLayout does not have an android:orientation attribute.
>
>
>
>
>
> >    <TableLayout
> >            android:orientation="horizontal"
> >            android:layout_width="fill_parent"
> >            android:layout_height="fill_parent">
>
> >            <TableRow>
>
> >                    <Button
> >                            android:id="@+id/save"
> >                            android:text="@string/save"
> >                            android:layout_width="fill_parent"
> >                            android:layout_height="wrap_content"
> >                            android:layout_weight="1" />
>
> >                    <Button
> >                            android:id="@+id/cancel"
> >                            android:text="@string/cancel"
> >                            android:layout_width="fill_parent"
> >                            android:layout_height="wrap_content"
> >                            android:layout_weight="1" />
>
> >            </TableRow>
>
> >    </TableLayout>
>
> It is unclear why you are using TableLayout here versus a LinearLayout,
> since you have a one-row, one-column table.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 In Print!- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to