/iOS_UI_Android

iOS UI components for android developers

Primary LanguageKotlin

IOS UI for Android

iOS UI components for android developers...

Installation

Use the package manager to install ios UI.

implementation

Usage

Ios Dialog

  binding.iosDialog.setOnClickListener {
            IOSDialog.Builder(this)
                .message("Ios dialog...")
                .enableAnimation(true)
                .build()
                .show())

Ios title Dialog

 binding.iosDialogTitle.setOnClickListener {
            IOSDialog.Builder(this)
                .message("App would like to send your notifications")
                .enableAnimation(true)
                .positiveButtonText("Allow")
                .negativeButtonText("Don't allow")
                .build()
                .show()
        }

Ios options Dialog

 binding.iosDialogOptions.setOnClickListener {
            val list = arrayListOf<IOSDialogButton>().apply {
                add(IOSDialogButton(1, "User registration", true, IOSDialogButton.TYPE_POSITIVE))
                add(IOSDialogButton(2, "User replace", true, IOSDialogButton.TYPE_POSITIVE))
                add(IOSDialogButton(3, "User delete", true, IOSDialogButton.TYPE_POSITIVE))
                add(IOSDialogButton(4, "Log out", true, IOSDialogButton.TYPE_NEGATIVE))
            }
            IOSDialog.Builder(this)
                .title("Welcome User")
                .message("Are you ready to change your data?")
                .enableAnimation(true)
                .multiOptions(true)
                .multiOptionsListeners { iosDialog, iosDialogButton ->
                    iosDialog.dismiss()
                    when (iosDialogButton.id) {
                        1 -> it.showSnackBar("User registration")
                        2 -> it.showSnackBar("User replace")
                        3 -> it.showSnackBar("User delete")
                        4 -> it.showSnackBar("Log out")
                    }
                }
                .iosDialogButtonList(list)
                .build()
                .show()
        }

Ios Switch

Usage

xml file ->

 <uz.shahzod.unzosoft.iosui_android.ui.iosSwitch.IosSwitch
            android:id="@+id/ios_switch"
            android:layout_width="55dp"
            android:layout_height="match_parent" />
 binding.iosSwitch.setOnCheckedChangeListener(object : IosSwitch.OnCheckedChangeListener {
            override fun onCheckedChanged(switchView: IosSwitch?, isChecked: Boolean) {
                switchView?.showSnackBar(isChecked.toString())
            }
        })

Ios Search bar

Usage

xml file ->

 <uz.shahzod.unzosoft.iosui_android.ui.searchBar.IosSearchBar
                style="@style/IosSearchBarStyle"
                android:id="@+id/ios_search" />
  binding.iosSearch.setOnSearchClickListener(object :IosSearchBar.OnSearchClickListener{
            override fun onSearchClick(view: View?) {
                view?.showSnackBar("Searching....")
            }
        })

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT