Allow newlines in image descriptions

This commit is contained in:
David Teresi 2020-08-14 16:42:18 -04:00
parent 45fd72c0f7
commit c94d793bff
1 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,9 @@ fun <T> T.makeCaptionDialog(existingDescription: String?,
dialogLayout.addView(input)
(input.layoutParams as LinearLayout.LayoutParams).setMargins(margin, margin, margin, margin)
input.setLines(2)
input.inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES
input.inputType = (InputType.TYPE_CLASS_TEXT
or InputType.TYPE_TEXT_FLAG_MULTI_LINE
or InputType.TYPE_TEXT_FLAG_CAP_SENTENCES)
input.setText(existingDescription)
input.filters = arrayOf(InputFilter.LengthFilter(MEDIA_DESCRIPTION_CHARACTER_LIMIT))