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 6925295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:46:16+00:00 2026-05-27T10:46:16+00:00

With the new facebook app it comes with an hidden sidebar that I would

  • 0

With the new facebook app it comes with an hidden sidebar that I would love to use something like that in my applications. It looks kinda like the sidebars that firefox mobile have…

Do you have any idea how to implement it besides re-implementing the ViewPager? I’ve tried with an HorizontalScrollView but that would also lead to re-implementation of it…

I’m not seeing any other way besides these two… any suggestions?

Thanks in advance

  • 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-05-27T10:46:17+00:00Added an answer on May 27, 2026 at 10:46 am

    I came up with a solution… I don’t know if it is perfect but it is working well.

    So what I did was a single FrameLayout with both of the Layouts stacked together and then I just animate the top layout to slide to the right of the screen (just need to call the slideTo or scrollBy. And basically it’s that! Quite simple and effective! (the code though is not very pretty :P)

    EDIT:

    Some code samples.

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#FFF" >
    
            <include
            android:id="@+id/menu_layout"
                layout="@layout/menu_list"
                android:visibility="invisible"/>
    
            <include
                android:id="@+id/news_list_parent"
                layout="@layout/main_news_list" 
                />
    
    </FrameLayout>
    

    This is the layout xml, quite simpe. The included .xml are simple LinearLayouts with a heading and a listview.

    The “magic” happens in the animation:

    protected void applyTransformation(float interpolatedTime, Transformation t) {
        int newOffset;
        if(expanded) {
            newOffset = 0;
            newOffset = (int)(endOffset*(1-interpolatedTime));
        } else {
            newOffset = (int)(endOffset*(interpolatedTime));
        }
        view.scrollTo(-newOffset, 0);
    }
    

    The endOffset is the target movement. I set it before I start the animation, and the View I want to animate (in this case is the view with the id=news_list_parent) it is set on the constructor.

    But just to understand how that works make a button and its listener would do something like this:

    if(viewBeneath.getVisibility() == View.INVISIBLE) {
        viewBeneath.setVisibility(View.Visible);
        viewToSlide.slideTo(-(width-50), 0);
    }
    

    And finally override the back button to do the opposite of the button

    if(viewBeneath.getVisibility() == View.VISIBLE) {
        viewToSlide.slideTo(0, 0);
        viewBeneath.setVisibility(View.Visible);
    }
    

    Read this as pseudo-code =) This is what I did in the beginning, that code is lost 😛

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

Sidebar

Related Questions

I'm linking my app to Facebook, and would like people to log in with
I'm attempting to replicate the Facebook app's new menu slider. Creating a slider that
In the last couple of days I've been building a new Facebook app that
since the new Auth Dialog from Facebook (for my App & homepage), I cannot
When trying to authenticate with facebook, my app crashes. It reaches the line new
I am having some issues with the new facebook like button. It shows up
I have really simple few lines of Facebook app, using the new Facebook API:
I'm trying to run the example.php file that comes with the facebook sdk. I
I'm writing a facebook app that iterates through comments. I can get the user
I have an app in a page tab that uses the facebook javascript sdk.

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.