Question

I have been trying to setup android project with Navigation Drawer with AndroidSlidingUpPanel libary, but I cant seem to get it work

<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"
    android:theme="@android:style/Theme.Holo.Light" >

    <!-- Framelayout pre zobrazovanie jednotlivých fragmentov -->

    <FrameLayout
        android:id="@+id/frame_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

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

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

    <!-- Listview ako menu pre navDrawer -->

    <ListView
        android:id="@+id/list_slidermenu"
        android:layout_width="240dp"
        android:layout_height="fill_parent"
        android:layout_gravity="start"
        android:background="#2B2B2B"
        android:divider="@null"
        android:dividerHeight="0dp" />

</android.support.v4.widget.DrawerLayout>

I have copied the libary to eclipse project, included it in current project but still it always crashes. What am I missing here ? Anyway if somebody could also provide me with compiled jar file I would be also happy :)

04-07 19:40:21.275: E/AndroidRuntime(30096): FATAL EXCEPTION: main
04-07 19:40:21.275: E/AndroidRuntime(30096): Process: com.kulturnepodujatia, PID: 30096
04-07 19:40:21.275: E/AndroidRuntime(30096): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kulturnepodujatia/com.kulturnepodujatia.DashboardActivity}: android.view.InflateException: Binary XML file line #14: Error inflating class com.sothree.slidinguppanel.SlidingUpPanelLayout
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2215)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.app.ActivityThread.access$800(ActivityThread.java:145)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.os.Handler.dispatchMessage(Handler.java:102)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.os.Looper.loop(Looper.java:136)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at android.app.ActivityThread.main(ActivityThread.java:5081)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at java.lang.reflect.Method.invokeNative(Native Method)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at java.lang.reflect.Method.invoke(Method.java:515)
04-07 19:40:21.275: E/AndroidRuntime(30096):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
Was it helpful?

Solution

Right click on project --> properties--> java build path --> order and support --> check library which you are using

clean project(fresh build/installation)

it should work

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top