Skip to content
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
2 parents 61e6a51 + ef02d8a commit 7a20c392c32734664707f0a3201c60841cef5f66 @roughike committed
Showing with 36 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +35 −4 README.md
  3. BIN scrolling_demo.gif
View
1 .gitignore
@@ -10,4 +10,5 @@ screenshot_two.png
demo1.gif
demo2.gif
tablet.png
+scrolling_demo.gif
color_demo.gif
View
39 README.md
@@ -1,7 +1,7 @@
# BottomBar
-<img src="https://raw.githubusercontent.com/roughike/BottomBar/master/demo1.gif" width="278" height="492" /> <img src="https://raw.githubusercontent.com/roughike/BottomBar/master/demo2.gif" width="278" height="492" />
+<img src="https://raw.githubusercontent.com/roughike/BottomBar/master/scrolling_demo.gif" width="278" height="492" /> <img src="https://raw.githubusercontent.com/roughike/BottomBar/master/demo2.gif" width="278" height="492" />
-Before sending your pull requests: [How to contribute](https://github.com/roughike/BottomBar/edit/master/README.md#contributions)
+**Before sending your pull requests: [How to contribute](https://github.com/roughike/BottomBar/edit/master/README.md#contributions)**
[Common problems and solutions](https://github.com/roughike/BottomBar/blob/master/README.md#common-problems-and-solutions)
@@ -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()```:
View
BIN scrolling_demo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7a20c39

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