File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
codekit/src/main/java/com/ctrlbytes/codekit/ktx Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,23 @@ toast(stringRes|string)
6060toast(stringRes|string, LENGTH_SHORT )
6161```
6262
63- ### TextInputLayout
63+ ### TextInputLayout KTX
6464``` kotlin
6565getValue()
6666setValue(string)
6767clear()
6868```
6969
70- ### View
70+ ### View KTX
7171``` kotlin
7272hide() // visibility gone by default
7373hide(VISIBLE |GONE ) // or specify
7474show() // visibility visible
75+ ```
76+
77+ ### Date KTX
78+ ``` kotlin
79+ format(" dd-MM-yyy" )
80+ format(" dd-MM-yyy" , locale)
81+ format(simpleDateFormat)
7582```
Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ fun Date.toFormat(simpleDateFormat: SimpleDateFormat): String {
3232 return simpleDateFormat.format(this )
3333}
3434
35- fun Date.toFormat (format : String , locale : Locale ): String {
35+ fun Date.toFormat (format : String , locale : Locale = Locale .getDefault() ): String {
3636 return SimpleDateFormat (format, locale).format(this )
3737}
You can’t perform that action at this time.
0 commit comments