This commit is contained in:
Jays2Kings 2021-04-21 13:24:18 -04:00
parent 7f818e0735
commit d1d327cfe1
2 changed files with 3 additions and 5 deletions

View File

@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.ui.category
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.drawable.Drawable
import android.text.InputType
import android.view.View
import android.view.WindowManager
import android.view.inputmethod.EditorInfo
@ -80,7 +79,6 @@ class CategoryHolder(view: View, val adapter: CategoryAdapter) : BaseFlexibleVie
binding.title.visibility = if (editing) View.INVISIBLE else View.VISIBLE
binding.editText.visibility = if (!editing) View.INVISIBLE else View.VISIBLE
if (editing) {
binding.editText.inputType = InputType.TYPE_TEXT_FLAG_AUTO_CORRECT
binding.editText.requestFocus()
binding.editText.selectAll()
binding.editButton.setImageDrawable(ContextCompat.getDrawable(itemView.context, R.drawable.ic_check_24dp))
@ -123,7 +121,6 @@ class CategoryHolder(view: View, val adapter: CategoryAdapter) : BaseFlexibleVie
.onCategoryRename(flexibleAdapterPosition, binding.editText.text.toString())
) {
isEditing(false)
binding.editText.inputType = InputType.TYPE_NULL
if (!createCategory) {
binding.title.text = binding.editText.text.toString()
}

View File

@ -51,6 +51,7 @@
android:background="@null"
android:imeOptions="actionDone"
android:inputType="textCapSentences"
android:hint="@string/category"
android:maxLines="1"
android:singleLine="true"
android:textColor="?android:attr/textColorPrimary"
@ -59,7 +60,8 @@
app:layout_constraintTop_toTopOf="@id/title"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="@id/title"
tools:text="Title" />
tools:text="Title"
android:autofillHints="" />
<TextView
android:id="@+id/title"
@ -67,7 +69,6 @@
android:layout_height="match_parent"
android:gravity="center|start"
android:layout_marginStart="3dp"
android:inputType="none"
android:maxLines="1"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"