Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Sjolander committed Jun 8, 2015
1 parent 51acf5f commit d2cb5da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ BottomSheet has been used in production at Flipboard for a while now so it is th
If all you want is the BottomSheet component and don't need things from commons you can skip that dependency.
```groovy
dependencies {
compile 'com.flipboard:bottomsheet-core:1.0.0'
compile 'com.flipboard:bottomsheet-commons:1.0.0' // optional
compile 'com.flipboard:bottomsheet-core:1.1.0'
compile 'com.flipboard:bottomsheet-commons:1.1.0' // optional
}
```

Expand Down Expand Up @@ -38,7 +38,7 @@ Get started by wrapping your layout in a BottomSheet. So if you currently have t

You would have to update it to look like this:
```xml
<com.flipboard.bottomsheet.BottomSheetLayout
<com.flipboard.bottomsheet.BottomSheet
android:id="@+id/bottomsheet"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand All @@ -61,12 +61,12 @@ You would have to update it to look like this:

</LinearLayout>

</com.flipboard.bottomsheet.BottomSheetLayout>
</com.flipboard.bottomsheet.BottomSheet>
```

Back in your activity or fragment you would get a reference to the BottomSheet like any other view.
```java
BottomSheetLayout bottomSheet = (BottomSheetLayout) findViewById(R.id.bottomsheet);
BottomSheet bottomSheet = (BottomSheet) findViewById(R.id.bottomsheet);
```

Now all you need to do is show a view in the bottomSheet:
Expand All @@ -88,7 +88,7 @@ bottomSheet.showWithSheetView(new IntentPickerSheetView(this, shareIntent, "Shar
That's it for the simplest of use cases. Check out the API documentation below to find out how to customize BottomSheet to fit your use cases.
##API
###BottomSheetLayout
###BottomSheet
```java
/**
* Set the presented sheet to be in an expanded state.
Expand Down Expand Up @@ -212,7 +212,7 @@ public void setOnSheetStateChangeListener(OnSheetStateChangeListener onSheetStat
*
* @param bottomSheet The bottom sheet which contained the presented sheet.
*/
void onDismissed(BottomSheetLayout bottomSheet);
void onDismissed(BottomSheet bottomSheet);
```
###ViewTransformer
Expand All @@ -227,25 +227,9 @@ void onDismissed(BottomSheetLayout bottomSheet);
* @param parent The BottomSheet presenting the sheet view.
* @param view The content view to transform.
*/
void transformView(float translation, float maxTranslation, float peekedTranslation, BottomSheetLayout parent, View view);

/**
* Called on when the translation of the sheet view changes allowing you to customize the amount of dimming which
* is applied to the content view.
*
* @param translation The current translation of the presented sheet view.
* @param maxTranslation The max translation of the presented sheet view.
* @param peekedTranslation The peeked state translation of the presented sheet view.
* @param parent The BottomSheet presenting the sheet view.
* @param view The content view to transform.
*
* @return The alpha to apply to the dim overlay.
*/
float getDimAlpha(float translation, float maxTranslation, float peekedTranslation, BottomSheetLayout parent, View view);
void transformView(float translation, float maxTranslation, float peekedTranslation, BottomSheet parent, View view);
```

`BaseViewTransformer` exists for you to extend if you would like the default dimming behaviour.

##Common Components
These are located in the optional `bottomsheet-commons` dependency and implement common use cases for bottom sheet.

Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Tue, 02 Jun 2015 17:07:22 -0700
#Mon, 08 Jun 2015 16:04:20 -0700
#Tue Jun 02 09:57:59 PDT 2015
major=1
minor=0
minor=1
patch=0

0 comments on commit d2cb5da

Please sign in to comment.