Hi.  I am new to Java; please excuse my ignorance.

I am trying to use ViewGroup in main.xml.  However I am getting a
runtime exception because onLayout method isn't implemented.  How do I
implement this method?  The following is my partial code from
main.xml:

        <ViewGroup android:id="@+id/controlPanel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content">
                <Button android:id="@+id/alphaButton"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@+string/alpha" />
                <Button android:id="@+id/rotateButton"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@+string/rotate" />
        </ViewGroup>

and below in the application I try to implement onLayout method, but I
the autocompletion doesn't show 'onLayout':

controlPanel = (ViewGroup)findViewById(R.id.controlPanel);
//controlPanel ...here I get no autocompletion for onLayout

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to