Skip to content
Browse files

Update README.md

  • Loading branch information...
1 parent 24c3e32 commit 49ca6c09ebfea433b4a2244a86b2721ebab64035 @roughike committed
Showing with 33 additions and 2 deletions.
  1. +33 −2 README.md
View
35 README.md
@@ -20,7 +20,7 @@ Your uncle Bob's Galaxy S Mini will probably be supported in the future though.
## Gimme that Gradle sweetness, pls?
```groovy
-compile 'com.roughike:bottom-bar:1.1.3'
+compile 'com.roughike:bottom-bar:1.1.4'
```
**Maven:**
@@ -28,7 +28,7 @@ compile 'com.roughike:bottom-bar:1.1.3'
<dependency>
<groupId>com.roughike</groupId>
<artifactId>bottom-bar</artifactId>
- <version>1.1.3</version>
+ <version>1.1.4</version>
<type>pom</type>
</dependency>
```
@@ -92,6 +92,37 @@ public class MainActivity extends AppCompatActivity {
}
```
+#### What about hiding it automatically on scroll?
+
+Easy-peasy!
+
+**activity_main.xml:**
+
+```xml
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/myCoordinator"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
+
+ <android.support.v4.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <!-- Your loooong scrolling content here -->
+
+ </android.support.v4.widget.NestedScrollView>
+
+</android.support.design.widget.CoordinatorLayout>
+```
+
+**MainActivity.java:**
+
+```java
+// Instead of attach(), use attachShy:
+mBottomBar = BottomBar.attachShy((CoordinatorLayout) findViewById(R.id.myCoordinator), savedInstanceState);
+```
+
#### Can it handle my Fragments and replace them automagically when a different tab is selected?
Yep yep yep! Just call ```setFragmentItems()``` instead of ```setItemsFromMenu()```:

0 comments on commit 49ca6c0

Please sign in to comment.
Something went wrong with that request. Please try again.