android - Hide Actiobar smooth on Listview scroll up -


If I scroll through a listview then I want to hide the Actionbar, it should look like the new Play Store app on Android Lollipop. . If I use getActionBar () Hide the actionbars with encryption (), but I want to scroll to Actiobar.

How does this work?

Edit

I have found that the action level can be automatically hidden in the API level 21:

  Protected void on @OverrideCode (bundled saved instenstate) {super.onCreate (savedInstanceState); . GetWindow () requestFeature (Window.FEATURE_ACTION_BAR_OVERLAY); SetContentView (R.layout.activity_main); M_lvTest = (ListView) findViewById (R.id.lvTest); ArrayList & LT; String & gt; Value = new arreelist & lt; String & gt; (); For (int i = 0; i & lt; 100; i ++) {values.add (i + "items"); } Custom Adapter Adapter = New custom adapter (this, RIDLVTist, value); M_lvTest.setAdapter (adapter); M_lvTest.setNestedScrollingEnabled (true); GetActionBar () setHideOnContentScrollEnabled (true) }  

But do not scroll over it. It's animated.

Try Jenko, for the effect of Google Play Store, like this ...

  • Previous versions of Android are also supported by API.
  • The Android Developers Blog puts it well in the way of using it.

  • Comments

    Popular posts from this blog

    java - Can't add JTree to JPanel of a JInternalFrame -

    javascript - data.match(var) not working it seems -

    javascript - How can I pause a jQuery .each() loop, while waiting for user input? -