All Projects → Chivorns → Smartmaterialspinner

Chivorns / Smartmaterialspinner

Licence: other
The powerful android spinner library for your application

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Smartmaterialspinner

Materialspinner
Implementation of a Material Spinner for Android with TextInputLayout functionalities
Stars: ✭ 107 (-0.93%)
Mutual labels:  material-design, material, dropdown, spinner
Vue Cool Select
Select with autocomplete, slots, bootstrap and material design themes.
Stars: ✭ 195 (+80.56%)
Mutual labels:  search, material-design, autocomplete
Angular Search Experience
Algolia + Angular = 🔥🔥🔥
Stars: ✭ 167 (+54.63%)
Mutual labels:  search, material-design, autocomplete
Md2
Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Collapse, Colorpicker, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
Stars: ✭ 389 (+260.19%)
Mutual labels:  material-design, material, autocomplete
Dynamic Toasts
Custom toasts with color and icon for Android.
Stars: ✭ 132 (+22.22%)
Mutual labels:  library, material-design, hint
Dynamic Support
A complete library to build Android apps with a built-in theme engine.
Stars: ✭ 218 (+101.85%)
Mutual labels:  library, material-design, color
Autocomplete.js
Simple autocomplete pure vanilla Javascript library.
Stars: ✭ 3,428 (+3074.07%)
Mutual labels:  search, autocomplete, dropdown
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+15233.33%)
Mutual labels:  library, material-design, material
Textfieldboxes
Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.
Stars: ✭ 760 (+603.7%)
Mutual labels:  library, material-design, material
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+722.22%)
Mutual labels:  library, material-design, material
Materialspinner
A spinner view for Android
Stars: ✭ 1,173 (+986.11%)
Mutual labels:  material-design, dropdown, spinner
React Selectrix
A beautiful, materialized and flexible React Select control
Stars: ✭ 166 (+53.7%)
Mutual labels:  material-design, autocomplete, dropdown
Google Maps Autocomplete
Autocomplete input component and directive for google-maps built with angular and material design | ANGULAR V9 SUPPORTED
Stars: ✭ 134 (+24.07%)
Mutual labels:  material-design, material, autocomplete
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (+104.63%)
Mutual labels:  library, material-design, material
Jtmaterialspinner
An iOS material design spinner view
Stars: ✭ 127 (+17.59%)
Mutual labels:  material-design, material, spinner
Materialdesignextensions
Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps
Stars: ✭ 516 (+377.78%)
Mutual labels:  material-design, material, autocomplete
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+1074.07%)
Mutual labels:  search, autocomplete, dropdown
Cyanea
A theme engine for Android
Stars: ✭ 1,319 (+1121.3%)
Mutual labels:  material-design, material, color
Kivymd
Set of widgets for Kivy inspired by Google's Material Design.
Stars: ✭ 107 (-0.93%)
Mutual labels:  library, material-design
Colored
🎨 Mirror of colored library repository
Stars: ✭ 98 (-9.26%)
Mutual labels:  library, color

SmartMaterialSpinner

The best Android spinner library for your android application with more customization

Current version

Legacy (See usage)

Android Legacy

AndroidX (See usage)

AndroidX

Available on Play Store

Play Store

Available features

Spinner mode

  • Dropdown mode ( android:spinnerMode="dropdown" ). By default it is dropdown mode
  • Dialog mode ( android:spinnerMode="dialog" )
  • Searchable mode ( app:smsp_isSearchable="true" )

Searchable spinner

  • smsp_isSearchable : Default is false. Set it to true to enable this feature.
  • smsp_enableSearchHeader: Default is true. Set it to false to hide search header.
  • smsp_searchHeaderText: Text display as header text
  • smsp_searchHeaderTextColor: For changing header text color
  • smsp_searchHeaderBackgroundColor: For changing header background color
  • smsp_searchHint: To set query text hint
  • smsp_searchHintColor: To set hint color to query search text
  • smsp_searchTextColor: To set color to query search text
  • smsp_searchBackgroundColor: To set background color to searchview
  • smsp_itemListBackgroundColor: To set background color to search item list
  • smsp_enableDismissSearch: To enable/disable dismiss button on search dialog
  • smsp_dismissSearchText: To set dismiss button text for search dialog
  • smsp_dismissSearchColor: To set dismiss button text color for search dialog

Spinner item

  • smsp_itemSize: To set spinner item size
  • smsp_itemColor: To set spinner item color

Hint Label

  • smsp_hint: To set spinner hint text
  • smsp_hintSize: To set spinner hint text size
  • smsp_hintColor: To set spinner hint color
  • smsp_itemListHintColor: To set spinner hint text color (dropdown hint)
  • smsp_itemListHintBackgroundColor: To set spinner hint background (dropdown hint)

Floating Label

  • smsp_enableFloatingLabel: Default is true. Set it to false to disable floating label.
  • smsp_alwaysShowFloatingLabel: Default is false. Set it to true for always display.
  • smsp_floatingLabelText: Update it to what text you want. If the value is not set, it get from hint.
  • smsp_floatingLabelSize: For changing floating label size
  • smsp_floatingLabelColor: For changing floating label color

Error Label

  • smsp_enableErrorLabel: Default it is true.
  • smsp_errorText: Your error message text.
  • smsp_errorTextSize: For changing error text size
  • smsp_errorTextColor: for changing error text color
  • smsp_multilineError: Default is false. Update it to show as single line or multiple line
  • smsp_errorTextAlignment: Align error text to left, center or right

Color customization to:

  • Item text color (smsp_itemColor)
  • Hint color (smsp_hintColor)
  • Floating Label color (smsp_floatingLabelColor)
  • Error Text color (smsp_errorTextColor)
  • List Item Hint color and background (smsp_itemListHintColor & smsp_itemListHintBackgroundColor)
  • List Item color (smsp_itemListColor)
  • Selected item color (smsp_selectedItemListColor)
  • Arrow or selector color (smsp_arrowColor)
  • Underline color (smsp_underlineColor)
  • Dropdown list/Search ListView background (smsp_itemListBackgroundColor)
  • Search dialog dismiss button color (smsp_dismissSearchColor)

Empty dropdown clickable

  • In case if you want to design view with empty spinner and apply click event and here it is.

Underline

  • smsp_underlineSize: To set underline size (The bottom line of spinner)
  • smsp_underlineColor: To set underline color (The bottom line of spinner)

Re-selectable feature

  • smsp_isReSelectable: Allow re-selectable for current selected item. By default it is false

RTL (Right To Left) feature

  • smsp_isRtl: To change position of view from right to left or left to right. I will update more on it.

Typeface (Custom font)

  • smsp_typeface: Apply custom font to whole spinner view. You can use this attr without specify font extension
  • smsp_typeface_xxx: Set typeface to specific part of spinner

Screenshot Demo

SmartMaterialSpinner SmartMaterialSpinner SmartMaterialSpinner
SmartMaterialSpinner SmartMaterialSpinner SmartMaterialSpinner

Usage

Add the dependencies to your gradle file:

Legacy Project

dependencies {
    implementation 'com.github.chivorns:smartmaterialspinner:1.2.1'
}

AndroidX Project

dependencies {
    implementation 'com.github.chivorns.androidx:smartmaterialspinner:1.2.1'
}

Add SmartMaterialSpinner to your layout:

    <com.chivorn.smartmaterialspinner.SmartMaterialSpinner
        android:id="@+id/spinner1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:smsp_errorText="This is error text. You can show it as single line or multiple lines using attr smsp_multilineError"
        app:smsp_floatingLabelColor="#1976D2"
        app:smsp_floatingLabelText="Floating Label Text"
        app:smsp_hint="Hint Text"
        app:smsp_hintColor="#388E3C"
        app:smsp_itemColor="#512DA8"
        app:smsp_itemListColor="#7C4DFF"
        app:smsp_itemListHintBackgroundColor="#808080"
        app:smsp_itemListHintColor="#FFFFFF"
        app:smsp_multilineError="false"
        app:smsp_selectedItemListColor="#FF5252" />

In Java class

public class MainActivity extends AppCompatActivity {

    private SmartMaterialSpinner spProvince;
    private SmartMaterialSpinner spEmptyItem;
    private List<String> provinceList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.smart_material_spinner_sample_layout);

        initSpinner();
    }

    private void initSpinner() {
        spProvince = findViewById(R.id.sp_provinces);
        spEmptyItem = findViewById(R.id.sp_empty_item);
        provinceList = new ArrayList<>();

        provinceList.add("Kampong Thom");
        provinceList.add("Kampong Cham");
        provinceList.add("Kampong Chhnang");
        provinceList.add("Phnom Penh");
        provinceList.add("Kandal");
        provinceList.add("Kampot");

        spProvince.setItem(provinceList);

        spProvince.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
                Toast.makeText(MainActivity.this, provinceList.get(position), Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {
            }
        });
    }
}

In Kotlin class

class MainActivity : AppCompatActivity() {
    private var spProvince: SmartMaterialSpinner? = null
    private var spEmptyItem: SmartMaterialSpinner? = null
    private var provinceList: MutableList<String>? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.smart_material_spinner_sample_layout)

        initSpinner()
    }

    private fun initSpinner() {
        spProvince = findViewById(R.id.sp_provinces)
        spEmptyItem = findViewById(R.id.sp_empty_item)
        provinceList = ArrayList()

        provinceList!!.add("Kampong Thom")
        provinceList!!.add("Kampong Cham")
        provinceList!!.add("Kampong Chhnang")
        provinceList!!.add("Phnom Penh")
        provinceList!!.add("Kandal")
        provinceList!!.add("Kampot")

        spProvince!!.setItem<Any>(provinceList!!)

        spProvince!!.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
            override fun onItemSelected(adapterView: AdapterView<*>, view: View, position: Int, id: Long) {
                Toast.makeText(this@MainActivity, provinceList!![position], Toast.LENGTH_SHORT).show()
            }

            override fun onNothingSelected(adapterView: AdapterView<*>) {}
        }
    }
}

Issue and new feature request

Note

Each raised issue, should be provided with some information to be easy for me to replicate it like Device Model, Android version and log message or file

Where to report issue and new feature request

You can create issue on Github to record issue history then to make it fast alert to me, you can send me email or post to Facebook group for any discussion

Contribution

If you want to contribute in this library, please fork this repository and create pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].