I don't know how to create a footer whereby when the footer is pulled up, options for a music player come up. I am using a swipe tabs layout.
Asked
Active
Viewed 42 times
2 Answers
0
-
Could I use a sliding drawer ?? – Aniketh Jain Jun 02 '15 at 16:34
-
Thank you so.much... I will look into the suggestions into my project. Thank you :-) – Aniketh Jain Jun 02 '15 at 16:37
-
Sliding drawer is left to right. I suspect you were looking for bottom to top like the music player - have a look at this http://stackoverflow.com/questions/21784916/swipe-drag-android-view-from-the-bottom-of-the-screen – Zain Jun 02 '15 at 16:38
0
The UI element that you're looking for is the DrawerLayout. All you have to do is make it the top level element of your UI hierarchy, add your views to it, and then select one view to show up when the user slides the finger from the edge of the window.
There's an article in the developer's site about how to create this (here) and this is one of their examples:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
Alternatively you could use a SlidingDrawer to achieve the same result, but note that the class has been deprecated in recent versions of Android.

Mike Laren
- 8,028
- 17
- 51
- 70