Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. binding.searchEt.setOnFocusChangeListener { view, hasFocus ->
  2. if (hasFocus) {
  3. binding.appBarLayout.setExpanded(false, true)
  4. } else {
  5. binding.appBarLayout.setExpanded(true, true)
  6. }
  7. }
  8.  
  9. <EditText
  10. android:id="@+id/searchEt"
  11. android:layout_width="match_parent"
  12. android:layout_height="wrap_content"
  13. android:layout_centerVertical="true"
  14. android:layout_marginStart="8dp"
  15. android:layout_toStartOf="@+id/close_button"
  16. android:layout_toEndOf="@+id/ic_search"
  17. android:background="@android:color/transparent"
  18. android:focusable="true"
  19. android:focusableInTouchMode="true"
  20. android:fontFamily="@font/catamaran_bold"
  21. android:hint="@string/search_hint"
  22. android:imeOptions="actionSearch"
  23. android:includeFontPadding="true"
  24. android:orientation="vertical"
  25. android:paddingStart="12dp"
  26. android:singleLine="true"
  27. android:textAlignment="viewStart"
  28. android:textColor="#000"
  29. android:textDirection="locale"
  30. android:textSize="18dp"
  31. tools:text="alskjfdn" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement