Skip to content

Commit

Permalink
updated text strings and search bar style
Browse files Browse the repository at this point in the history
  • Loading branch information
malmstein committed Jan 12, 2023
1 parent 72ee89f commit b2423b2
Show file tree
Hide file tree
Showing 28 changed files with 47 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class SystemSearchActivity : DuckDuckGoActivity() {
private val textChangeWatcher = object : TextChangedWatcher() {
override fun afterTextChanged(editable: Editable) {
showOmnibar()
val searchQuery = omnibarTextInput.text.toString()
binding.clearTextButton.isVisible = searchQuery.isNotEmpty()
viewModel.userUpdatedQuery(omnibarTextInput.text.toString())
}
}
Expand Down Expand Up @@ -162,29 +164,27 @@ class SystemSearchActivity : DuckDuckGoActivity() {
private fun configureObservers() {
viewModel.onboardingViewState.observe(
this,
{
it?.let { renderOnboardingViewState(it) }
},
)
) {
it?.let { renderOnboardingViewState(it) }
}
viewModel.resultsViewState.observe(
this,
{
when (it) {
is SystemSearchViewModel.Suggestions.SystemSearchResultsViewState -> {
renderResultsViewState(it)
}
is SystemSearchViewModel.Suggestions.QuickAccessItems -> {
renderQuickAccessItems(it)
}
) {
when (it) {
is SystemSearchViewModel.Suggestions.SystemSearchResultsViewState -> {
renderResultsViewState(it)
}
},
)

is SystemSearchViewModel.Suggestions.QuickAccessItems -> {
renderQuickAccessItems(it)
}
}
}
viewModel.command.observe(
this,
{
processCommand(it)
},
)
) {
processCommand(it)
}
}

private fun configureOnboarding() {
Expand Down
11 changes: 3 additions & 8 deletions app/src/main/res/layout/activity_system_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.appcompat.widget.AppCompatEditText
<EditText
android:id="@+id/omnibarTextInput"
style="@style/Widget.DuckDuckGo.SearchInput"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="4dp"
android:hint="@string/systemSearchOmnibarInputHint"
android:imeOptions="flagNoExtractUi|actionGo|flagNoPersonalizedLearning"
android:inputType="textUri|textNoSuggestions"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/voiceSearchButton"
app:layout_constraintStart_toEndOf="@id/logo"
app:layout_constraintTop_toTopOf="parent">

<requestFocus />

</androidx.appcompat.widget.AppCompatEditText>
app:layout_constraintTop_toTopOf="parent"/>

<ImageView
android:id="@+id/voiceSearchButton"
Expand All @@ -103,6 +97,7 @@
android:background="?selectableItemBackground"
android:contentDescription="@string/clearButtonContentDescription"
android:padding="@dimen/toolbarIconPadding"
android:visibility="invisible"
android:src="@drawable/ic_close_24"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
app:typography="body2"
android:drawableStart="@drawable/ic_success"
android:drawablePadding="12dp"
android:text="@string/systemSearchOnboardingFeatureThreeText"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">От това устройство</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Търсене или въвеждане на URL адрес</font></string>
<string name="systemSearchOmnibarInputHint">Търсене или въвеждане на URL адрес</string>
<string name="systemSearchAppNotFound">Приложението не може да бъде намерено</string>
<string name="systemSearchOnboardingText">Благодарим ви, че избрахте DuckDuckGo!\nС използването на нашата търсачка или приложение вашите търсения са защитени.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Приложението също:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Z tohoto zařízení</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Vyhledat nebo zadat URL</font></string>
<string name="systemSearchOmnibarInputHint">Vyhledat nebo zadat URL</string>
<string name="systemSearchAppNotFound">Aplikace nebyla nalezena</string>
<string name="systemSearchOnboardingText">Děkujeme, že jste si vybrali DuckDuckGo!\nPři použití našeho vyhledávání nebo aplikace jsou od tohoto okamžiku Vaše vyhledávání chráněna.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Aplikace DuckDuckGo také:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Fra denne enhed</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Søg eller indtast URL</font></string>
<string name="systemSearchOmnibarInputHint">Søg eller indtast URL</string>
<string name="systemSearchAppNotFound">Appen kunne ikke findes</string>
<string name="systemSearchOnboardingText">Tak, fordi du valgte DuckDuckGo!\nNår du bruger vores søgning eller app, er dine søgninger beskyttet.</string>
<string name="systemSearchOnboardingFeaturesIntroText">DuckDuckGo-appen kan også:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Von diesem Gerät</string>
<string name="systemSearchOmnibarInputHint"><font size="13">URL eingeben oder suchen</font></string>
<string name="systemSearchOmnibarInputHint">URL eingeben oder suchen</string>
<string name="systemSearchAppNotFound">Die Anwendung konnte nicht gefunden werden.</string>
<string name="systemSearchOnboardingText">Vielen Dank, dass du dich für DuckDuckGo entschieden hast!\nWenn du jetzt unsere Suche oder App verwendest, sind deine Suchanfragen geschützt.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Das kann die DuckDuckGo App auch:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Από αυτή τη συσκευή</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Αναζήτηση ή πληκτρολόγηση διεύθυνσης URL</font></string>
<string name="systemSearchOmnibarInputHint">Αναζήτηση ή πληκτρολόγηση διεύθυνσης URL</string>
<string name="systemSearchAppNotFound">Η εφαρμογή δεν βρέθηκε</string>
<string name="systemSearchOnboardingText">Ευχαριστώ που επιλέξατε το DuckDuckGo!\nΤώρα, όταν χρησιμοποιείτε την αναζήτηση ή την εφαρμογή μας, οι αναζητήσεις σας προστατεύονται.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Η εφαρμογή DuckDuckGo επίσης:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Desde este dispositivo</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Buscar o escribir la URL</font></string>
<string name="systemSearchOmnibarInputHint">Buscar o escribir la URL</string>
<string name="systemSearchAppNotFound">No se pudo encontrar la aplicación</string>
<string name="systemSearchOnboardingText">¡Gracias por elegir DuckDuckGo!\nAhora, cuando uses nuestra búsqueda o aplicación, tus búsquedas estarán protegidas.</string>
<string name="systemSearchOnboardingFeaturesIntroText">La aplicación de DuckDuckGo también:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-et/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Sellest seadmest</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Otsige või tippige URL</font></string>
<string name="systemSearchOmnibarInputHint">Otsige või tippige URL</string>
<string name="systemSearchAppNotFound">Rakendust ei leitud</string>
<string name="systemSearchOnboardingText">Täname, et valisite DuckDuckGo!\nNüüd, kui kasutate meie otsingut või rakendust, on teie otsingud kaitstud.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Peale selle DuckDuckGo rakendus:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Tästä laitteesta</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Hae tai kirjoita URL</font></string>
<string name="systemSearchOmnibarInputHint">Hae tai kirjoita URL</string>
<string name="systemSearchAppNotFound">Sovellusta ei löytynyt</string>
<string name="systemSearchOnboardingText">Kiitos, että valitsit DuckDuckGon!\nKun nyt käytät hakua tai sovellusta, hakusi ovat suojattuja.</string>
<string name="systemSearchOnboardingFeaturesIntroText">DuckDuckGo-sovellus myös:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Depuis cet appareil</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Faire des recherches ou saisir l\'URL</font></string>
<string name="systemSearchOmnibarInputHint">Faire des recherches ou saisir l\'URL</string>
<string name="systemSearchAppNotFound">Impossible de trouver l\'application</string>
<string name="systemSearchOnboardingText">Merci d\'avoir choisi DuckDuckGo!\nDésormais, lorsque vous utilisez notre outil de recherche ou notre application, vos recherches sont protégées.</string>
<string name="systemSearchOnboardingFeaturesIntroText">L\'application DuckDuckGo offre également les fonctionnalités suivantes :</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-hr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Sa ovog uređaja</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Traži ili upiši URL adresu</font></string>
<string name="systemSearchOmnibarInputHint">Traži ili upiši URL adresu</string>
<string name="systemSearchAppNotFound">Aplikaciju nije bilo moguće pronaći</string>
<string name="systemSearchOnboardingText">Hvala što si odabrao/la DuckDuckGo!\nSada kada koristiš našu tražilicu ili aplikaciju, tvoje su pretrage zaštićene.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Aplikacija DuckDuckGo također:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Ebből az eszközből</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Keresés vagy URL beírása</font></string>
<string name="systemSearchOmnibarInputHint">Keresés vagy URL beírása</string>
<string name="systemSearchAppNotFound">Az alkalmazás nem található</string>
<string name="systemSearchOnboardingText">Köszönjük, hogy a DuckDuckGo-t választottad!\nMost, amikor a mi keresésünket vagy az alkalmazásunkat használod, a kereséseid védettek.</string>
<string name="systemSearchOnboardingFeaturesIntroText">A DuckDuckGo alkalmazás is:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Da questo dispositivo</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Cerca o inserisci URL</font></string>
<string name="systemSearchOmnibarInputHint">Cerca o inserisci URL</string>
<string name="systemSearchAppNotFound">Impossibile trovare l\'applicazione</string>
<string name="systemSearchOnboardingText">Grazie per aver scelto DuckDuckGo!\nOra, quando usi il nostro motore di ricerca o la nostra app, le tue ricerche sono protette.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Inoltre, l\'app DuckDuckGo:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-lt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Iš šio įrenginio</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Ieškoti arba įvesti URL</font></string>
<string name="systemSearchOmnibarInputHint">Ieškoti arba įvesti URL</string>
<string name="systemSearchAppNotFound">Nepavyko rasti programos</string>
<string name="systemSearchOnboardingText">Dėkojame, kad pasirinkote „DuckDuckGo“!\nDabar, kai naudojate mūsų paieškos funkciją ar programėlę, jūsų paieškos yra apsaugotos.</string>
<string name="systemSearchOnboardingFeaturesIntroText">„DuckDuckGo“ programėlė taip pat:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-lv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">No šīs ierīces</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Meklē vai ieraksti URL</font></string>
<string name="systemSearchOmnibarInputHint">Meklē vai ieraksti URL</string>
<string name="systemSearchAppNotFound">Lietojumprogrammu nevarēja atrast</string>
<string name="systemSearchOnboardingText">Paldies, ka izvēlējies DuckDuckGo!\nTagad, izmantojot mūsu meklētāju vai lietotni, tavi meklējumi tiks aizsargāti.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Tāpat DuckDuckGo lietotne:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Fra denne enheten</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Søk eller skriv URL</font></string>
<string name="systemSearchOmnibarInputHint">Søk eller skriv URL</string>
<string name="systemSearchAppNotFound">Programmet ble ikke funnet</string>
<string name="systemSearchOnboardingText">Takk for at du valgte DuckDuckGo!\nNår du bruker vårt søk eller app, er søkene dine beskyttet.</string>
<string name="systemSearchOnboardingFeaturesIntroText">DuckDuckGo-appen kan også:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Van dit apparaat</string>
<string name="systemSearchOmnibarInputHint"><font size="13">URL typen of zoeken</font></string>
<string name="systemSearchOmnibarInputHint">URL typen of zoeken</string>
<string name="systemSearchAppNotFound">Toepassing kon niet worden gevonden</string>
<string name="systemSearchOnboardingText">Bedankt dat je voor DuckDuckGo heeft gekozen!\nAls je nu onze zoekmachine of app gebruikt, zijn je zoekopdrachten beschermd.</string>
<string name="systemSearchOnboardingFeaturesIntroText">De DuckDuckGo-app:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Z tego urządzenia</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Wyszukaj lub wpisz adres URL</font></string>
<string name="systemSearchOmnibarInputHint">Wyszukaj lub wpisz adres UR</string>
<string name="systemSearchAppNotFound">Nie można znaleźć aplikacji</string>
<string name="systemSearchOnboardingText">Dziękujemy za wybranie DuckDuckGo!\nTeraz, gdy korzystasz z naszej wyszukiwarki lub aplikacji, Twoje wyszukiwania są chronione.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Ponadto aplikacja DuckDuckGo:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Deste dispositivo</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Pesquisar ou escrever URL</font></string>
<string name="systemSearchOmnibarInputHint">Pesquisar ou escrever URL</string>
<string name="systemSearchAppNotFound">Não foi possível encontrar a aplicação</string>
<string name="systemSearchOnboardingText">Obrigado por escolher o DuckDuckGo!\nAgora as suas pesquisas estão protegidas ao usar a nossa pesquisa ou aplicação.</string>
<string name="systemSearchOnboardingFeaturesIntroText">A aplicação DuckDuckGo também:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">De pe acest dispozitiv</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Căutare sau tastare URL</font></string>
<string name="systemSearchOmnibarInputHint">Căutare sau tastare URL</string>
<string name="systemSearchAppNotFound">Aplicația nu a fost găsită</string>
<string name="systemSearchOnboardingText">Mulțumim pentru că ai ales DuckDuckGo!\nAcum, când utilizezi căutarea sau aplicația noastră, căutările tale sunt protejate.</string>
<string name="systemSearchOnboardingFeaturesIntroText">De asemenea, aplicația DuckDuckGo:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">С этого устройства</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Введите поисковый запрос или адрес сайта</font></string>
<string name="systemSearchOmnibarInputHint">Введите поисковый запрос или адрес сайта</string>
<string name="systemSearchAppNotFound">Приложение не найдено</string>
<string name="systemSearchOnboardingText">Спасибо, что выбрали DuckDuckGo!\nТеперь информация о ваших поисковых запросах под надежной защитой.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Приложение DuckDuckGo также:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-sk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Z tohto zariadenia</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Vyhľadať alebo zadať webovú adresu</font></string>
<string name="systemSearchOmnibarInputHint">Vyhľadať alebo zadať webovú adresu</string>
<string name="systemSearchAppNotFound">Aplikáciu sa nepodarilo nájsť</string>
<string name="systemSearchOnboardingText">Ďakujeme, že ste si vybrali aplikáciu DuckDuckGo!\nPri použití nášho vyhľadávača alebo aplikácie je vaše vyhľadávanie chránené.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Aplikácia DuckDuckGo tiež:</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-sl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@

<!-- System Search-->
<string name="systemSearchDeviceAppLabel">Iz te naprave</string>
<string name="systemSearchOmnibarInputHint"><font size="13">Iščite z iskalnikom ali vnesite URL</font></string>
<string name="systemSearchOmnibarInputHint">Iščite z iskalnikom ali vnesite URL</string>
<string name="systemSearchAppNotFound">Prošnje ni bilo mogoče najti</string>
<string name="systemSearchOnboardingText">Hvala, ker ste izbrali DuckDuckGo!\nZdaj, ko uporabljate naše iskalnike ali aplikacijo, so vaša iskanja zaščitena.</string>
<string name="systemSearchOnboardingFeaturesIntroText">Tudi aplikacija DuckDuckGo:</string>
Expand Down
Loading

0 comments on commit b2423b2

Please sign in to comment.