3

I need a Sliding up Panel in my App and found this free source on GitHub which is from the Umando App. GitHub Sliding Up Paned Umano

But because I'm new to Android and specially how to work with GitHub source, I don't know how to include this library or code in my app.

Has anyone experience with this sliding up panel ? Or can anyone explain me how to include it?

  • Now that the library is gradle only, you need to manually make an Eclipse library project for it, see here: http://stackoverflow.com/questions/36731172/troubles-with-androidslidinguppanel-with-eclipse-error-inflating-class – Daniel Nugent Apr 20 '16 at 04:05

1 Answers1

5

First of all you have to download the library project into your system. After downloading the library project If you want to use that control in your project then you have to add that library project in your project.

To add library project You have import library project in your workspace. After importing you need to add it in your project as library.

To add project as library in your project right click on your project `Goto Properties>Select Android tab from left side and check on right side below the api levels you will get option Add.. >Click on Add.. and will show the list of the library projects and from that select your library project> Apply.

Check out the below screenshots for more details.

enter image description here

enter image description here

To use the layout, simply include com.sothree.slidinguppaneldemo.SlidingUpPanelLayout as the Root element in your activity Layout. Make sure that it has two children. The first child is your main layout. The second child is your layout for the sliding up panel. Both children should have width and height set to match_parent.

<com.sothree.slidinguppanel.SlidingUpPanelLayout
    android:id="@+id/sliding_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Main Content"
        android:textSize="16sp" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center|top"
        android:text="The Awesome Sliding Up Panel"
        android:textSize="16sp" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
GrIsHu
  • 29,068
  • 10
  • 64
  • 102