Привет! Я создал пользовательский SearchView, но я не могу получить введенный текст пользователем
, это мой view_search. xml
<EditText
android:id="@+id/search_input_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_toEndOf="@id/close_search_button"
android:hint="جستجو..."
android:layout_toRightOf="@+id/close_search_button"/>
и я положил его на панель инструментов
<ir.mahdi.circulars.CustomView.SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/SearchView"
app:showDividers="none" />
и это мой класс searchview
class SearchView(
context: Context,
attrs: AttributeSet
) : FrameLayout(context, attrs) {
init {
LayoutInflater.from(context)
.inflate(R.layout.view_search, this, true)
}
Я не знаю, как обращаться с обменом текстами searchview