Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur3486 authored Mar 9, 2019
1 parent 5dbfb37 commit 68250c1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ The implementation of the Action Picker Bottom Sheet becomes a trivial task with

Let's use the [`ActionPickerBottomSheet.java`](https://github.com/arthur3486/bottomsheets/blob/master/bottomsheets-sheets/src/main/java/com/arthurivanets/bottomsheets/sheets/ActionPickerBottomSheet.java) in our Activity:

* **With [`bottomsheets-ktx`]()**
* **With [`bottomsheets-ktx`](https://bintray.com/arthurimsacc/maven/bottomsheets-ktx/_latestVersion)**

<details><summary><b>Kotlin (click to expand)</b></summary>
<p>
Expand All @@ -240,8 +240,6 @@ class MainActivity : AppCompatActivity() {
private var bottomSheet : BottomSheet? = null

private fun showActionsBottomSheet() {
dismissBottomSheet()

bottomSheet = showActionPickerBottomSheet(
options = getActionOptions(),
onItemSelectedListener = OnItemSelectedListener {
Expand Down Expand Up @@ -289,7 +287,7 @@ public class MainActivity extends AppCompatActivity {

</p></details><br>

* **Without [`bottomsheets-ktx`]()**
* **Without [`bottomsheets-ktx`](https://bintray.com/arthurimsacc/maven/bottomsheets-ktx/_latestVersion)**

<details><summary><b>Kotlin (click to expand)</b></summary>
<p>
Expand All @@ -300,8 +298,6 @@ class MainActivity : AppCompatActivity() {
private var bottomSheet : BottomSheet? = null

private fun showActionsBottomSheet() {
dismissBottomSheet()

bottomSheet = ActionPickerBottomSheet.init(
this,
getActionOptions().map(::ActionItem),
Expand Down Expand Up @@ -356,7 +352,9 @@ public class MainActivity extends AppCompatActivity {

## Custom Action Picker Implementation

//TODO <--- to be done (Basic example of how to use the Custom Action Picker from the `bottomsheets-sheets`)
The implementation of the Custom Action Picker Bottom Sheet is not that much different from the [`Action Picker Implemenetation`](#action-picker-implementation), you just need to use the [`CustomActionPickerBottomSheet.java`](https://github.com/arthur3486/bottomsheets/blob/master/bottomsheets-sheets/src/main/java/com/arthurivanets/bottomsheets/sheets/CustomActionPickerBottomSheet.java) with your custom [`BaseActionItem`](https://github.com/arthur3486/bottomsheets/blob/master/bottomsheets-sheets/src/main/java/com/arthurivanets/bottomsheets/sheets/adapters/actionpicker/BaseActionItem.java)-based Action Items and that's it.

See the example of a [Custom Action Picker in Action](https://github.com/arthur3486/bottomsheets/blob/master/app/src/main/java/com/arthurivanets/demo/ui/MainActivity.kt#L99).

## Advanced Use

Expand Down

0 comments on commit 68250c1

Please sign in to comment.