mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Single line set to true by default
This commit is contained in:
parent
d3949729e1
commit
8d0d7635c6
5 changed files with 4 additions and 7 deletions
|
@ -51,9 +51,8 @@ abstract class FormEditTextItem : VectorEpoxyModel<FormEditTextItem.Holder>() {
|
|||
@EpoxyAttribute
|
||||
var inputType: Int? = null
|
||||
|
||||
// TODO Should be true by default
|
||||
@EpoxyAttribute
|
||||
var singleLine: Boolean? = null
|
||||
var singleLine: Boolean = true
|
||||
|
||||
@EpoxyAttribute
|
||||
var imeOptions: Int? = null
|
||||
|
@ -82,7 +81,7 @@ abstract class FormEditTextItem : VectorEpoxyModel<FormEditTextItem.Holder>() {
|
|||
|
||||
holder.textInputEditText.isEnabled = enabled
|
||||
inputType?.let { holder.textInputEditText.inputType = it }
|
||||
holder.textInputEditText.isSingleLine = singleLine ?: false
|
||||
holder.textInputEditText.isSingleLine = singleLine
|
||||
holder.textInputEditText.imeOptions = imeOptions ?: EditorInfo.IME_ACTION_NONE
|
||||
|
||||
holder.textInputEditText.addTextChangedListener(onTextChangeListener)
|
||||
|
|
|
@ -75,6 +75,7 @@ class CreateRoomController @Inject constructor(
|
|||
id("topic")
|
||||
enabled(enableFormElement)
|
||||
value(viewState.roomTopic)
|
||||
singleLine(false)
|
||||
hint(host.stringProvider.getString(R.string.create_room_topic_hint))
|
||||
|
||||
onTextChange { text ->
|
||||
|
|
|
@ -102,6 +102,7 @@ class RoomSettingsController @Inject constructor(
|
|||
id("topic")
|
||||
enabled(data.actionPermissions.canChangeTopic)
|
||||
value(data.newTopic ?: roomSummary.topic)
|
||||
singleLine(false)
|
||||
hint(host.stringProvider.getString(R.string.room_settings_topic_hint))
|
||||
|
||||
onTextChange { text ->
|
||||
|
|
|
@ -69,7 +69,6 @@ class SpaceDefaultRoomEpoxyController @Inject constructor(
|
|||
id("roomName1")
|
||||
enabled(true)
|
||||
value(firstRoomName)
|
||||
singleLine(true)
|
||||
hint(host.stringProvider.getString(R.string.create_room_name_section))
|
||||
endIconMode(TextInputLayout.END_ICON_CLEAR_TEXT)
|
||||
showBottomSeparator(false)
|
||||
|
@ -83,7 +82,6 @@ class SpaceDefaultRoomEpoxyController @Inject constructor(
|
|||
id("roomName2")
|
||||
enabled(true)
|
||||
value(secondRoomName)
|
||||
singleLine(true)
|
||||
hint(host.stringProvider.getString(R.string.create_room_name_section))
|
||||
endIconMode(TextInputLayout.END_ICON_CLEAR_TEXT)
|
||||
showBottomSeparator(false)
|
||||
|
@ -97,7 +95,6 @@ class SpaceDefaultRoomEpoxyController @Inject constructor(
|
|||
id("roomName3")
|
||||
enabled(true)
|
||||
value(thirdRoomName)
|
||||
singleLine(true)
|
||||
hint(host.stringProvider.getString(R.string.create_room_name_section))
|
||||
endIconMode(TextInputLayout.END_ICON_CLEAR_TEXT)
|
||||
showBottomSeparator(false)
|
||||
|
|
|
@ -64,7 +64,6 @@ class SpaceDetailEpoxyController @Inject constructor(
|
|||
enabled(true)
|
||||
value(data?.name)
|
||||
hint(host.stringProvider.getString(R.string.create_room_name_hint))
|
||||
singleLine(true)
|
||||
showBottomSeparator(false)
|
||||
errorMessage(data?.nameInlineError)
|
||||
// onBind { _, view, _ ->
|
||||
|
|
Loading…
Reference in a new issue