diff --git a/README.md b/README.md index 28a438c..8768138 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,37 @@ -icon +

+icon +

-# Dropsy -Simple dropdown/spinner view for Android. +

DROPSY

+

+Simple dropdown/spinner view for Android +

- - demo - +

+Jitpack +API +License +

+ +

+ demo +

+
+ +## Gradle +Add it in your top-level `build.gradle`: +``` +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } +} +``` +Add the dependency to app-level `build.gradle`: +``` +implementation 'com.github.qandeelabbassi:Dropsy:1.0' +``` ## Usage :point_right: Add the Dropsy's `DropDownView` view in XML layout like this: @@ -28,7 +54,7 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) // set listener - findViewById(R.id.dropdown_fruits).setItemClickListener { i, item -> + dropdown_fruits.setItemClickListener { i, item -> Toast.makeText(this, "${item.text} clicked at index $i", Toast.LENGTH_SHORT).show() } } @@ -40,6 +66,6 @@ btn_show.setOnClickListener { dropdown_fruits.showDropdown() } btn_hide.setOnClickListener { dropdown_fruits.hideDropdown() } ``` -## Sample App Screenshot: +## Sample App Screenshot - \ No newline at end of file +