├── .gitignore ├── LICENSE.txt ├── README.md ├── RELEASE_NOTES.md ├── build.gradle ├── doc ├── images │ ├── example-columns.png │ ├── example-dark.png │ ├── example-grid.png │ ├── example-intent.png │ └── example.png └── javadoc │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── constant-values.html │ ├── de │ └── mrapp │ │ └── android │ │ └── bottomsheet │ │ ├── BottomSheet.Builder.html │ │ ├── BottomSheet.Style.html │ │ ├── BottomSheet.html │ │ ├── OnMaximizeListener.html │ │ ├── adapter │ │ ├── DividableGridAdapter.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── animation │ │ ├── DraggableViewAnimation.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── model │ │ ├── AbstractItem.html │ │ ├── Divider.html │ │ ├── Item.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── view │ │ ├── DividableGridView.html │ │ ├── DraggableView.Callback.html │ │ ├── DraggableView.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-files │ ├── index-1.html │ ├── index-10.html │ ├── index-11.html │ ├── index-12.html │ ├── index-13.html │ ├── index-14.html │ ├── index-15.html │ ├── index-16.html │ ├── index-2.html │ ├── index-3.html │ ├── index-4.html │ ├── index-5.html │ ├── index-6.html │ ├── index-7.html │ ├── index-8.html │ └── index-9.html │ ├── index.html │ ├── overview-frame.html │ ├── overview-summary.html │ ├── overview-tree.html │ ├── package-list │ ├── script.js │ ├── serialized-form.html │ └── stylesheet.css ├── example ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── de │ │ └── mrapp │ │ └── android │ │ └── bottomsheet │ │ └── example │ │ ├── MainActivity.java │ │ └── PreferenceFragment.java │ └── res │ ├── drawable-hdpi │ ├── grid_item_dark_icon.png │ ├── grid_item_dark_icon_disabled.png │ ├── grid_item_icon.png │ ├── grid_item_icon_disabled.png │ ├── list_item_dark_icon.png │ ├── list_item_dark_icon_disabled.png │ ├── list_item_icon.png │ └── list_item_icon_disabled.png │ ├── drawable-mdpi │ ├── grid_item_dark_icon.png │ ├── grid_item_dark_icon_disabled.png │ ├── grid_item_icon.png │ ├── grid_item_icon_disabled.png │ ├── list_item_dark_icon.png │ ├── list_item_dark_icon_disabled.png │ ├── list_item_icon.png │ └── list_item_icon_disabled.png │ ├── drawable-xhdpi │ ├── grid_item_dark_icon.png │ ├── grid_item_dark_icon_disabled.png │ ├── grid_item_icon.png │ ├── grid_item_icon_disabled.png │ ├── list_item_dark_icon.png │ ├── list_item_dark_icon_disabled.png │ ├── list_item_icon.png │ └── list_item_icon_disabled.png │ ├── drawable-xxhdpi │ ├── grid_item_dark_icon.png │ ├── grid_item_dark_icon_disabled.png │ ├── grid_item_icon.png │ ├── grid_item_icon_disabled.png │ ├── list_item_dark_icon.png │ ├── list_item_dark_icon_disabled.png │ ├── list_item_icon.png │ └── list_item_icon_disabled.png │ ├── drawable-xxxhdpi │ ├── grid_item_dark_icon.png │ ├── grid_item_dark_icon_disabled.png │ ├── grid_item_icon.png │ ├── grid_item_icon_disabled.png │ ├── list_item_dark_icon.png │ ├── list_item_dark_icon_disabled.png │ ├── list_item_icon.png │ └── list_item_icon_disabled.png │ ├── drawable │ ├── grid_item.xml │ ├── grid_item_dark.xml │ ├── list_item.xml │ └── list_item_dark.xml │ ├── layout │ ├── activity_main.xml │ └── custom_view.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── values │ ├── bools.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ └── preferences.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle ├── gradle.properties ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── de │ │ └── mrapp │ │ └── android │ │ └── bottomsheet │ │ ├── BottomSheet.java │ │ ├── OnMaximizeListener.java │ │ ├── adapter │ │ └── DividableGridAdapter.java │ │ ├── animation │ │ └── DraggableViewAnimation.java │ │ ├── model │ │ ├── AbstractItem.java │ │ ├── Divider.java │ │ └── Item.java │ │ └── view │ │ ├── DividableGridView.java │ │ └── DraggableView.java │ └── res │ ├── anim │ ├── hide_bottom_sheet_animation.xml │ └── show_bottom_sheet_animation.xml │ ├── layout │ ├── bottom_sheet.xml │ ├── bottom_sheet_grid_view.xml │ ├── bottom_sheet_title.xml │ ├── divider.xml │ ├── grid_item.xml │ ├── grid_placeholder.xml │ ├── list_item.xml │ └── list_placeholder.xml │ └── values │ ├── attrs.xml │ ├── colors.xml │ ├── dimens.xml │ ├── integers.xml │ └── styles.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | .DS_Store 4 | /build 5 | .idea/ 6 | /captures 7 | *.iml -------------------------------------------------------------------------------- /RELEASE_NOTES.md: -------------------------------------------------------------------------------- 1 | # AndroidBottomSheet - RELEASE NOTES 2 | 3 | ## Version 2.0.0 (Oct. 30th 2018) 4 | 5 | A major release, which introduces the following changes: 6 | 7 | - Migrated library to Android X. 8 | - Updated dependency "AndroidUtil" to version 2.0.0. 9 | - Updated targetSdkVersion to 28. 10 | 11 | ## Version 1.4.6 (May 5th 2018) 12 | 13 | A minor release, which introduces the following changes: 14 | 15 | - Updated AppCompat v7 support library to version 27.1.1. 16 | - Updated dependency "AndroidUtil" to version 1.20.2. 17 | 18 | 19 | ## Version 1.4.5 (Jan. 26th 2018) 20 | 21 | A minor release, which introduces the following changes: 22 | 23 | - Updated `targetSdkVersion` to API level 27 (Android 8.1). 24 | - Updated dependency "AndroidUtil" to version 1.19.0. 25 | 26 | ## Version 1.4.4 (Dec. 30th 2017) 27 | 28 | A minor release, which introduces the following changes: 29 | 30 | - Updated `targetSdkVersion` to API level 26 (Android 8.0). This required to increase the minimum API level to 14. 31 | - Updated AppCompat v7 support library to version 27.0.2. 32 | - Updated dependency "AndroidUtil" to version 1.18.3. 33 | 34 | ## Version 1.4.3 (Jan. 26th 2017) 35 | 36 | A minor release, which introduces the following changes: 37 | 38 | - Updated `targetSdkVersion` to API level 25 (Android 7.1). 39 | - Updated AppCompat v7 support library to version 25.1.0. 40 | - Updated dependency "AndroidUtil" to version 1.12.3. 41 | 42 | ## Version 1.4.2 (Sep. 13th 2016) 43 | 44 | A bugfix release, which fixes the following issue: 45 | 46 | - Increased `minSdkVersion` to 9 as this is required by the AppCompat v7 support library 24.2.0. 47 | 48 | ## Version 1.4.1 (Sep. 12th 2016) 49 | 50 | A minor release, which introduces the following changes: 51 | 52 | - Updated `targetSdkVersion` to API level 24 (Android 7.0). 53 | - Updated AppCompat v7 support library to version 24.2.0. 54 | - Updated dependency "AndroidUtil" to version 1.11.1. 55 | 56 | ## Version 1.4.0 (Aug. 19th 2016) 57 | 58 | A feature release, which introduces the following changes: 59 | 60 | - The properties of a `BottomSheet` are now stored/restored in its `onSaveInstanceState`- and `onRestoreInstanceState`-method. This does not include properties, which are not serializable, e.g. listeners. 61 | - Updated dependency "AndroidUtil" to version 1.11.0. 62 | 63 | ## Version 1.3.0 (May 26th 2016) 64 | 65 | A feature release, which introduces the following changes: 66 | 67 | - It is now possible to globally change the theme, which is used by a `BottomSheet` by the default, by using the theme attribute `bottomSheetTheme`. 68 | - Updated AppCompat v7 support library to version 23.4.0. 69 | 70 | ## Version 1.2.0 (Apr. 23th 2016) 71 | 72 | A feature release, which introduces the following changes: 73 | 74 | - Each item of a `BottomSheet` is now associated with an id. This allows to reference individual items regardless of their current position. The id of an item is passed to the registered `OnItemClickListener` when it is clicked. 75 | 76 | ## Version 1.1.1 (Mar. 18th 2016) 77 | 78 | A bugfix release, which fixes the following issues: 79 | 80 | - https://github.com/michael-rapp/AndroidBottomSheet/issues/4 81 | 82 | ## Version 1.1.0 (Mar. 18th 2016) 83 | 84 | A feature release, which introduces the following changes: 85 | 86 | - A `BottomSheet`'s getter and setter methods can now also be used when the bottom sheet has not been shown yet. 87 | - Updated dependency "AndroidUtil" to version 1.4.5. 88 | - Updated AppCompat support library to version 23.2.1. 89 | 90 | ## Version 1.0.1 (Feb. 25th 2016) 91 | 92 | A minor release, which introduces the following changes: 93 | 94 | - The library is from now on distributed under the Apache License version 2.0. 95 | - Updated dependency "AndroidUtil" to version 1.4.3. 96 | - Updated AppCompat support library to version 23.2.0. 97 | 98 | ## Version 1.0.0 (Feb. 22th 2016) 99 | 100 | The first stable release, which provides a bottom sheet as a proposed by Android's Material design guidelines. The implementation initially provides the following features: 101 | 102 | - The library provides a builder, which allows to create bottom sheets by specifying a title, icon, items etc. 103 | - A bottom sheet's items can be displayed as a list, as a two-columned list or as a grid. 104 | - It is possible to separate a bottom sheet's items by adding dividers (with optional titles). 105 | - The library offers a possibility to display all applications, which are suited for handling an Intent, as a bottom sheet's items 106 | - The items of a bottom sheet can be enabled/disabled individually. 107 | - As an alternative to displaying items, a bottom sheet's items can be be replaced with a custom view. 108 | - The library comes with a dark theme in addition to the default light theme. Both themes can be modified by using theme attributes. -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | google() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:3.2.1' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | google() 15 | maven { 16 | url "https://maven.google.com" 17 | } 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /doc/images/example-columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/doc/images/example-columns.png -------------------------------------------------------------------------------- /doc/images/example-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/doc/images/example-dark.png -------------------------------------------------------------------------------- /doc/images/example-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/doc/images/example-grid.png -------------------------------------------------------------------------------- /doc/images/example-intent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/doc/images/example-intent.png -------------------------------------------------------------------------------- /doc/images/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/doc/images/example.png -------------------------------------------------------------------------------- /doc/javadoc/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/javadoc/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 |
14 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/javadoc/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Constant Field Values 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Constant Field Values

73 |

Contents

74 | 77 |
78 |
79 | 80 | 81 |

de.mrapp.*

82 | 103 |
104 | 105 |
106 | 107 | 108 |
Skip navigation links
109 | 110 | 111 | 112 | 121 |
122 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/adapter/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.adapter 7 | 8 | 9 | 10 | 11 | 12 |

de.mrapp.android.bottomsheet.adapter

13 |
14 |

Classes

15 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/adapter/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.adapter 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package de.mrapp.android.bottomsheet.adapter

73 |
74 |
75 | 94 |
95 | 96 |
97 | 98 | 99 |
Skip navigation links
100 | 101 | 102 | 103 | 112 |
113 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/adapter/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.adapter Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package de.mrapp.android.bottomsheet.adapter

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 | 91 |
92 | 93 |
94 | 95 | 96 |
Skip navigation links
97 | 98 | 99 | 100 | 109 |
110 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/animation/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.animation 7 | 8 | 9 | 10 | 11 | 12 |

de.mrapp.android.bottomsheet.animation

13 |
14 |

Classes

15 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/animation/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.animation 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package de.mrapp.android.bottomsheet.animation

73 |
74 |
75 | 94 |
95 | 96 |
97 | 98 | 99 |
Skip navigation links
100 | 101 | 102 | 103 | 112 |
113 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/animation/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.animation Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package de.mrapp.android.bottomsheet.animation

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 | 91 |
92 | 93 |
94 | 95 | 96 |
Skip navigation links
97 | 98 | 99 | 100 | 109 |
110 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/model/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.model 7 | 8 | 9 | 10 | 11 | 12 |

de.mrapp.android.bottomsheet.model

13 |
14 |

Classes

15 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/model/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.model 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package de.mrapp.android.bottomsheet.model

73 |
74 |
75 | 106 |
107 | 108 |
109 | 110 | 111 |
Skip navigation links
112 | 113 | 114 | 115 | 124 |
125 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/model/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.model Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package de.mrapp.android.bottomsheet.model

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 | 92 |
93 | 94 |
95 | 96 | 97 |
Skip navigation links
98 | 99 | 100 | 101 | 110 |
111 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet 7 | 8 | 9 | 10 | 11 | 12 |

de.mrapp.android.bottomsheet

13 |
14 |

Interfaces

15 | 18 |

Classes

19 | 23 |

Enums

24 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package de.mrapp.android.bottomsheet

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 | 92 |

Interface Hierarchy

93 | 96 |

Enum Hierarchy

97 | 108 |
109 | 110 |
111 | 112 | 113 |
Skip navigation links
114 | 115 | 116 | 117 | 126 |
127 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /doc/javadoc/de/mrapp/android/bottomsheet/view/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | de.mrapp.android.bottomsheet.view 7 | 8 | 9 | 10 | 11 | 12 |

de.mrapp.android.bottomsheet.view

13 |
14 |

Interfaces

15 | 18 |

Classes

19 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/javadoc/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Deprecated List 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Deprecated API

73 |

Contents

74 |
75 | 76 |
77 | 78 | 79 |
Skip navigation links
80 | 81 | 82 | 83 | 92 |
93 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | N-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

N

75 |
76 |
notifyOnChange(boolean) - Method in class de.mrapp.android.bottomsheet.adapter.DividableGridAdapter
77 |
78 |
Sets, whether the notifyDataSetChanged-method should be called automatically, 79 | when the adapter's items have been changed, or not.
80 |
81 |
82 | A B C D E G H I M N O P R S T V 
83 | 84 |
85 | 86 | 87 |
Skip navigation links
88 | 89 | 90 | 91 | 100 |
101 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | P-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

P

75 |
76 |
performClick() - Method in class de.mrapp.android.bottomsheet.view.DraggableView
77 |
 
78 |
79 | A B C D E G H I M N O P R S T V 
80 | 81 |
82 | 83 | 84 |
Skip navigation links
85 | 86 | 87 | 88 | 97 |
98 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-13.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

R

75 |
76 |
remove(int) - Method in class de.mrapp.android.bottomsheet.adapter.DividableGridAdapter
77 |
78 |
Removes the item at a specific index.
79 |
80 |
removeAllItems() - Method in class de.mrapp.android.bottomsheet.BottomSheet
81 |
82 |
Removes all items from the bottom sheet.
83 |
84 |
removeItem(int) - Method in class de.mrapp.android.bottomsheet.BottomSheet
85 |
86 |
Removes the item with at a specific index from the bottom sheet.
87 |
88 |
89 | A B C D E G H I M N O P R S T V 
90 | 91 |
92 | 93 | 94 |
Skip navigation links
95 | 96 | 97 | 98 | 107 |
108 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-15.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | T-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

T

75 |
76 |
toString() - Method in class de.mrapp.android.bottomsheet.model.Divider
77 |
 
78 |
toString() - Method in class de.mrapp.android.bottomsheet.model.Item
79 |
 
80 |
81 | A B C D E G H I M N O P R S T V 
82 | 83 |
84 | 85 | 86 |
Skip navigation links
87 | 88 | 89 | 90 | 99 |
100 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-16.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | V-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

V

75 |
76 |
valueOf(String) - Static method in enum de.mrapp.android.bottomsheet.BottomSheet.Style
77 |
78 |
Returns the enum constant of this type with the specified name.
79 |
80 |
values() - Static method in enum de.mrapp.android.bottomsheet.BottomSheet.Style
81 |
82 |
Returns an array containing the constants of this enum type, in 83 | the order they are declared.
84 |
85 |
86 | A B C D E G H I M N O P R S T V 
87 | 88 |
89 | 90 | 91 |
Skip navigation links
92 | 93 | 94 | 95 | 104 |
105 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | E-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

E

75 |
76 |
equals(Object) - Method in class de.mrapp.android.bottomsheet.model.AbstractItem
77 |
 
78 |
equals(Object) - Method in class de.mrapp.android.bottomsheet.model.Item
79 |
 
80 |
81 | A B C D E G H I M N O P R S T V 
82 | 83 |
84 | 85 | 86 |
Skip navigation links
87 | 88 | 89 | 90 | 99 |
100 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | H-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

H

75 |
76 |
hashCode() - Method in class de.mrapp.android.bottomsheet.model.AbstractItem
77 |
 
78 |
hashCode() - Method in class de.mrapp.android.bottomsheet.model.Item
79 |
 
80 |
hideView(boolean) - Method in class de.mrapp.android.bottomsheet.view.DraggableView
81 |
82 |
Hides the view in an animated manner.
83 |
84 |
85 | A B C D E G H I M N O P R S T V 
86 | 87 |
88 | 89 | 90 |
Skip navigation links
91 | 92 | 93 | 94 | 103 |
104 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /doc/javadoc/index-files/index-9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | M-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G H I M N O P R S T V  72 | 73 | 74 |

M

75 |
76 |
maximize() - Method in class de.mrapp.android.bottomsheet.BottomSheet.Builder
77 |
78 |
Creates a bottom sheet with the arguments, which have been supplied to the builder and 79 | immediately maximizes it.
80 |
81 |
maximize() - Method in class de.mrapp.android.bottomsheet.BottomSheet
82 |
83 |
Maximizes the bottom sheet.
84 |
85 |
maximize(Interpolator) - Method in class de.mrapp.android.bottomsheet.view.DraggableView
86 |
87 |
Maximizes the view.
88 |
89 |
90 | A B C D E G H I M N O P R S T V 
91 | 92 |
93 | 94 | 95 |
Skip navigation links
96 | 97 | 98 | 99 | 108 |
109 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /doc/javadoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Generated Documentation (Untitled) 7 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | <noscript> 69 | <div>JavaScript is disabled on your browser.</div> 70 | </noscript> 71 | <h2>Frame Alert</h2> 72 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /doc/javadoc/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview List 7 | 8 | 9 | 10 | 11 | 12 |
All Classes
13 |
14 |

Packages

15 | 22 |
23 |

 

24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/javadoc/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 |
Packages 
PackageDescription
de.mrapp.android.bottomsheet 
de.mrapp.android.bottomsheet.adapter 
de.mrapp.android.bottomsheet.animation 
de.mrapp.android.bottomsheet.model 
de.mrapp.android.bottomsheet.view 
101 |
102 | 103 |
104 | 105 | 106 |
Skip navigation links
107 | 108 | 109 | 110 | 119 |
120 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /doc/javadoc/package-list: -------------------------------------------------------------------------------- 1 | de.mrapp.android.bottomsheet 2 | de.mrapp.android.bottomsheet.adapter 3 | de.mrapp.android.bottomsheet.animation 4 | de.mrapp.android.bottomsheet.model 5 | de.mrapp.android.bottomsheet.view 6 | -------------------------------------------------------------------------------- /doc/javadoc/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /doc/javadoc/serialized-form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Serialized Form 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 |
Skip navigation links
30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Serialized Form

73 |
74 |
75 | 143 |
144 | 145 |
146 | 147 | 148 |
Skip navigation links
149 | 150 | 151 | 152 | 161 |
162 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /example/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion project.TARGET_SDK_VERSION.toInteger() 5 | buildToolsVersion project.BUILD_TOOLS_VERSION 6 | 7 | defaultConfig { 8 | minSdkVersion project.MIN_SDK_VERSION.toInteger() 9 | targetSdkVersion project.TARGET_SDK_VERSION.toInteger() 10 | versionName project.VERSION_NAME 11 | versionCode project.VERSION_CODE.toInteger() 12 | 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | api project(':library') 23 | } -------------------------------------------------------------------------------- /example/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /opt/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /example/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example/src/main/java/de/mrapp/android/bottomsheet/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 - 2018 Michael Rapp 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package de.mrapp.android.bottomsheet.example; 15 | 16 | import android.app.Fragment; 17 | import android.app.FragmentTransaction; 18 | import android.content.SharedPreferences; 19 | import android.os.Bundle; 20 | import android.preference.PreferenceManager; 21 | import androidx.appcompat.app.AppCompatActivity; 22 | 23 | /** 24 | * The main activity of the example app. 25 | * 26 | * @author Michael Rapp 27 | */ 28 | public class MainActivity extends AppCompatActivity { 29 | 30 | /** 31 | * The tag, which is used to show the activity's fragment. 32 | */ 33 | private static final String FRAGMENT_TAG = MainActivity.class.getSimpleName() + "::fragmentTag"; 34 | 35 | @Override 36 | public final void setTheme(final int resourceId) { 37 | SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); 38 | String key = getString(R.string.theme_preference_key); 39 | String defaultValue = getString(R.string.theme_preference_default_value); 40 | int theme = Integer.valueOf(sharedPreferences.getString(key, defaultValue)); 41 | 42 | if (theme != 0) { 43 | super.setTheme(R.style.DarkTheme); 44 | } else { 45 | super.setTheme(R.style.LightTheme); 46 | } 47 | } 48 | 49 | @Override 50 | protected final void onCreate(final Bundle savedInstanceState) { 51 | super.onCreate(savedInstanceState); 52 | setContentView(R.layout.activity_main); 53 | 54 | if (getFragmentManager().findFragmentByTag(FRAGMENT_TAG) == null) { 55 | Fragment fragment = Fragment.instantiate(this, PreferenceFragment.class.getName()); 56 | FragmentTransaction transaction = getFragmentManager().beginTransaction(); 57 | transaction.replace(R.id.fragment, fragment, FRAGMENT_TAG); 58 | transaction.commit(); 59 | } 60 | } 61 | 62 | } -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/grid_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/grid_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/grid_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/grid_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/grid_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/grid_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/grid_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/grid_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/list_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/list_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/list_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/list_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/list_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/list_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-hdpi/list_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-hdpi/list_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/grid_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/grid_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/grid_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/grid_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/grid_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/grid_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/grid_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/grid_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/list_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/list_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/list_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/list_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/list_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/list_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-mdpi/list_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-mdpi/list_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/grid_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/grid_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/grid_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/grid_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/grid_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/grid_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/grid_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/grid_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/list_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/list_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/list_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/list_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/list_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/list_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xhdpi/list_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xhdpi/list_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/grid_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/grid_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/grid_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/grid_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/grid_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/grid_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/grid_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/grid_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/list_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/list_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/list_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/list_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/list_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/list_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxhdpi/list_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxhdpi/list_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/grid_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/grid_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/grid_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/grid_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/grid_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/grid_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/grid_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/grid_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/list_item_dark_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/list_item_dark_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/list_item_dark_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/list_item_dark_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/list_item_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/list_item_icon.png -------------------------------------------------------------------------------- /example/src/main/res/drawable-xxxhdpi/list_item_icon_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/drawable-xxxhdpi/list_item_icon_disabled.png -------------------------------------------------------------------------------- /example/src/main/res/drawable/grid_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/grid_item_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/list_item_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /example/src/main/res/layout/custom_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /example/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/values/bools.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | true 19 | false 20 | false 21 | true 22 | false 23 | 24 | -------------------------------------------------------------------------------- /example/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | #ffd64937 19 | #ffbb4030 20 | #ffd64937 21 | 22 | -------------------------------------------------------------------------------- /example/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 128dp 19 | 20 | -------------------------------------------------------------------------------- /example/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | AndroidBottomSheet Example 18 | Divider %d 19 | Item %d 20 | This is a custom view! 21 | Item %d clicked 22 | Show example bottom sheet 23 | show_bottom_sheet_preference_key 24 | Show bottom sheet 25 | show_custom_bottom_sheet_preference_key 26 | Show bottom sheet with custom content 27 | show_intent_bottom_sheet_preference 28 | Show bottom sheet with intent 29 | Style 30 | style_preference_key 31 | Style 32 | list 33 | Title 34 | show_bottom_sheet_title_preference_key 35 | Show bottom sheet title 36 | bottom_sheet_title_preference_key 37 | Bottom sheet title 38 | Title 39 | Icon 40 | show_bottom_sheet_icon_preference_key 41 | Show bottom sheet icon 42 | Items & Dividers 43 | divider_count_key 44 | Number of dividers 45 | 0 46 | show_divider_title_preference_key 47 | Show divider title 48 | item_count_preference_key 49 | Number of items per divider 50 | 5 51 | show_item_icons_preference_key 52 | Show icons next to items 53 | disable_items_preference_key 54 | Disable items 55 | Theme 56 | theme_preference_key 57 | Theme 58 | 0 59 | 60 | 61 | List 62 | Two-columned list 63 | Grid 64 | 65 | 66 | 67 | list 68 | list_columns 69 | grid 70 | 71 | 72 | 73 | No dividers 74 | 1 Divider 75 | 2 Dividers 76 | 77 | 78 | 79 | 0 80 | 1 81 | 2 82 | 83 | 84 | 85 | 1 Items 86 | 3 Items 87 | 5 Items 88 | 89 | 90 | 91 | 1 92 | 3 93 | 5 94 | 95 | 96 | 97 | Light 98 | Dark 99 | 100 | 101 | 102 | 0 103 | 1 104 | 105 | 106 | -------------------------------------------------------------------------------- /example/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 24 | 25 | 31 | 32 | -------------------------------------------------------------------------------- /example/src/main/res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 22 | 23 | 26 | 27 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 46 | 47 | 51 | 52 | 53 | 54 | 58 | 59 | 60 | 61 | 67 | 68 | 72 | 73 | 79 | 80 | 84 | 85 | 89 | 90 | 91 | 92 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | VERSION_NAME=2.0.0 2 | VERSION_CODE=14 3 | GROUP=com.github.michael-rapp 4 | BUILD_TOOLS_VERSION=28.0.3 5 | MIN_SDK_VERSION=14 6 | TARGET_SDK_VERSION=28 7 | 8 | POM_DESCRIPTION=Provides a bottom sheet as proposed by Android's Material design guidelines. 9 | POM_URL=https://github.com/michael-rapp/AndroidBottomSheet 10 | POM_SCM_URL=https://github.com/michael-rapp/AndroidBottomSheet.git 11 | POM_SCM_CONNECTION=scm:git@github.com:michael-rapp/AndroidBottomSheet.git 12 | POM_SCM_DEV_CONNECTION=scm:git@github.com:michael-rapp/AndroidBottomSheet.git 13 | POM_LICENCE_NAME=Apache License version 2.0 14 | POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt 15 | POM_LICENCE_DIST=repo 16 | POM_DEVELOPER_ID=michael-rapp 17 | POM_DEVELOPER_NAME=Michael Rapp 18 | 19 | RELEASE_REPOSITORY_URL=https://oss.sonatype.org/service/local/staging/deploy/maven2 20 | SNAPSHOT_REPOSITORY_URL=https://oss.sonatype.org/content/repositories/snapshots 21 | 22 | android.useAndroidX=true 23 | android.enableJetifier=true 24 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michael-rapp/AndroidBottomSheet/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Oct 30 23:12:11 CET 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' 3 | 4 | android { 5 | compileSdkVersion project.TARGET_SDK_VERSION.toInteger() 6 | buildToolsVersion project.BUILD_TOOLS_VERSION 7 | 8 | defaultConfig { 9 | minSdkVersion project.MIN_SDK_VERSION.toInteger() 10 | targetSdkVersion project.TARGET_SDK_VERSION.toInteger() 11 | versionName project.VERSION_NAME 12 | versionCode project.VERSION_CODE.toInteger() 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | api 'androidx.appcompat:appcompat:1.0.0' 24 | api 'com.github.michael-rapp:android-util:2.0.0' 25 | } 26 | -------------------------------------------------------------------------------- /library/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=AndroidBottomSheet 2 | POM_ARTIFACT_ID=android-bottom-sheet 3 | POM_PACKAGING=aar 4 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /opt/android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /library/src/main/java/de/mrapp/android/bottomsheet/OnMaximizeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 - 2018 Michael Rapp 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package de.mrapp.android.bottomsheet; 15 | 16 | /** 17 | * Defines the interface, a class, which should be notified, when a bottom sheet has been maximized, 18 | * must implement. 19 | * 20 | * @author Michael Rapp 21 | * @since 1.0.0 22 | */ 23 | public interface OnMaximizeListener { 24 | 25 | /** 26 | * The method, which is invoked, when a bottom sheet has been maximized. 27 | * 28 | * @param bottomSheet 29 | * The bottom sheet, which has been maximized, as an instance of the class {@link 30 | * BottomSheet} 31 | */ 32 | void onMaximize(BottomSheet bottomSheet); 33 | 34 | } -------------------------------------------------------------------------------- /library/src/main/java/de/mrapp/android/bottomsheet/animation/DraggableViewAnimation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 - 2018 Michael Rapp 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package de.mrapp.android.bottomsheet.animation; 15 | 16 | import android.view.animation.Animation; 17 | import android.view.animation.Transformation; 18 | import android.widget.FrameLayout; 19 | 20 | import androidx.annotation.NonNull; 21 | import de.mrapp.android.bottomsheet.view.DraggableView; 22 | import de.mrapp.util.Condition; 23 | 24 | /** 25 | * An animation, which allows to show or hide a {@link DraggableView}. 26 | * 27 | * @author Michael Rapp 28 | * @since 1.0.0 29 | */ 30 | public class DraggableViewAnimation extends Animation { 31 | 32 | /** 33 | * The view, which is animated. 34 | */ 35 | private final DraggableView view; 36 | 37 | /** 38 | * The initial top margin of the animated view. 39 | */ 40 | private final int initialMargin; 41 | 42 | /** 43 | * The distance, the view should be vertically moved by in pixels. 44 | */ 45 | private final int diff; 46 | 47 | /** 48 | * Creates a new animation, which allows to show or hide a {@link DraggableView}. 49 | * 50 | * @param view 51 | * The view, which should be animated, as an instance of the class {@link 52 | * DraggableView}. The view may not be null 53 | * @param diff 54 | * The distance, the view should be vertically moved by, as an {@link Integer} value. If 55 | * the value is negative, the view's height will be increased, if it is positive, the 56 | * view's height will be increased 57 | * @param duration 58 | * The duration of the animation in milliseconds, as a {@link Long} value. The duration 59 | * may not be less than 0 60 | * @param listener 61 | * The listener, which should be notified about the animation's progress, as an instance 62 | * of the type {@link AnimationListener}. The listener may not be null 63 | */ 64 | public DraggableViewAnimation(@NonNull final DraggableView view, final int diff, 65 | final long duration, @NonNull final AnimationListener listener) { 66 | Condition.INSTANCE.ensureNotNull(view, "The view may not be null"); 67 | Condition.INSTANCE.ensureNotNull(listener, "The animation listener may not be null"); 68 | this.view = view; 69 | this.initialMargin = ((FrameLayout.LayoutParams) view.getLayoutParams()).topMargin; 70 | this.diff = diff; 71 | setDuration(duration); 72 | setAnimationListener(listener); 73 | } 74 | 75 | @Override 76 | protected final void applyTransformation(final float interpolatedTime, 77 | final Transformation transformation) { 78 | super.applyTransformation(interpolatedTime, transformation); 79 | FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) view.getLayoutParams(); 80 | layoutParams.topMargin = Math.round(initialMargin + interpolatedTime * diff); 81 | view.setLayoutParams(layoutParams); 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /library/src/main/java/de/mrapp/android/bottomsheet/model/AbstractItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 - 2018 Michael Rapp 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package de.mrapp.android.bottomsheet.model; 15 | 16 | import androidx.annotation.CallSuper; 17 | import androidx.annotation.Nullable; 18 | 19 | import java.io.Serializable; 20 | 21 | /** 22 | * An abstract base class for all items, which can be shown in a bottom sheet. 23 | * 24 | * @author Michael Rapp 25 | * @since 1.0.0 26 | */ 27 | public abstract class AbstractItem implements Serializable, Cloneable { 28 | 29 | /** 30 | * The constant serial version UID. 31 | */ 32 | private static final long serialVersionUID = 1L; 33 | 34 | /** 35 | * The item's id. 36 | */ 37 | private final int id; 38 | 39 | /** 40 | * The item's title. 41 | */ 42 | private CharSequence title; 43 | 44 | /** 45 | * Creates a new item. 46 | * 47 | * @param id 48 | * The item's id as an {@link Integer} value 49 | * @param title 50 | * The item's title as an instance of the type {@link CharSequence} or null, if no title 51 | * should be set 52 | */ 53 | public AbstractItem(final int id, @Nullable final CharSequence title) { 54 | this.id = id; 55 | this.title = title; 56 | } 57 | 58 | /** 59 | * Returns the item's id. 60 | * 61 | * @return The item's id as an {@link Integer} value 62 | */ 63 | public final int getId() { 64 | return id; 65 | } 66 | 67 | /** 68 | * Returns the item's title. 69 | * 70 | * @return The items's title as an instance of the type {@link CharSequence} or null, if no 71 | * title has been set 72 | */ 73 | public final CharSequence getTitle() { 74 | return title; 75 | } 76 | 77 | /** 78 | * Sets the item's title. 79 | * 80 | * @param title 81 | * The title, which should be set, as an instance of the type {@link CharSequence} or 82 | * null, of no title should be set 83 | */ 84 | @CallSuper 85 | public void setTitle(final CharSequence title) { 86 | this.title = title; 87 | } 88 | 89 | @CallSuper 90 | @Override 91 | public int hashCode() { 92 | final int prime = 31; 93 | int result = 1; 94 | result = prime * result + id; 95 | result = prime * result + ((title == null) ? 0 : title.hashCode()); 96 | return result; 97 | } 98 | 99 | @CallSuper 100 | @Override 101 | public boolean equals(final Object obj) { 102 | if (this == obj) 103 | return true; 104 | if (obj == null) 105 | return false; 106 | if (getClass() != obj.getClass()) 107 | return false; 108 | AbstractItem other = (AbstractItem) obj; 109 | if (id != other.id) 110 | return false; 111 | if (title == null) { 112 | if (other.title != null) 113 | return false; 114 | } else if (!title.equals(other.title)) 115 | return false; 116 | return true; 117 | } 118 | 119 | } -------------------------------------------------------------------------------- /library/src/main/java/de/mrapp/android/bottomsheet/model/Divider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 - 2018 Michael Rapp 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package de.mrapp.android.bottomsheet.model; 15 | 16 | import android.content.Context; 17 | import androidx.annotation.NonNull; 18 | import androidx.annotation.StringRes; 19 | 20 | /** 21 | * Represents a divider, which can be shown in a bottom sheet. 22 | * 23 | * @author Michael Rapp 24 | * @since 1.0.0 25 | */ 26 | public class Divider extends AbstractItem { 27 | 28 | /** 29 | * The id of dividers. 30 | */ 31 | public static final int DIVIDER_ID = -1; 32 | 33 | /** 34 | * The constant serial version UID. 35 | */ 36 | private static final long serialVersionUID = 1L; 37 | 38 | /** 39 | * Creates a new divider. 40 | */ 41 | public Divider() { 42 | super(DIVIDER_ID, null); 43 | } 44 | 45 | /** 46 | * Sets the divider's title. 47 | * 48 | * @param context 49 | * The context, which should be used, as an instance of the class {@link Context}. The 50 | * context may not be null 51 | * @param resourceId 52 | * The resource id of the title, which should be set, as an {@link Integer} value. The 53 | * resource id must correspond to a valid string resource 54 | */ 55 | public final void setTitle(@NonNull final Context context, @StringRes final int resourceId) { 56 | setTitle(context.getText(resourceId)); 57 | } 58 | 59 | @SuppressWarnings("CloneDoesntCallSuperClone") 60 | @Override 61 | public final Divider clone() { 62 | Divider clonedDivider = new Divider(); 63 | clonedDivider.setTitle(getTitle()); 64 | return clonedDivider; 65 | } 66 | 67 | @Override 68 | public final String toString() { 69 | return "Divider [title=" + getTitle() + "]"; 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /library/src/main/res/anim/hide_bottom_sheet_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 21 | -------------------------------------------------------------------------------- /library/src/main/res/anim/show_bottom_sheet_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 18 | 22 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bottom_sheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 22 | 23 | 28 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bottom_sheet_grid_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /library/src/main/res/layout/bottom_sheet_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /library/src/main/res/layout/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 20 | 21 | 27 | 28 | 41 | 42 | 49 | 50 | -------------------------------------------------------------------------------- /library/src/main/res/layout/grid_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 20 | 21 | 25 | 26 | 33 | 34 | 35 | 36 | 49 | 50 | -------------------------------------------------------------------------------- /library/src/main/res/layout/grid_placeholder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /library/src/main/res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 25 | 26 | 31 | 32 | 41 | 42 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /library/src/main/res/layout/list_placeholder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /library/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /library/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | #ffcecece 19 | #ff757575 20 | 21 | -------------------------------------------------------------------------------- /library/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 8dp 19 | 8dp 20 | 16dp 21 | 8dp 22 | 56dp 23 | 48dp 24 | 16dp 25 | 24dp 26 | 96dp 27 | 24dp 28 | 8dp 29 | 16dp 30 | 48dp 31 | 16dp 32 | 9dp 33 | 34dp 34 | 8dp 35 | 8dp 36 | 32dp 37 | 38 | 39 | 480dp 40 | 41 | -------------------------------------------------------------------------------- /library/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 300 19 | 20 | -------------------------------------------------------------------------------- /library/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 26 | 27 | 35 | 36 | 40 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':library', ':example' 2 | --------------------------------------------------------------------------------