Fixes
This commit is contained in:
@@ -15,7 +15,8 @@ import org.koitharu.kotatsu.main.ui.AppBarOwner
|
||||
import org.koitharu.kotatsu.search.ui.suggestion.adapter.SearchSuggestionAdapter
|
||||
import org.koitharu.kotatsu.utils.ext.measureHeight
|
||||
|
||||
class SearchSuggestionFragment : BaseFragment<FragmentSearchSuggestionBinding>(),
|
||||
class SearchSuggestionFragment :
|
||||
BaseFragment<FragmentSearchSuggestionBinding>(),
|
||||
SearchSuggestionItemCallback.SuggestionItemListener {
|
||||
|
||||
private val viewModel by sharedViewModel<SearchSuggestionViewModel>()
|
||||
@@ -44,8 +45,8 @@ class SearchSuggestionFragment : BaseFragment<FragmentSearchSuggestionBinding>()
|
||||
val headerHeight = (activity as? AppBarOwner)?.appBar?.measureHeight() ?: insets.top
|
||||
binding.root.updatePadding(
|
||||
top = headerHeight,
|
||||
left = insets.left,
|
||||
right = insets.right,
|
||||
// left = insets.left,
|
||||
// right = insets.right,
|
||||
bottom = insets.bottom,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.appcompat.widget.AppCompatEditText
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.google.android.material.R
|
||||
import org.koitharu.kotatsu.search.ui.suggestion.SearchSuggestionListener
|
||||
import org.koitharu.kotatsu.utils.ext.drawableStart
|
||||
|
||||
private const val DRAWABLE_END = 2
|
||||
|
||||
@@ -57,7 +58,7 @@ class SearchEditText @JvmOverloads constructor(
|
||||
) {
|
||||
super.onTextChanged(text, start, lengthBefore, lengthAfter)
|
||||
setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
null,
|
||||
drawableStart,
|
||||
null,
|
||||
if (text.isNullOrEmpty()) null else clearIcon,
|
||||
null,
|
||||
@@ -86,4 +87,4 @@ class SearchEditText @JvmOverloads constructor(
|
||||
super.clearFocus()
|
||||
text?.clear()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user