Guacamole is a library to build forms dynamically in android.
Each of the components has the following properties: icon, title, and subTitle.
val titleText = TitlePreference("title")
titleText.title = "Text"
Creates a single line text editor in alert.
val titlePref = TextPreference("titlePref")
titlePref.title = "Title"
titlePref.subTitle = "Lorem Ipsum"
Creates a multi line text editor.
val descriptionPref = DescriptionPreference("descriptionPref")
descriptionPref.title = "Description"
descriptionPref.subTitle = "Lorem Ipsum"
Creates a multi line text editor.
val descriptionPref = DescriptionPreference("descriptionPref")
descriptionPref.title = "Description"
descriptionPref.subTitle = "Lorem Ipsum"
val categoryPref = SingleListPreference("categoryPref")
categoryPref.itemList = arrayOf("A", "B", "C", "D", "E", "F", "G")
categoryPref.title = "Category"
categoryPref.alertButton = "Save"
categoryPref.selectedItem = 3
val weeksPref = MultiListPreference("categoryPref")
weeksPref.title = "Working days"
weeksPref.alertButton = "Save"
weeksPref.itemList = hashMapOf(
"Monday" to true,
"Tuesday" to true,
"Wednesday" to false,
"Thursday" to false,
"Friday" to false,
"Saturday" to true,
"Saturday" to false,
"Sunday" to true
)
val datePickerPref = DatePickerPreference("datePickerPref")
datePickerPref.title = "Date"
datePickerPref.year = 1995
datePickerPref.month = 1
datePickerPref.month = 25
val fromTimePickerPref = TimePickerPreference("timePickerPref")
fromTimePickerPref.title = "From"
fromTimePickerPref.hours = 22
fromTimePickerPref.minutes = 22
val statusPref = SwitchPreference("statusPref")
statusPref.title = "Status"
statusPref.subTitle = "Lorem Ipsum"
statusPref.statusOff = "Inactive"
statusPref.statusOn = "Active"
val checkPref = CheckBoxPreference("statusPref")
checkPref.title = "Status"
checkPref.subTitle = "Lorem Ipsum"