๐ŸŽจA Jetpack Compose searchable drop down menu library

Overview

Searchable-Dropdown-Menu-Jetpack-Compose


๐Ÿš€ A Jetpack Compose Android Library to create a dropdown menu that is searchable.


License API Build Status Build Status


How to include it into your project

Step 1. Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.Breens-Mbaka:Searchable-Dropdown-Menu-Jetpack-Compose:0.2.1'
}

Usage

val sports = mutableListOf("Basketball", "Rugby", "Football", "MMA", "Motorsport", "Snooker", "Tennis")

SearchableExpandedDropDownMenu(
listOfItems = sports // provide the list of items you want to populated in the dropdown,
modifier = Modifier.fillMaxWidth(),
onDropDownItemSelected = { item -> // Returns the item selected in the dropdown
    Toast.makeText(applicationContext, item, Toast.LENGTH_SHORT).show()
    },
placeholder = "Select option" // Add your preferred placeholder name,
openedIcon = // Add your preffered icon when the dropdown is opened,
closedIcon = // Add your preffered icon when the dropdown is closed,
parentTextFieldCornerRadius = // By default the corner radius is 12.dp but you can customize it,
colors = // Customize the colors of the input text, background and content used in a text field in different states,

)

License

Copyright 2022 Breens-Mbaka

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
imitate Tumblr's menu, dragging animations look like a snake
imitate Tumblr's menu, dragging animations look like a snake

android-snake-menu imitate Tumblr's menu, dragging animations look like a snake unexpected episode I found another repository some time ago which impl

A menu which can ... BOOM! - Android
A menu which can ... BOOM! - Android

BoomMenu 2.0.0 Comes Finally Approximately 8 months ago, I got an inspiration to creating something that can boom and show menu, which I named it Boom

:fire: The powerful and easiest way to implement modern material popup menu.
:fire: The powerful and easiest way to implement modern material popup menu.

PowerMenu ๐Ÿ”ฅ The powerful and easiest way to implement modern material popup menu. PowerMenu can be fully customized and used for popup dialogs. Downl

** A slide-out menu implementation, which allows users to navigate between views in your app.

MenuDrawer A slide-out menu implementation, which allows users to navigate between views in your app. Most commonly the menu is revealed by either dra

Android Satellite Menu
Android Satellite Menu

#Satellite Menu 'Path' has a very attractive menu sitting on the left bottom corner of the screen. Satellite Menu is the open version of this menu. Fo

An android custom view which looks like the menu in Path 2.0 (for iOS).

ArcMenu & RayMenu ArcMenu An android custom view which looks like the menu in Path 2.0 (for iOS). RayMenu About The user experience in Path 2.0 (for i

Tap Bar Menu
Tap Bar Menu

TapBar Menu Simple library that helps creating a "Tap Bar" menu layout. Demo 1: https://youtu.be/DjY0cTWWtao Demo 2: https://youtu.be/dWuPMN6WTOY Inst

(UNMAINTAINED) An implemention of  Filter Menu concept for android
(UNMAINTAINED) An implemention of Filter Menu concept for android

FilterMenu This is a library project with a custom view that implements concept of Filter Menu(https://dribbble.com/shots/1956586-Filter-Menu) made by

Navigation menu for Android (based off Google+ app)
Navigation menu for Android (based off Google+ app)

RibbonMenu Navigation menu for Android (based on Google+ app). Usage Menus are created in xml as normal, adding text and an icon. In the layout you wa

Comments
  • Searchable dropdown crashes when its put inside a lazy column

    Searchable dropdown crashes when its put inside a lazy column

    The cause of this issue is nesting of layouts which are scrollable in the same direction.

    Below is the crash error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.dlight.atlas.debug, PID: 26372 java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed. One of the common reasons is nesting layouts like LazyColumn and Column(Modifier.verticalScroll()). If you want to add a header before the list of items please add a header as a separate item() before the main items() inside the LazyColumn scope. There are could be other reasons for this to happen: your ComposeView was added into a LinearLayout with some weight, you applied Modifier.wrapContentSize(unbounded = true) or wrote a custom layout. Please try to remove the source of infinite constraints in the hierarchy above the scrolling container.

    bug 
    opened by Breens-Mbaka 0
  • When you have two Dropdowns that Are dependent on each other, they don't change value automatically

    When you have two Dropdowns that Are dependent on each other, they don't change value automatically

    Describe the bug Lets take an example when you have two dropdowns and the second dropdown is dependent of the first one, when you select a value from the first one and also select a value from the second one, when you go back to the first one and make a change, the second one still have some stale data.

    bug 
    opened by JoelKanyi 0
Releases(0.2.4)
  • 0.2.4(Nov 20, 2022)

  • 0.2.2(Nov 19, 2022)

    What's Changed

    • Add documentation to capture all the parameters used

    Full Changelog:https://github.com/Breens-Mbaka/Searchable-Dropdown-Menu-Jetpack-Compose/compare/0.2.1...0.2.2

    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Nov 17, 2022)

    What's Changed

    • Documentation by @Carrieukie in https://github.com/Breens-Mbaka/Searchable-Dropdown-Menu-Jetpack-Compose/pull/8
    • Specify the maxHeight for the dropdown-menu by @JoelKanyi in https://github.com/Breens-Mbaka/Searchable-Dropdown-Menu-Jetpack-Compose/pull/11

    Full Changelog: https://github.com/Breens-Mbaka/Searchable-Dropdown-Menu-Jetpack-Compose/compare/0.2.0-beta01...v0.2.1

    Source code(tar.gz)
    Source code(zip)
  • 0.2.0-beta01(Nov 14, 2022)

    ๐Ÿ˜Ž Generify searchable dropdown to accept a list of objects of all types

    This release introduces the ability to accept lists of all types and not only strings as in the earlier versions. Also there is bug fix on the searchable dropdown crashing when wrapped in a lazy column

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1-beta01(Nov 14, 2022)

  • 0.1.0-beta01(Nov 13, 2022)

Owner
Breens Robert
Android Dev | Author
Breens Robert
๐Ÿš€ A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

Rasheed Sulayman 26 Jul 17, 2022
Floating Action Menu for Android. Inspired by the Google Plus floating menu

android-floating-action-menu Floating Action Menu for Android. Inspired by the Google Plus floating menu. Demo Setup The simplest way to use this libr

Alessandro Crugnola 242 Nov 10, 2022
Classic Power Menu is a Power Menu Replacement for Android 11+

Classic Power Menu is a Power Menu Replacement for Android 11+, with the main aim being restoring power menu options (Device Controls & Quick Access Wallet) on Android 12.

Kieron Quinn 375 Nov 26, 2022
๐Ÿ’ง A customizable jetpack compose dropdown menu with cascade and animations

Dropdown ?? A customizable jetpack compose dropdown menu with cascade and animations. Who's using Dropdown? ?? Check out who's using Dropdown Include

Ranbir Singh 183 Nov 24, 2022
Android-NewPopupMenu 3.9 0.0 Java is an android library to create popup menu with GoogleMusic app-like style.

Android-NewPopupMenu Android-NewPopupMenu is an android library to create popup menu with GoogleMusic app-like style. Requirements Tested with APIv4 H

u1aryz 159 Nov 21, 2022
A floating menu library for Android.

Hover Hover is a floating menu implementation for Android. Goals The goals of Hover are to: Provide an easy-to-use, out-of-the-box floating menu imple

Google 2.7k Nov 11, 2022
an animated circular menu for Android

CircularFloatingActionMenu An animated, customizable circular floating menu for Android, inspired by Path app. Getting Started Requirements API >= 15

OฤŸuz Bilgener 2.7k Nov 20, 2022
Side menu with some categories to choose.

Side Menu Side menu with some categories to choose. Check this project on dribbble. Check this project on Behance. God bless Ukraine! Sample Sample &

Yalantis 5.2k Nov 24, 2022
You can easily add awesome animated context menu to your app.

ContextMenu You can easily add awesome animated context menu to your app. Check this project on dribbble Check this project on Behance Usage: For a wo

Yalantis 3.8k Nov 21, 2022