Move compose content's EditText cursor to first when shared content parsed in ComposeActivity (#2030)
* multiple media upload support * multiple media upload support * multiple media upload support * remove typing * Update app/src/main/res/values/strings.xml Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com> * remove magic number on string.xml and add to activity. * move edittext cursor to first when shareBody parsed in ComposeActivity Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
This commit is contained in:
parent
968c4ed3e0
commit
0275504a05
2 changed files with 5 additions and 2 deletions
|
@ -30,7 +30,7 @@ import android.os.Build
|
|||
import android.os.Bundle
|
||||
import android.os.Parcelable
|
||||
import android.provider.MediaStore
|
||||
import android.util.Log
|
||||
import android.util.Log
|
||||
import android.view.KeyEvent
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
|
@ -202,6 +202,9 @@ class ComposeActivity : BaseActivity(),
|
|||
val left = min(start, end)
|
||||
val right = max(start, end)
|
||||
composeEditField.text.replace(left, right, shareBody, 0, shareBody.length)
|
||||
// move edittext cursor to first when shareBody parsed
|
||||
composeEditField.text.insert(0, "\n")
|
||||
composeEditField.setSelection(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue