mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
disable fullscreen input view
commit_hash:2bf5fc69f2c5214f1fa31486edd71dcf2112e0e3
This commit is contained in:
@@ -284,7 +284,7 @@ internal class DivInputBinder @Inject constructor(
|
||||
) {
|
||||
val callback = { _: Any ->
|
||||
val enterKeyType = div.enterKeyType.evaluate(resolver)
|
||||
this.imeOptions = getImeAction(enterKeyType)
|
||||
this.imeOptions += getImeAction(enterKeyType)
|
||||
|
||||
val actions = div.enterKeyActions
|
||||
if (!actions.isNullOrEmpty()) {
|
||||
@@ -304,7 +304,7 @@ internal class DivInputBinder @Inject constructor(
|
||||
|
||||
private fun getImeAction(type: DivInput.EnterKeyType): Int {
|
||||
return when (type) {
|
||||
DivInput.EnterKeyType.DEFAULT -> EditorInfo.IME_NULL
|
||||
DivInput.EnterKeyType.DEFAULT -> EditorInfo.IME_ACTION_UNSPECIFIED
|
||||
DivInput.EnterKeyType.SEND -> EditorInfo.IME_ACTION_SEND
|
||||
DivInput.EnterKeyType.DONE -> EditorInfo.IME_ACTION_DONE
|
||||
DivInput.EnterKeyType.SEARCH -> EditorInfo.IME_ACTION_SEARCH
|
||||
|
||||
+5
-2
@@ -7,9 +7,11 @@ import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.util.AttributeSet
|
||||
import android.util.TypedValue
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import com.yandex.div.R
|
||||
import com.yandex.div.core.annotations.Mockable
|
||||
import com.yandex.div.core.view2.reuse.InputFocusTracker
|
||||
import com.yandex.div.internal.widget.SuperLineHeightEditText
|
||||
@@ -18,8 +20,9 @@ import com.yandex.div2.DivInput
|
||||
@Mockable
|
||||
internal class DivInputView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null
|
||||
) : SuperLineHeightEditText(context, attrs),
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = R.attr.divInputStyle
|
||||
) : SuperLineHeightEditText(context, attrs, defStyleAttr),
|
||||
DivHolderView<DivInput> by DivHolderViewMixin(),
|
||||
DivAnimator {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<attr name="divTextStyle" format="reference"/>
|
||||
<attr name="divImageStyle" format="reference"/>
|
||||
<attr name="divInputStyle" format="reference"/>
|
||||
<attr name="divTabIndicatorLayoutStyle" format="reference"/>
|
||||
|
||||
<declare-styleable name="EllipsizedTextView">
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
<style name="Div.Text"/>
|
||||
|
||||
<style name="Div.Input">
|
||||
<item name="android:imeOptions">flagNoFullscreen</item>
|
||||
</style>
|
||||
|
||||
<style name="Div.Image"/>
|
||||
|
||||
<style name="Div.Tabs"/>
|
||||
@@ -35,6 +39,7 @@
|
||||
<item name="colorAccent">@color/div_accent_color</item>
|
||||
<item name="divTextStyle">@style/Div.Text</item>
|
||||
<item name="divImageStyle">@style/Div.Image</item>
|
||||
<item name="divInputStyle">@style/Div.Input</item>
|
||||
<item name="divTabIndicatorLayoutStyle">@style/Div.Tabs.IndicatorTabLayout</item>
|
||||
<item name="android:textCursorDrawable">@drawable/cursor_drawable</item>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user