pull/32/head
parent
304c099151
commit
d066cda2c1
@ -0,0 +1,13 @@ |
||||
package io.legado.app.utils |
||||
|
||||
import android.content.Context |
||||
import android.view.View |
||||
import android.view.inputmethod.InputMethodManager |
||||
import io.legado.app.App |
||||
|
||||
fun View.hidehideSoftInput() = run { |
||||
val imm = App.INSTANCE.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager |
||||
imm?.let { |
||||
imm.hideSoftInputFromWindow(this.windowToken, 0) |
||||
} |
||||
} |
@ -0,0 +1,39 @@ |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:id="@+id/ll_content" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:background="@color/background" |
||||
android:orientation="vertical" |
||||
android:padding="10dp"> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_title" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_margin="5dp"/> |
||||
|
||||
<io.legado.app.lib.theme.view.ATEAutoCompleteTextView |
||||
android:id="@+id/et_input" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_margin="5dp" |
||||
android:completionThreshold="0" |
||||
android:maxLines="5" |
||||
tools:ignore="LabelFor"/> |
||||
|
||||
<TextView |
||||
android:id="@+id/tv_ok" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_margin="5dp" |
||||
android:background="@drawable/selector_fillet_btn_bg" |
||||
android:clickable="true" |
||||
android:focusable="true" |
||||
android:gravity="center" |
||||
android:paddingTop="5dp" |
||||
android:paddingBottom="5dp" |
||||
android:text="@string/ok" |
||||
android:textColor="@color/tv_text_default"/> |
||||
|
||||
</LinearLayout> |
Loading…
Reference in new issue