-1

im making a launcher app. in the tutorial it uses a Sliding Drawer which deprecated in Api 17. what could i use instead of this? i tried using the Slideup Panel from one of the posts on here link Below to the gitHub below

gitHubLinkhttps://github.com/umano/AndroidSlidingUpPanel

. but it wont allow me to use it in the way i want. i want the apps to appear in the drawer not in the main content. for some reason the second view only allows me to create a Text view which is for the handle to slide it up. any advice on what other methods i could implment to do the same job. it must slide up from the bottom. thanks for all the help

P9p studios
  • 69
  • 1
  • 8
  • Drawer is fragment so u cannot use it as a main content. It has to be activity – Ajay P. Prajapati Oct 23 '15 at 17:35
  • sliding drawer has deprecated. what can i use instead? – P9p studios Oct 23 '15 at 17:41
  • Which slidingDrawer are you using? can you mention it in your question.. i would take a look.. – Ajay P. Prajapati Oct 23 '15 at 17:44
  • done ive linked the github page for the method – P9p studios Oct 23 '15 at 17:50
  • why are you using library for NevigationDrawer when google has provided nice easiest way to implement it? visit this .. http://codemeaning.com/create-navigation-drawer-with-hamburger-icon-in-android/ this is tutorial for implementing navigation drawer.. no library use.. hope it helps! – Ajay P. Prajapati Oct 23 '15 at 17:52
  • i have uploaded that tutorial on github as well.. you can use it. its what you are looking for right? – Ajay P. Prajapati Oct 23 '15 at 17:58
  • this still dont answer my question sorry. i need the apps to be in the slide up drawer.. the only thing i can get in the slide up drawer is a handle.. which is a text view. if i replace the text view with a a Layout it just makes my app crash out. sorry to be a pain – P9p studios Oct 23 '15 at 18:34

1 Answers1

0

Ok guys Sussed it. Using The GitHub I posted in the question. what it did is because im aloud as many layouts as i like but only 2 children. i used a relative layout as my first layout with a gridView for my homescreen apps inside and closed it off. then i used anther Relative Layout Below with a textview inside then another Relative layout set with 80dp Padding at the top (the Size of my Text Handle) inside this one i had another gridview for my apps and closed it all off.

the Xml for it looks like this

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent"  tools:context=".MainActivity"
    android:id="@+id/Mainlayout"
    >










    <com.sothree.slidinguppanel.SlidingUpPanelLayout
        xmlns:sothree="http://schemas.android.com/apk/res-auto"
        android:id="@+id/sliding_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="bottom"
        sothree:umanoPanelHeight="80sp"
        sothree:umanoShadowHeight="4dp"
        sothree:umanoDragView ="@+id/dragView"
        sothree:umanoScrollableView="@+id/list"

        >


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >

        <GridView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/content1"
            android:columnWidth="90dp"
            android:numColumns="auto_fit"
            android:verticalSpacing="50dp"
            android:horizontalSpacing="50dp"
            android:stretchMode="columnWidth"
            android:gravity="center"
            android:clickable="true"
            >

        </GridView>
        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:id="@+id/handle"
                android:text="b"
                android:textSize="80sp"
                android:textColor="#17ff1c"
                android:gravity="center|top"
                android:clickable="true" />



        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="80sp"
            android:id="@+id/dragView"
            android:clickable="true"
            android:focusable="false">

            >



            <GridView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingBottom="80sp"
                android:id="@+id/content"
                android:columnWidth="90dp"
                android:numColumns="auto_fit"
                android:verticalSpacing="50dp"
                android:horizontalSpacing="50dp"
                android:stretchMode="columnWidth"
                android:gravity="center"

                >

            </GridView>
        </RelativeLayout>

        </RelativeLayout>
    </com.sothree.slidinguppanel.SlidingUpPanelLayout>


</RelativeLayout>
P9p studios
  • 69
  • 1
  • 8