are you using the latest version of SDK ?

On Tue, May 5, 2009 at 4:04 PM, Sheepz <[email protected]> wrote:

>
> I took a look at the api
> http://developer.android.com/reference/android/widget/SlidingDrawer.html
> and copied their example to a clean sandbox project
> this is the code:
> [beginquote]
>
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    >
>
>
>  <SlidingDrawer
>     android:id="@+id/drawer"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>
>     android:handle="@+id/handle"
>     android:content="@+id/content">
>
>     <ImageView
>         android:id="@id/handle"
>         android:layout_width="88dip"
>         android:layout_height="44dip"
>         android:src="@drawable/icon" />
>
>     <GridView
>         android:id="@id/content"
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent" >
>         </GridView>
>
>  </SlidingDrawer>
>
> </LinearLayout>
>
>
> [endquote]
>
> this gives out the exception in eclipse, but it does run well...
> does anybody know why this is happening? can anyone else confirm this
> is happening on their environment?
> Thanks,
> Sh
>
> On May 1, 11:29 pm, Sheepz <[email protected]> wrote:
> > anyone found a solution?
> >
> > On May 1, 10:03 am, cannehal <[email protected]> wrote:
> >
> > > I tkink I have the same issue. For handle I have ImageView and for
> > > content I am using LinearLayout with some views inside of it.
> > > There is probably problem with eclipse plugin because in runtime it
> > > works fine.
> >
> > > On May 1, 7:01 am, Sheepz <[email protected]> wrote:
> >
> > > > anyone else found something here?
> >
> > > > On Apr 30, 5:43 pm, Sheepz <[email protected]> wrote:
> >
> > > > > okay, that didnt work :(
> > > > > <SlidingDrawerandroid:id="@+id/SlidingDrawer01"
> > > > > android:layout_width="wrap_content"
> > > > > android:layout_height="wrap_content"
> android:handle="@+id/ImageView01"
> > > > > android:content="@+id/ImageView02">
> > > > > <ImageView android:id="@id/ImageView01"
> > > > > android:layout_width="wrap_content"
> > > > > android:layout_height="wrap_content"
> android:src="@drawable/back2"></
> > > > > ImageView>
> > > > > <ImageView android:id="@id/ImageView02"
> > > > > android:layout_width="wrap_content"
> > > > > android:layout_height="wrap_content" android:src="@drawable/ahh"></
> > > > > ImageView>
> > > > > </SlidingDrawer>
> >
> > > > > still getting the same message in the ADT only now when launching
> the
> > > > > app, it simply stalls half drawn instead of giving an error message
> > > > > saying the application threw an exception...
> >
> > > > > On Apr 30, 5:40 pm, Romain Guy <[email protected]> wrote:
> >
> > > > > > You must use different views, it doesn't make sense to have the
> same
> > > > > > view, it's going to confuseSlidingDrawer:)
> >
> > > > > > On Thu, Apr 30, 2009 at 2:38 PM, Sheepz <[email protected]>
> wrote:
> >
> > > > > > > yeah, i figured that might be it, but even after this fix:
> > > > > > > <SlidingDrawerandroid:id="@+id/SlidingDrawer01"
> > > > > > > android:layout_width="wrap_content"
> > > > > > > android:layout_height="wrap_content"
> android:handle="@+id/ImageView01"
> > > > > > > android:content="@+id/ImageView01">
> > > > > > > <ImageView android:id="@id/ImageView01"
> > > > > > > android:layout_width="wrap_content"
> > > > > > > android:layout_height="wrap_content"
> android:src="@drawable/ahh"></
> > > > > > > ImageView>
> > > > > > > </SlidingDrawer>
> > > > > > > i still get the same error - i'm gonna try using diffrent views
> for
> > > > > > > the content and the handle
> > > > > > > brb :)
> >
> > > > > > > On Apr 30, 5:32 pm, Romain Guy <[email protected]> wrote:
> > > > > > >> There is a bug indeed, the exception message says the "handle"
> is
> > > > > > >> missing, but the "content" is missing. Check out the javadoc.
> I'll fix
> > > > > > >> the exception message.
> >
> > > > > > >> On Thu, Apr 30, 2009 at 2:26 PM, Sheepz <[email protected]>
> wrote:
> >
> > > > > > >> > okay, i might be missing something, the reason i think that
> this is a
> > > > > > >> > bug is that if you use the supplied tool, and cannot avoid
> getting an
> > > > > > >> > exception - it's a bug...
> > > > > > >> > i don't see any way around it - the way to create this
> widget is:
> > > > > > >> > a) create widget
> > > > > > >> > b) get exception
> > > > > > >> > c) fix error
> > > > > > >> > d) populate it with the values you want
> >
> > > > > > >> > by the way, i still havent gotten it to work on my app -
> here's the
> > > > > > >> > code:
> > > > > > >> > <TableLayout>
> > > > > > >> > <LinearLayout>
> > > > > > >> > ...
> > > > > > >> > </LinearLayout>
> >
> > > > > > >> > <SlidingDrawerandroid:id="@+id/SlidingDrawer01"
> > > > > > >> > android:layout_width="wrap_content"
> > > > > > >> > android:layout_height="wrap_content" android:handle="@+id/
> > > > > > >> > ImageView01">
> >
> > > > > > >> > <ImageView android:id="@+id/ImageView01"
> > > > > > >> > android:layout_width="wrap_content"
> > > > > > >> > android:layout_height="wrap_content"
> android:src="@drawable/ahh"></
> > > > > > >> > ImageView>
> >
> > > > > > >> > </SlidingDrawer>
> > > > > > >> > </TableLayout>
> >
> > > > > > >> > I guess i'm doing something wrong here - but i'm used to the
> whole
> > > > > > >> > hierarchical way of things - why is this different in it's
> > > > > > >> > implementation?
> > > > > > >> > Thanks for the quick answers btw!
> > > > > > >> > Sh.
> > > > > > >> > (p.s. if you want to see the rest of the layout, it's
> available at:
> > > > > > >> >http://code.google.com/p/bestcardgameever-android/)
> >
> > > > > > >> > On Apr 30, 5:21 pm, Romain Guy <[email protected]>
> wrote:
> > > > > > >> >> It *needs* a handle. It's not a bug, it's a requirement to
> make the widget work.
> >
> > > > > > >> >> On Thu, Apr 30, 2009 at 2:16 PM, Sheepz <
> [email protected]> wrote:
> >
> > > > > > >> >> > so you mean i have to put some content in it and only
> then it will be
> > > > > > >> >> > visilble? even if this is true, it's still a bug - albeit
> with a much
> > > > > > >> >> > lower severity...
> > > > > > >> >> > i'll check it out and report back in a few.
> >
> > > > > > >> >> > On Apr 30, 5:10 pm, Romain Guy <[email protected]>
> wrote:
> > > > > > >> >> >> Do what the exception says:
> >
> > > > > > >> >> >> "java.lang.IllegalArgumentException: The handle
> attribute is required
> > > > > > >> >> >> and must refer to a valid child."
> >
> > > > > > >> >> >> You need to define the widget to use as the handle of
> the drawer.
> >
> > > > > > >> >> >> On Thu, Apr 30, 2009 at 2:02 PM, Sheepz <
> [email protected]> wrote:
> >
> > > > > > >> >> >> > when adding aslidingDrawerobject to my application, i
> got this error
> > > > > > >> >> >> > when trying to display it on the main.xml layout view
> > > > > > >> >> >> > i used that view to create it as the bottommost
> component, and
> > > > > > >> >> >> > immediatly got this message in the console window and
> the layout
> > > > > > >> >> >> > stopped showing.
> > > > > > >> >> >> > here is the exception:
> > > > > > >> >> >> > java.lang.IllegalArgumentException: The handle
> attribute is required
> > > > > > >> >> >> > and must refer to a valid child.
> > > > > > >> >> >> >        at
> android.widget.SlidingDrawer.<init>(SlidingDrawer.java:203)
> > > > > > >> >> >> >        at
> android.widget.SlidingDrawer.<init>(SlidingDrawer.java:180)
> > > > > > >> >> >> >        at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0
> > > > > > >> >> >> > (Native
> > > > > > >> >> >> > Method)
> > > > > > >> >> >> >        at
> sun.reflect.NativeConstructorAccessorImpl.newInstance
> > > > > > >> >> >> > (Unknown
> > > > > > >> >> >> > Source)
> > > > > > >> >> >> >        at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> > > > > > >> >> >> > (Unknown
> > > > > > >> >> >> > Source)
> > > > > > >> >> >> >        at
> java.lang.reflect.Constructor.newInstance(Unknown Source)
> > > > > > >> >> >> >        at
> android.view.LayoutInflater.createView(LayoutInflater.java:
> > > > > > >> >> >> > 499)
> > > > > > >> >> >> >        at android.view.BridgeInflater.onCreateView
> > > > > > >> >> >> > (BridgeInflater.java:77)
> > > > > > >> >> >> >        at
> android.view.LayoutInflater.createViewFromTag
> > > > > > >> >> >> > (LayoutInflater.java:
> > > > > > >> >> >> > 562)
> > > > > > >> >> >> >        at
> android.view.BridgeInflater.createViewFromTag
> > > > > > >> >> >> > (BridgeInflater.java:
> > > > > > >> >> >> > 122)
> > > > > > >> >> >> >        at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:
> > > > > > >> >> >> > 617)
> > > > > > >> >> >> >        at
> android.view.LayoutInflater.inflate(LayoutInflater.java:
> > > > > > >> >> >> > 407)
> > > > > > >> >> >> >        at
> android.view.LayoutInflater.inflate(LayoutInflater.java:
> > > > > > >> >> >> > 296)
> > > > > > >> >> >> >        at
> com.android.layoutlib.bridge.Bridge.computeLayout
> > > > > > >> >> >> > (Bridge.java:371)
> > > > > > >> >> >> >        at
> > > > > > >> >> >> >
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.computeLayout
> > > > > > >> >> >> > (Unknown Source)
> > > > > > >> >> >> >        at
> > > > > > >> >> >> >
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor.recomputeLayout
> > > > > > >> >> >> > (Unknown Source)
> > > > > > >> >> >> >        at
> com.android.ide.eclipse.editors.layout.GraphicalLayoutEditor
> > > > > > >> >> >> > $2.run
> > > > > > >> >> >> > (Unknown Source)
> > > > > > >> >> >> >        at
> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:
> > > > > > >> >> >> > 35)
> > > > > > >> >> >> >        at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
> > > > > > >> >> >> > (Synchronizer.java:133)
> > > > > > >> >> >> >        at
> org.eclipse.swt.widgets.Display.runAsyncMessages
> > > > > > >> >> >> > (Display.java:
> > > > > > >> >> >> > 3800)
> > > > > > >> >> >> >        at
> org.eclipse.swt.widgets.Display.readAndDispatch
> > > > > > >> >> >> > (Display.java:3425)
> > > > > > >> >> >> >        at
> org.eclipse.ui.internal.Workbench.runEventLoop
> > > > > > >> >> >> > (Workbench.java:
> > > > > > >> >> >> > 2384)
> > > > > > >> >> >> >        at
> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:
> > > > > > >> >> >> > 2348)
> > > > > > >> >> >> >        at
> org.eclipse.ui.internal.Workbench.access$4(Workbench.java:
> > > > > > >> >> >> > 2200)
> > > > > > >> >> >> >        at
> org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
> > > > > > >> >> >> >        at
> > > > > > >> >> >> >
> org.eclipse.core.databinding.observable.Realm.runWithDefault
> > > > > > >> >> >> > (Realm.java:288)
> > > > > > >> >> >> >        at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench
> > > > > > >> >> >> > (Workbench.java:490)
> > > > > > >> >> >> >        at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench
> > > > > > >> >> >> > (PlatformUI.java:
> > > > > > >> >> >> > 149)
> > > > > > >> >> >> >        at
> > > > > > >> >> >> >
> org.eclipse.ui.internal.ide.application.IDEApplication.start
> > > > > > >> >> >> > (IDEApplication.java:113)
> > > > > > >> >> >> >        at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run
> > > > > > >> >> >> > (EclipseAppHandle.java:193)
> > > > > > >> >> >> >        at
> > > > > > >> >> >> >
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
> > > > > > >> >> >> > (EclipseAppLauncher.java:110)
> > > > > > >> >> >> >        at
> > > > > > >> >> >> >
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
> >
> > ...
> >
> > read more ยป
> >
>

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