Added "powered by" text to search and suggestions

This commit is contained in:
ByteHamster 2020-08-18 17:41:32 +02:00
parent 3bc94df932
commit d6b473302f
4 changed files with 29 additions and 3 deletions

View File

@ -107,8 +107,8 @@ public class OnlineSearchFragment extends Fragment {
txtvError = root.findViewById(R.id.txtvError);
butRetry = root.findViewById(R.id.butRetry);
txtvEmpty = root.findViewById(android.R.id.empty);
txtvEmpty.setText(getString(R.string.search_powered_by, searchProvider.getName()));
TextView txtvPoweredBy = root.findViewById(R.id.search_powered_by);
txtvPoweredBy.setText(getString(R.string.search_powered_by, searchProvider.getName()));
return root;
}

View File

@ -36,6 +36,7 @@
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone"
android:text="@string/search_status_no_results" />
<ProgressBar
@ -71,4 +72,17 @@
tools:visibility="visible"
tools:background="@android:color/holo_red_light" />
<TextView
android:id="@+id/search_powered_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorTertiary"
android:text="@string/discover_powered_by_itunes"
android:textSize="12sp"
android:padding="4dp"
android:background="?android:attr/windowBackground"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:textAlignment="textEnd"/>
</RelativeLayout>

View File

@ -62,4 +62,15 @@
android:layout_height="wrap_content"/>
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorTertiary"
android:text="@string/discover_powered_by_itunes"
android:textSize="12sp"
android:layout_gravity="right|end"
android:paddingHorizontal="4dp"
android:textAlignment="textEnd"/>
</LinearLayout>

View File

@ -720,7 +720,8 @@
<string name="browse_gpoddernet_label">Browse gpodder.net</string>
<string name="discover">Discover</string>
<string name="discover_more">more »</string>
<string name="search_powered_by">Search powered by %1$s</string>
<string name="discover_powered_by_itunes">Suggestions by iTunes</string>
<string name="search_powered_by">Results by %1$s</string>
<string name="filter">Filter</string>