Android library to provide a sticky side menu with options in form of bubbles.
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
dependencies {
implementation 'com.github.JonathandelaSen:SideBubbles:0.0.7'
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.JonathandelaSen</groupId>
<artifactId>SideBubbles</artifactId>
<version>Tag</version>
</dependency>
Set the layout
<devjdelasen.com.sidebubbles.SideBubbles
android:id="@+id/sideBubbles"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="36dp"
app:side_bubbles_bg_color="@color/colorAccent"
app:side_bubbles_menu_color="@color/white"
/>
Set the bubbles
sideBubbles.addItem("chat", R.drawable.ic_chat, ContextCompat.getColor(this, R.color.colorAccent))
sideBubbles.addItem("geo", R.drawable.ic_geo, ContextCompat.getColor(this, R.color.colorAccent))
sideBubbles.addItem("ice_cream", R.drawable.ic_ice_cream)
sideBubbles.setClickItemListener(object: SideBubbles.OnClickItemListener {
override fun onClickItem(id: String) {
Toast.makeText(this@MainActivity, id, Toast.LENGTH_SHORT).show()
}
})
- Click to open
- Long click and slide to select
- Different animations
- Left side support
👨🏻💻 Jonnie