diff --git a/app/src/main/java/org/fdroid/fdroid/data/App.java b/app/src/main/java/org/fdroid/fdroid/data/App.java index 555cf815e..16d56d278 100644 --- a/app/src/main/java/org/fdroid/fdroid/data/App.java +++ b/app/src/main/java/org/fdroid/fdroid/data/App.java @@ -396,6 +396,16 @@ public class App extends ValueObject implements Comparable, Parcelable { return app; } + /** + * In order to format all in coming descriptions before they are written + * out to the database and used elsewhere, this is needed to intercept + * the setting of {@link App#description} to insert the format method. + */ + @JsonProperty("description") + private void setDescription(String description) { // NOPMD + this.description = formatDescription(description); + } + /** * Parses the {@code localized} block in the incoming index metadata, * choosing the best match in terms of locale/language while filling as diff --git a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java index 1ff8a6b7f..a0931d941 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java +++ b/app/src/main/java/org/fdroid/fdroid/views/AppDetailsRecyclerViewAdapter.java @@ -504,8 +504,8 @@ public class AppDetailsRecyclerViewAdapter sbWhatsNew.append(whatsNewView.getContext().getString(R.string.details_new_in_version, suggestedApk.versionName).toUpperCase(locale)); sbWhatsNew.append("\n\n"); - sbWhatsNew.append(app.whatsNew); - whatsNewView.setText(trimTrailingNewlines(sbWhatsNew)); + sbWhatsNew.append(trimTrailingNewlines(Html.fromHtml(app.whatsNew))); + whatsNewView.setText(sbWhatsNew); whatsNewView.setVisibility(View.VISIBLE); // Set focus on the header section to prevent auto scrolling to @@ -1091,7 +1091,7 @@ public class AppDetailsRecyclerViewAdapter Repo repo = RepoProvider.Helper.findById(context, apk.repoId); if (repo != null) { repository.setVisibility(View.VISIBLE); - repository.setText(String.format(repo.getName(), context.getString(R.string.app_repository))); + repository.setText(String.format(context.getString(R.string.app_repository), repo.getName())); } else { repository.setVisibility(View.INVISIBLE); } diff --git a/app/src/main/java/org/fdroid/fdroid/views/updates/UpdatesAdapter.java b/app/src/main/java/org/fdroid/fdroid/views/updates/UpdatesAdapter.java index 5a93e3e93..15cf1b6d6 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/updates/UpdatesAdapter.java +++ b/app/src/main/java/org/fdroid/fdroid/views/updates/UpdatesAdapter.java @@ -138,7 +138,6 @@ public class UpdatesAdapter extends RecyclerView.Adapter - + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> diff --git a/app/src/main/res/layout/app_permission_item.xml b/app/src/main/res/layout/app_permission_item.xml deleted file mode 100644 index 366c1e07d..000000000 --- a/app/src/main/res/layout/app_permission_item.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/updateable_app_status_item.xml b/app/src/main/res/layout/updateable_app_status_item.xml index a29eea61f..3906b848d 100644 --- a/app/src/main/res/layout/updateable_app_status_item.xml +++ b/app/src/main/res/layout/updateable_app_status_item.xml @@ -24,7 +24,7 @@ app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" /> - + app:layout_constraintBottom_toBottomOf="parent"> + android:ellipsize="end" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + - + - - - +