But what I am trying at the moment is not really about the drawer itself but
to provide the content for it when pressing a button...

On Mon, Aug 2, 2010 at 9:50 AM, Victoria Busse
<[email protected]>wrote:

> Can I download the project somewhere to see how it works??
>
>
> On Mon, Aug 2, 2010 at 9:38 AM, schwiz <[email protected]> wrote:
>
>> check out the panel example here in this project its easy to reuse and
>> makes sliding drawers in any direction
>> http://code.google.com/p/android-misc-widgets/
>>
>> On Aug 1, 8:01 pm, Victoria Busse <[email protected]> wrote:
>> > I am trying to create a  SlidingDrawer that holds a menu with
>> imagebuttons
>> > and each
>> > imagebutton leads to a different content within the drawer (basically it
>> > should look similar
>> > to the image I attached)...would that work with ViewGroup.addView and
>> > LayoutInflater?
>> >
>> >
>> >
>> > On Mon, Aug 2, 2010 at 1:53 AM, Romain Guy <[email protected]>
>> wrote:
>> > > A ViewStub is not designed to be recreated and put back in the view
>> > > hierarchy. What are you trying to achieve? If you are trying to add a
>> > > new view to the window every time the user presses a button, just use
>> > > ViewGroup.addView() and LayoutInflater.
>> >
>> > > On Sun, Aug 1, 2010 at 5:50 PM, kivy <[email protected]>
>> wrote:
>> > > > Hi there,
>> >
>> > > > I am trying to recreate and reinflate a ViewStub each time an
>> > > > ImageButton is pressed because at the moment my app crashes as soon
>> as
>> > > > I press the button a second time (due to a NullPointerException
>> caused
>> > > > by the ViewStub that doesn't exist anymore) but I am a little stuck
>> as
>> > > > I don't know how to recreate and reinvoke the ViewStub...
>> >
>> > > > If someone could give me a hand here, that would be great.
>> > > > Thanks in  advance.
>> >
>> > > > This is what I have done so far:
>> >
>> > > >  btnExposure = (ImageButton) findViewById(R.id.button_exposure);
>> >
>> > > >      btnExposure.setOnClickListener(new OnClickListener()
>> > > >        {
>> >
>> > > >                @Override
>> > > >                public void onClick(View v) {
>> > > >                     if (findViewById(R.id.stub_exposure) != null){
>> > > >                         ViewStub stub1 = (ViewStub)
>> > > > findViewById(R.id.stub_exposure);
>> > > >                         importStub = stub1.inflate();
>> > > >                         toggle(importStub2);
>> > > >                         }
>> > > >                     else {
>> > > >                         //DON'T KNOW WHAT I SHOULD DO HERE
>> > > >                     }
>> > > >                }
>> >
>> > > >           }
>> > > >        );
>> >
>> > > > --
>> > > > 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]<android-developers%[email protected]><android-developers%2Bunsubs
>> [email protected]>
>> > > > For more options, visit this group at
>> > > >http://groups.google.com/group/android-developers?hl=en
>> >
>> > > --
>> > > Romain Guy
>> > > Android framework engineer
>> > > [email protected]
>> >
>> > > Note: please don't send private questions to me, as I don't have time
>> > > to provide private support.  All such questions should be posted on
>> > > public forums, where I and others can see and answer them
>> >
>> > > --
>> > > 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]<android-developers%[email protected]><android-developers%2Bunsubs
>> [email protected]>
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/android-developers?hl=en
>> >
>> >  SlidingDrawerExample.png
>> > 15KViewDownload
>>
>> --
>> 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]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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