Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9216117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:20:56+00:00 2026-06-18T02:20:56+00:00

I’m trying to develop an application using jeremy feinstein’s SlidingMenu library which I found

  • 0

I’m trying to develop an application using jeremy feinstein’s SlidingMenu library which I found very interesting. I have set up everything and created a sample project just to check whether i’m able to implement the sliding menu, but unfortunately I couldn’t see any sliding menu in my application.

these are the things what I did,

  • downloaded SlidinMenu from HERE and imported into eclipse as an
    android existing project. Changed its google api level. (Now no more red mark on it.)

  • Created a new project, and added the sliding menu library to it.

  • As jfeinstein explained, I added the following code to my MainActivity.java

    public class MainActivity extends Activity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        setTitle("Title !");
    
        setContentView(R.layout.activity_main);
    
        SlidingMenu menu = new SlidingMenu(this);
        menu.setMode(SlidingMenu.LEFT);
        menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
        menu.setShadowWidthRes(R.dimen.shadow_width);
        menu.setShadowDrawable(R.drawable.shadow);
        menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
        menu.setFadeDegree(0.35f);
        menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
        menu.setMenu(R.layout.menu);
    
    }
    

    }

and my activity_main.xml

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


<com.slidingmenu.lib.SlidingMenu
    xmlns:sliding="http://schemas.android.com/apk/res-auto"
    android:id="@+id/slidingmenulayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    sliding:viewAbove="@layout/testing"
    sliding:viewBehind="@layout/testing_two"
    sliding:touchModeAbove="margin"
    sliding:behindWidth="@dimen/shadow_width"
    sliding:behindScrollScale="0.5"
    sliding:shadowDrawable="@drawable/shadow"
    sliding:shadowWidth="@dimen/shadow_width"
    sliding:fadeEnabled="true"
    sliding:selectorEnabled="true"/>

</RelativeLayout>

and menu_frame.xml

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/menu_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

testing.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

<TextView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Test"/>
</LinearLayout>

and I have copied his menu.xml, shadow.xml, dimen.xml into my project.

And when I run it I saw nothing but these errors,

01-31 22:18:13.027: E/AndroidRuntime(759): FATAL EXCEPTION: main
01-31 22:18:13.027: E/AndroidRuntime(759): java.lang.RuntimeException: Unable to start activity ComponentInfo{android.demo.com/android.demo.com.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment

I don’t know where I made a mistake. Tried a lot and I couldnt figure out anything online. Any kind of help or example is much appreciated.
Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:20:57+00:00Added an answer on June 18, 2026 at 2:20 am

    Your problem is here.Your code:

    sliding:viewAbove="@layout/menu_frame"
    sliding:viewBehind="@layout/menu_frame"
    

    From the doc example:

    sliding:viewAbove="@layout/YOUR_ABOVE_VIEW"
    sliding:viewBehind="@layout/YOUR_BEHIND_BEHIND"
    

    You have to make sure what is above and what is behind the view.

    Update: I have tested your code, there are no problem with it. The only thing I had to do was delete sliding:fadeEnabled="true" because of compile error for me. You might want to look at somewhere else in your code or try to delete that line and try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I have an autohotkey script which looks up a word in a bilingual dictionary
I'm trying to select an H1 element which is the second-child in its group
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.