Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- binding.searchEt.setOnFocusChangeListener { view, hasFocus ->
- if (hasFocus) {
- binding.appBarLayout.setExpanded(false, true)
- } else {
- binding.appBarLayout.setExpanded(true, true)
- }
- }
- <EditText
- android:id="@+id/searchEt"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_marginStart="8dp"
- android:layout_toStartOf="@+id/close_button"
- android:layout_toEndOf="@+id/ic_search"
- android:background="@android:color/transparent"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:fontFamily="@font/catamaran_bold"
- android:hint="@string/search_hint"
- android:imeOptions="actionSearch"
- android:includeFontPadding="true"
- android:orientation="vertical"
- android:paddingStart="12dp"
- android:singleLine="true"
- android:textAlignment="viewStart"
- android:textColor="#000"
- android:textDirection="locale"
- android:textSize="18dp"
- tools:text="alskjfdn" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement