parent
85314010b6
commit
f02603be37
|
@ -280,10 +280,12 @@ class SearchFragment : Fragment(), BackHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateClipboardSuggestion(searchState: SearchFragmentState, clipboardUrl: String?) {
|
private fun updateClipboardSuggestion(searchState: SearchFragmentState, clipboardUrl: String?) {
|
||||||
fill_link_from_clipboard.visibility =
|
val shouldBeVisible =
|
||||||
if (searchState.showClipboardSuggestions && searchState.query.isEmpty() && !clipboardUrl.isNullOrEmpty())
|
if (searchState.showClipboardSuggestions && searchState.query.isEmpty() && !clipboardUrl.isNullOrEmpty())
|
||||||
View.VISIBLE else View.GONE
|
View.VISIBLE else View.GONE
|
||||||
|
|
||||||
|
fill_link_from_clipboard.visibility = shouldBeVisible
|
||||||
|
divider_line.visibility = shouldBeVisible
|
||||||
clipboard_url.text = clipboardUrl
|
clipboard_url.text = clipboardUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
android:id="@+id/fill_link_from_clipboard"
|
android:id="@+id/fill_link_from_clipboard"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:background="?selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
|
@ -99,10 +100,21 @@
|
||||||
app:layout_constraintVertical_chainStyle="packed"/>
|
app:layout_constraintVertical_chainStyle="packed"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider_line"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1.5dp"
|
||||||
|
android:background="?neutralFaded"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/fill_link_from_clipboard"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/fill_link_from_clipboard"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/fill_link_from_clipboard" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/search_with_shortcuts"
|
android:id="@+id/search_with_shortcuts"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="18dp"
|
||||||
android:fontFamily="Inter UI"
|
android:fontFamily="Inter UI"
|
||||||
android:letterSpacing="0.15"
|
android:letterSpacing="0.15"
|
||||||
android:text="@string/search_shortcuts_search_with"
|
android:text="@string/search_shortcuts_search_with"
|
||||||
|
|
Loading…
Reference in New Issue