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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:06:08+00:00 2026-06-15T15:06:08+00:00

Details: My app has a main activity that has a static layout for header

  • 0

Details:

My app has a main activity that has a static layout for header and footer. The middle part of the screen is represented by fragments which are handled based on user interactions

enter image description here

What I want to achieve

I have a fragment that has menu options in it, I’d like to be able to implement swipe left or right to bring up the menu options. When the user is done, swipe back and revert to another fragment. This swipe will only be made between the one active fragment and the menu fragment.
What would be the most simple and efficient way to code this ?

Right now I have in my activity layout a LinearLayout which will handle fragments

 <LinearLayout
        android:id="@+id/layFragment"
        android:layout_width="fill_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:gravity="center_vertical"
        android:orientation="vertical" >
    </LinearLayout>

And when I want to switch the fragment I use:

fragmentManager = getSupportFragmentManager();
fragment = fragmentManager.findFragmentById(R.id.layFragment);

final FragmentTransaction ft = fragmentManager.beginTransaction();
ft.replace(R.id.layFragment, new FragmentOperation());
ft.commit();

Beside this, I need to somehow implement the menu swipe.

  • 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-15T15:06:11+00:00Added an answer on June 15, 2026 at 3:06 pm

    In the end I went with ViewPager approach using a FragmentStatePagerAdapter and seems to work fine.

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

Sidebar

Related Questions

i have made an app that would calculate numbers from input fields. **main Activity
I have a main Activity and it has two fragments, ListFramgment and DetailFragment. In
So I'm working on an app that has a tab bar for the main
My app has this main activity: <activity android:name=.main.MainActivity ... <intent-filter> <action android:name=android.intent.action.MAIN /> <category
We are building an App as shown above that has nesting of Fragments. Tabs
I'd like to write a Silverlight app that has 2 or more browser windows
I am building a .NET MVC app that has a page with a list
I have an iPhone app that hides the status bar. However, my main view
So I have an app on the main page is details of the current
I'm new to iphone dev. My app Design has 3 views. One start screen.

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.