iOS UI components for android developers...
Use the package manager to install ios UI.
implementation
binding.iosDialog.setOnClickListener {
IOSDialog.Builder(this)
.message("Ios dialog...")
.enableAnimation(true)
.build()
.show())
binding.iosDialogTitle.setOnClickListener {
IOSDialog.Builder(this)
.message("App would like to send your notifications")
.enableAnimation(true)
.positiveButtonText("Allow")
.negativeButtonText("Don't allow")
.build()
.show()
}
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()
}
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())
}
})
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....")
}
})
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.