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 ... >
Comments
Post a Comment