Android Facebook style slide

前端 未结 25 1978
粉色の甜心
粉色の甜心 2020-11-22 03:23

The new Facebook application and its navigation is so cool. I was just trying to see how it can be emulated in my application.

Anyone has a clue how it can be achie

相关标签:
25条回答
  • 2020-11-22 04:03

    I think that library does not mentioned:

    jfeinstein10 / SlidingMenu

    github url:https://github.com/jfeinstein10/SlidingMenu

    • works fine with action bar ActionBarSherlock which helps in backward compatibility!
    • Support right slide and not only slide via button!
    0 讨论(0)
  • 2020-11-22 04:05

    I've just implemented similar view for my own project. You can check it here

    Here is screen of sample application based on library I wrote: ActionsContentView Example

    It is easy to use this custom view as element of XML layout. Here is example:

        <shared.ui.actionscontentview.ActionsContentView
          android:id="@+id/content"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:actions_layout="@layout/actions"
          app:content_layout="@layout/content" />
    

    I you will have any questions about usage of ActionsContentView library I can write a small article at projects Wiki.

    Some advantages of this library:

    • ability to slide view by touch
    • it is easy to adjust size of actions bar in XML
    • support of all Android SDK version starting from 2.0 and up

    There is one limitation:

    • all horizontal scrolling views will not work at bounds of this view

    Best regards, Steven

    0 讨论(0)
  • 2020-11-22 04:05

    I've been playing with this the past few days and I've come up with a solution that's quite straightforward in the end, and which works pre-Honeycomb. My solution was to animate the View I want to slide (FrameLayout for me) and to listen for the end of the animation (at which point to offset the View's left/right position). I've pasted my solution here: How to animate a View's translation

    0 讨论(0)
  • 2020-11-22 04:06

    With android support package revision 13( may 2013), there is DrawerLayout for creating a Navigation Drawer that can be pulled in from the edge of a window. And, navigation drawer is a design pattern now.

    v4 support library

    navigation drawer design pattern

    0 讨论(0)
  • 2020-11-22 04:07

    As a part of my Android Common Library (ACL) I implemented own SideBar. Main advantages:

    1. Side bar can be set to any position: left, top, bottom, right
    2. Both main view and sliding view are clickable
    3. Side bar can be partially shown
    4. Stylable attributes for SideBar make easier to change it's style
    5. Artifact in maven repo
    6. Part of a big library

    Source code: https://github.com/serso/android-common/tree/master/views/src/main/java/org/solovyev/android/view/sidebar

    Usage: https://github.com/serso/android-common/blob/master/samples/res/layout/acl_view_layout.xml

    0 讨论(0)
  • 2020-11-22 04:08

    I'm going to make some bold guesses here...

    I assume they have a layout that represents the menu that is not visible. When the menu button is tapped, they animate the layout/view on top to move out of the way, and simply enable the visibility of the menu layout. I have not thought about this causing any sort of z-index issues in the views, or how they control that.

    0 讨论(0)
提交回复
热议问题