Merge branch 'summary-design' into 'master'
display summary text on app details activity Closes #1820 See merge request fdroid/fdroidclient!855
This commit is contained in:
commit
432a7882fd
@ -375,6 +375,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
final TextView titleView;
|
||||
final TextView authorView;
|
||||
final TextView lastUpdateView;
|
||||
final TextView summaryView;
|
||||
final TextView whatsNewView;
|
||||
final TextView descriptionView;
|
||||
final TextView descriptionMoreView;
|
||||
@ -397,6 +398,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
titleView = (TextView) view.findViewById(R.id.title);
|
||||
authorView = (TextView) view.findViewById(R.id.author);
|
||||
lastUpdateView = (TextView) view.findViewById(R.id.text_last_update);
|
||||
summaryView = (TextView) view.findViewById(R.id.summary);
|
||||
whatsNewView = (TextView) view.findViewById(R.id.whats_new);
|
||||
descriptionView = (TextView) view.findViewById(R.id.description);
|
||||
descriptionMoreView = (TextView) view.findViewById(R.id.description_more);
|
||||
@ -494,9 +496,13 @@ public class AppDetailsRecyclerViewAdapter
|
||||
lastUpdateView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(app.summary)) {
|
||||
summaryView.setText(app.summary);
|
||||
}
|
||||
Apk suggestedApk = getSuggestedApk();
|
||||
if (suggestedApk == null || TextUtils.isEmpty(app.whatsNew)) {
|
||||
whatsNewView.setVisibility(View.GONE);
|
||||
summaryView.setBackgroundResource(0); // make background of summary transparent
|
||||
} else {
|
||||
//noinspection deprecation Ignore deprecation because the suggested way is only available in API 24.
|
||||
Locale locale = context.getResources().getConfiguration().locale;
|
||||
|
@ -164,7 +164,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/whats_new"
|
||||
android:id="@+id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
@ -172,6 +172,23 @@
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:padding="8dp"
|
||||
android:scrollbars="none"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:textIsSelectable="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/detailPanel"
|
||||
tools:text="App summary, one line - outlining what this app does" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/whats_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user