Reputation: 383
i'm trying to create a Sliding Menu for my android app. Well, at this moment i'm not well suceed.
I'm trying to do something like this:
If I press button A, in option view will appear A's options, if I press B, same thing happens, C...
Can you help me?
Thanks a lot.
Upvotes: 0
Views: 592
Reputation: 7907
Simple sliding menu:
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="25"
android:adjustViewBounds="true"
android:text="A" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="25"
android:adjustViewBounds="true"
android:text="B" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="25"
android:adjustViewBounds="true"
android:text="C" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="25"
android:adjustViewBounds="true"
android:text="D" />
</LinearLayout>
</HorizontalScrollView>
Now set onclick listeners of these buttons in your java code. If you want to show popups, see How to create a popup window in android?
Upvotes: 0
Reputation: 5725
see this: How to Create QuickAction Dialog in Android : http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Upvotes: 3