- Updated min Android version to 21
- Set up Spotless formatting
- Added getter for
isChecked
on theSwitchItem
- Migrated to AndroidX
- Add a bunch of Kotlin extensions/properties
- Fixed the inline call of
borderlessButton
(it was creating a button instead of a borderless button) - Updated dependencies
- Library has a new name!
- Package name has been changed to
com.guerinet.morf
- The
FormGenerator
class has been renamed toMorf
, and itsSettings
has been renamed toShape
- Added method to set an Id on a view
- Drastically simplified the view structure: objects are no longer contained within their own
LinearLayout
s - Removed all XML inflation, views are programmatically loaded instead
- Added method to set height and width directly without needing to pass
LayoutParams
- Added methods on the items of type
EditText
to set text/number input types directly - Added the
Layout
utility class, with aliases forWRAP_CONTENT
andMATCH_PARENT
to set these properties more concisely - Fixed bug where inline functions would not automatically build the view at the end
- Removed need to call
build()
on space and line items - Calling
build()
multiple times on the same object will no longer crash the app
- Fixed bug where drawable wasn't being mutated before setting the alpha on it, causing it to disappear in some cases
- Bumped min version to 17
- Library is now in Kotlin!
- Library structure has been entirely reworked to remove code duplication
- Package name has changed to
com.guerinet.fg
- All items have been renamed to remove the word 'Form' from them
FormGenerator.Builder
has been renamed toFormGenerator.Settings
Settings
can be prepared using a DSL in Kotlin- Form items can be prepared using a DSL in Kotlin
- Created programmatic instantiations of the
SpaceItem
andLineItem
- Icons now use relative positioning, and require a
Position
variable (as opposed to having one method per position) - Icons
Drawable
s can now be set directly (as opposed to using a resource Id) LineItem
s andSpaceItem
s now need to callbuild()
as well- Added a
TextWatcher
to allInputItem
s and descendants - Added options to set line heights, space heights, view padding, and drawable padding in pixels, DP, or using a dimension resource Id
- Added options to set some colors using Ids or resolved colors
- Text size is now set using an Id for all
TextViewItem
s and descendants - Support libraries have been updated to use the latest versions
- Removed the setting of the default background on the
TextInputFormItem
- Fixed the instantiation of a
TextInputFormItem
- New: Fixed the constructors to use the view context as opposed to asking for a context
- New: Added
focusable()
for most of the items to set their focusable property - New: Switched
background()
on theTextInputFormItem
+ subclasses to set the background resource on the input layout
- New: Added
enabled()
for most of the items to enable/disable them
- New: Added the
AutoCompleteTextViewFormItem
- Fixed the
onClick
method forEditTextFormItem
s
- New: Added the
TextInputFormItem
, forTextInputLayout
s - New: Added methods to retrieve the text within the
EditText
s - Breaking: All form items no longer take a text as an input. You now set the text with
text()
- New: Added method to update the icons without rebuilding the form item
- Update: Removed method added in v2.2.3
- New: Added method to add a custom view to a form
- Update: Fixed icon setting and tinting on pre-Lollipop
- New: Added method to remove the single line property of the text form items
- Update: Removed
singleLine()
from the text form items since by default it's already true
- Update: Brought back the default line size (0.5dp) and the default space size (8dp)
- New: Added default drawable padding to the Builder
- New: Added
build()
to build the views to avoid having to reset the icons every time we add a new one - New: Added method to set form item visibility
- New: Added method to get the parent view (a.k.a. the whole form item)
- New: Added method to set the layout params and layout gravity of most form items (not line or space)
- New: New custom
OnClickListener
implementation to have a reference to the form item inonClick()
- Update:
ButtonFormItem
constructor no longer takes theOnClickListener
in the constructor - Update: Using resolved colors for icon tinting
- Update: Using resolved colors for text coloring
- Update: Using pixels for space size
- Update: Using pixels for padding size
- Update: Using pixels for text size
- Update: Using pixels for line size
- Fix: Now using the Application Context to tint a drawable to avoid memory leaks
- Update: Removed
setSingleLine()
from EditTextFormItem since it was a duplicate
- Fix: Fixed bug where app would crash when the default color Id was not set
- Added the borderless button
- Fixed bug where the icon drawable was no longer being mutated when set
- Added the possibility to initialize TextViewFormItems or its descendants with a string resource Id
- Added gravity to the form items
- Now using Drawable tinting instead of a color filter to color the icons
- Added the single line option to the form items with a text field
- Added the single line option to the EditTextFormItem
- Added the ellipsize option to the form items with a text field
- Completely reworked the
get()
,set()
, andbind()
methods to make it more clear (see README for more info) - Added the on and off text on the SwitchFormItem
- Added method to initialize a new Builder instance from an old one, allowing you to base a Builder instance from your default one
- ButtonFormItem no longer inherits the default background
- Updated dependencies
- Fixed bug where some super class methods for the form items were not overridden
- Builder no longer depends on the LayoutInflater and a container, only the FormGenerator does
- Added possibility to customize the space color
- Added possibility to customize the input background
- Added possibility to set the backgrounds for any form item (except the lines) to @null
- Reworked how the views were created and added to the container: each specific view can now be customized independently of the default settings
- Added possibility to deconstruct a FormGenerator back into a Builder
- Added demo project to demonstrate library capabilities
- Added possibility to customize the text size
- Added possibility to customize the typeface
- Set up singleton logic and possibility to set default instance
- Added Sources
- Bug Fixes
- Initial Release