Hi there,

I just ran into a problem with my SlidingDrawer. I got a
RuntimeException telling me that my SlidingDrawer cannot have
UNSPECIFIED dimensions (see Catlog output).
If I understand it correctly this means layout_width and layout_height
are empty, but as you can see from my xml code (see further below), I
have specified them.
I really don't know what I should, if anyone can help me out here,
that would be great.
Thanks in advance.


09-01 20:02:12.209: ERROR/AndroidRuntime(2444): Uncaught handler:
thread main exiting due to uncaught exception
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):
java.lang.RuntimeException: SlidingDrawer cannot have UNSPECIFIED
dimensions
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.SlidingDrawer.onMeasure(SlidingDrawer.java:261)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.View.measure(View.java:7966)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.RelativeLayout.measureChild(RelativeLayout.java:554)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.RelativeLayout.onMeasure(RelativeLayout.java:377)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.View.measure(View.java:7966)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.ScrollView.measureChildWithMargins(ScrollView.java:893)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.ScrollView.onMeasure(ScrollView.java:276)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.View.measure(View.java:7966)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.View.measure(View.java:7966)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3077)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.View.measure(View.java:7966)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.ViewRoot.performTraversals(ViewRoot.java:783)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1666)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.os.Handler.dispatchMessage(Handler.java:99)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.os.Looper.loop(Looper.java:123)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
android.app.ActivityThread.main(ActivityThread.java:4603)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
java.lang.reflect.Method.invokeNative(Native Method)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
java.lang.reflect.Method.invoke(Method.java:521)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
09-01 20:02:12.229: ERROR/AndroidRuntime(2444):     at
dalvik.system.NativeStart.main(Native Method)


<?xml version="1.0" encoding="utf-8"?>

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android";
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        >
        <RelativeLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        
android:background="@drawable/shape_background_gradient">
            <LinearLayout
                android:layout_width="205px"
                android:layout_height="155px"
                android:background="#FFCCCCCC"
                android:id="@+id/VideoViewHolder"
                android:padding="2.5px"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="5px"
                android:layout_marginBottom="5px"
                >
                        <VideoView
                                android:layout_width="200px"
                                android:layout_height="150px"
                                android:id ="@+id/VideoViewEdit"
                                android:layout_centerHorizontal="true"
                                >
                        </VideoView>
                </LinearLayout>

                <TableLayout
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:stretchColumns="0"
                        android:layout_below="@id/VideoViewHolder"
                        >
                        <TableRow
                                
android:background="@drawable/shape_track_background"
                                android:padding="5px"
                                >
                                <RelativeLayout
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        >
                                        <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_editor_videotrack"
                                                           
android:id="@+id/ic_videotrack"
                                                           android:padding="5px"
                                                           
android:layout_gravity="left"/>
                                        <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/videotrack"
                                                           
android:id="@+id/videoframe1"
                                                           
android:layout_toRightOf="@id/ic_videotrack"
                                                           
android:layout_centerVertical="true"/>
                                        <ImageButton
                                                        
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_track"
                                                           
android:id="@+id/videobutton1"
                                                           
android:paddingTop="1px"
                                                           
android:paddingBottom="2px"
                                                           
android:paddingRight="3px"
                                                           
android:paddingLeft="2px"
                                                           
android:background="#00000000"
                                                           
android:layout_toRightOf="@id/videoframe1"
                                                          
android:layout_centerVertical="true"/>
                                                <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/videotrack"
                                                           
android:id="@+id/videoframe2"
                                                           
android:layout_toRightOf="@id/videobutton1"
                                                          
android:layout_centerVertical="true"/>
                                                <ImageButton
                                                        
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_track"
                                                           
android:paddingBottom="2px"
                                                           
android:paddingRight="3px"
                                                           
android:paddingLeft="2px"
                                                           
android:background="#00000000"
                                                           
android:id="@+id/videobutton2"
                                                           
android:layout_toRightOf="@id/videoframe2"
                                                          
android:layout_centerVertical="true"/>

                                </RelativeLayout>
                        </TableRow>
                        <TableRow
                                                
android:background="@drawable/shape_track_background"
                                                android:padding="5px"
                                                >
                                <RelativeLayout
                                                        
android:layout_width="wrap_content"
                                                         
android:layout_height="wrap_content"
                                                         >
                                                <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_editor_audiotrack"
                                                           
android:id="@+id/ic_audiotrack"
                                                           android:padding="5px"
                                                           
android:layout_gravity="left"
                                                          />
                                                <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/audiotrack"
                                                           
android:id="@+id/audioframe1"
                                                          
android:layout_toRightOf="@id/ic_audiotrack"
                                                          
android:layout_centerVertical="true"/>
                                                <ImageButton
                                                        
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_track"
                                                           
android:id="@+id/audiobutton1"
                                                           
android:paddingBottom="2px"
                                                           
android:paddingRight="3px"
                                                           
android:paddingLeft="2px"
                                                           
android:background="#00000000"
                                                           
android:layout_toRightOf="@id/audioframe1"
                                                          
android:layout_centerVertical="true"/>
                                                <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/audiotrack"
                                                           
android:id="@+id/audioframe2"
                                                           
android:layout_toRightOf="@id/audiobutton1"
                                                          
android:layout_centerVertical="true"/>
                                                <ImageButton
                                                        
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_track"
                                                           
android:paddingBottom="2px"
                                                           
android:paddingRight="3px"
                                                           
android:paddingLeft="2px"
                                                           
android:background="#00000000"
                                                           
android:id="@+id/audiobutton2"
                                                           
android:layout_toRightOf="@id/audioframe2"
                                                          
android:layout_centerVertical="true"/>

                                                </RelativeLayout>
                                </TableRow>
                                <TableRow
                                                
android:background="@drawable/shape_track_background"
                                                android:padding="5px"
                                                >
                                        <RelativeLayout
                                                
android:layout_width="wrap_content"
                                                         
android:layout_height="wrap_content">
                                                <ImageButton
                                                        
android:layout_width="wrap_content"
                                                        
android:layout_height="wrap_content"
                                                        
android:id="@+id/button_add_media"
                                                        
android:src="@drawable/ic_editor_add_media"
                                                        android:padding="5px"
                                                        
android:layout_marginRight="5px"
                                                                   />
                                                <ImageButton
                                                        
android:layout_width="wrap_content"
                                                        
android:layout_height="wrap_content"
                                                        
android:id="@+id/button_undo"
                                                        
android:src="@drawable/ic_editor_undo"
                                                        android:padding="5px"
                                                        
android:layout_toRightOf="@id/button_add_media"
                                                        
android:layout_marginRight="5px"
                                                                   />
                                                <ImageButton
                                                        
android:layout_width="wrap_content"
                                                        
android:layout_height="wrap_content"
                                                        
android:id="@+id/button_redo"
                                                        
android:src="@drawable/ic_editor_redo"
                                                        android:padding="5px"
                                                        
android:layout_toRightOf="@id/button_undo"
                                                        
android:layout_marginRight="5px"
                                                                   />
                                        </RelativeLayout>
                                </TableRow>
                        </TableLayout>
         <SlidingDrawer
     android:id="@+id/drawer"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
         android:orientation="horizontal"
     android:handle="@+id/handle"
     android:content="@+id/content">

     <ImageView
         android:id="@id/handle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:src="@drawable/slider_handle"
         />
     <RelativeLayout
         android:id="@id/content"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content">
        <ImageButton
                android:id="@+id/button_exposure"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_exposure"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
        <ImageButton
                android:id="@+id/button_properties"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/button_exposure"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_properties"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
                <ImageButton
                android:id="@+id/button_rgb"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/button_properties"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_rgb"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
        <ImageButton
                android:id="@+id/button_special_effects"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/button_rgb"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_special_effects"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
        <ImageButton
                android:id="@+id/button_title"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/button_special_effects"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_title"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
                <ViewFlipper
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/flipper"
                        android:layout_toRightOf="@id/button_exposure">
                        <include android:id="@+id/view_exposure" 
layout="@layout/
exposureview" />
                        <include android:id="@+id/view_properties" 
layout="@layout/
propertiesview" />
                        <include android:id="@+id/view_rgb" 
layout="@layout/rgbview"/>
                        <include android:id="@+id/view_special_effects" 
layout="@layout/
specialeffectsview"/>
                        <include android:id="@+id/view_title_themes" 
layout="@layout/
titleview"/>
                </ViewFlipper>
     </RelativeLayout>
 </SlidingDrawer>
 </RelativeLayout>
</ScrollView>

-- 
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