• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Searchable-Dropdown-Menu-Jetpack-Compose


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


Google
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.8'
}

โš ๏ธ NOTE:

  • To use the current version of the library please make sure you add material 3 dependency in your app level module. This will be fixed in the next update.
  • Alternatively, you can use a previous version of the library so as to avoid this workaround.

Usage

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

SearchableExpandedDropDownMenu(
listOfItems = sports // provide the list of items of any type 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()
    },
enable = // controls the enabled state of the OutlinedTextField
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
dropdownItem = { name -> // Provide a Composable that will be used to populate the dropdown and that takes a type i.e String,Int or even a custom type
      Text(name)
   },
)

Who's using Searchable-Dropdown-Menu-Jetpack-Compose?

If your project uses Searchable-Dropdown-Menu-Jetpack-Compose, please let me know by creating a new issue! ๐Ÿ˜Š

Inspiration

The library was majorly created out of necessity at work by my colleagues and I, since they isn't an out of the box solution in Jetpack compose to have a searchable dropdown menu.

Find this repository useful? โค๏ธ

Support it by joining stargazers for this repository. โญ
Also follow me for my next creations! ๐Ÿคฉ

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.

More Repositories

1

Jetpack-Compose-Tables

๐Ÿ A Compose UI data table library which allows developers to seamless integrate visually appealing and customizable tables to their Android apps or IOS apps.
Kotlin
114
star
2

Youtube-Clone

This is an Android Youtube Clone made out of XML and Kotlin. I have a tutorial on this if you want to see explanation behind how I did things https://youtu.be/pfEwCn7xmPI
Kotlin
55
star
3

AnimeFollowKMM

An app that allows you to discover anime built with Kotlin Multiplatform Mobile which allows sharing of both UI and logic between the Android and IOS platforms ๐Ÿ“ฑ
Kotlin
46
star
4

Floaty

Floaty is a customizable floating widget for your Android apps that allows you to add a floating widget to your app's interface.
Kotlin
35
star
5

JetpackCompose-LiveScoreApp-MVVM

This is a footballโšฝ๏ธ livescore app made with Jetpack Compose App that consumes the data from SportData API. Watch tutorial down below ๐Ÿ‘‡
Kotlin
26
star
6

JetPackComposeEcommerceApp

E- commerce app๐Ÿ‘• built with Jetpack Compose and Compose Destinations. The design was inspired by Sajjad Mohammadi Nia
Kotlin
24
star
7

MVVM-Dictionary-App

An Android dictionary app ๐Ÿ“šbuilt using Jetpack Compose this is used as an example project in the MVVM Crash, check it out ๐Ÿ‘‡
Kotlin
18
star
8

MpesaUiCloneAndroid

This is a clone of the new Mpesa app that was released last year. Its built with Kotlin and XML
Kotlin
16
star
9

Github-App

An Android App that allows a user to search for Github profiles
Kotlin
15
star
10

Meditation-App

A meditation ui implementation using Jetpack Compose
Kotlin
14
star
11

RapidScore

A reliable android app that shows upcoming fixtures, updated league tables, and top goal scorers in a Premier League and French Ligue 1
Kotlin
14
star
12

MVI-Firestore-Todo-App

A Todo app built with MVI architecture and its tasks are saved in a Cloud Firestore database. This was used as an example project in this video course https://www.youtube.com/playlist?list=PLA7YMGupLhlGdLMlZQUuplhUfnTQUWxTc
Kotlin
14
star
13

Jetpack-Compose-UI-Concepts-Implementation

This repository contains all the UI concepts that learners will learn during the Youtube tutorials where they try to implement UI designs ๐ŸŽจ using Jetpack Compose.
Kotlin
8
star
14

Youtube-Shorts-Animation-Jetpack-Compose

A Youtube Shorts video playing animation by Jetpack Compose
Kotlin
7
star
15

DSCNavigationComponents-session

DSC Moi University session on using Navigation components to simplify creating navigation flow in our apps to use best practices recommended by the Google Android Team
Kotlin
7
star
16

Youtube-Android-Clone-Starter

Kotlin
6
star
17

Adanian-Labs-Android-Test

A simple app to fetch and search images using the Pixabay API built with MVVM Design Pattern
Kotlin
5
star
18

Swipe-To-Refresh-Jetpack-Compose

Implement swipe to refresh ๐Ÿ”„ layout in Jetpack Compose
Kotlin
5
star
19

Random-Fact-Generator

A random fact generator Android app, to learn the ins and out of the Navigation Compose Component Library ๐Ÿงญ
Kotlin
4
star
20

Sleep-Monk

Is a mobile application that tracks a user's sleeping pattern based on their wake up time, their sleep time and the duration of sleep.
Java
4
star
21

Save-Files

A sample project to demonstrate how to save and retrieve files from the external storage in Android
Kotlin
4
star
22

Whatsapp-Status-Saver

An app to allow saving of WhatsApp images and videos statuses ๐ŸŒ ๐ŸŽฅ
Kotlin
3
star
23

Android12SplashApi

Android 12 Splash Api
Kotlin
2
star
24

Splash-Screen-API

A project reference for a tutorial I made about new Splash Screen API
Kotlin
2
star
25

Stock-tracker

Stock tracker is an Android application where I'm able to track stocks,cryptocurrency and foreign exchange in real-time
Java
2
star
26

MovieApp

Kotlin
2
star
27

Rounded-Buttons

An effective way to customise your buttons from one place without much hustle๐Ÿ˜
Kotlin
2
star
28

Custom-App-Bar-Android-Kotlin

Customise your action bar to any way you would love to
Kotlin
2
star
29

ExoplayerPractice

Play media files i.e audio, video using Exoplayer
Kotlin
2
star
30

Detect-Screenshots-

This app uses the screenshot detection API introduced in Android 14.
Kotlin
2
star
31

Record-Videos

A sample project to demonstrate how to record videos using inbuilt camera app.
Kotlin
2
star
32

Breens-Mbaka

1
star
33

Firebase-App-Distribution-Practice

Kotlin
1
star
34

Mita-Maji

Dart
1
star
35

HiltDependencyInjection

Kotlin
1
star
36

Rounded-Buttons-Starter-Code

starter code
Kotlin
1
star
37

Custom-App-Bar-Starter-Code

This is the started code for the custom app bar tutorial
Kotlin
1
star
38

Automatically-Move-To-Next-Textfield

A sample project to demonstrate how to automatically move to the next text field in a Jetpack Compose form
Kotlin
1
star
39

My-Posts

A sample app to demonstrate the CRUD operations using Retrofit
Kotlin
1
star