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 titleView;
|
||||||
final TextView authorView;
|
final TextView authorView;
|
||||||
final TextView lastUpdateView;
|
final TextView lastUpdateView;
|
||||||
|
final TextView summaryView;
|
||||||
final TextView whatsNewView;
|
final TextView whatsNewView;
|
||||||
final TextView descriptionView;
|
final TextView descriptionView;
|
||||||
final TextView descriptionMoreView;
|
final TextView descriptionMoreView;
|
||||||
@ -397,6 +398,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
titleView = (TextView) view.findViewById(R.id.title);
|
titleView = (TextView) view.findViewById(R.id.title);
|
||||||
authorView = (TextView) view.findViewById(R.id.author);
|
authorView = (TextView) view.findViewById(R.id.author);
|
||||||
lastUpdateView = (TextView) view.findViewById(R.id.text_last_update);
|
lastUpdateView = (TextView) view.findViewById(R.id.text_last_update);
|
||||||
|
summaryView = (TextView) view.findViewById(R.id.summary);
|
||||||
whatsNewView = (TextView) view.findViewById(R.id.whats_new);
|
whatsNewView = (TextView) view.findViewById(R.id.whats_new);
|
||||||
descriptionView = (TextView) view.findViewById(R.id.description);
|
descriptionView = (TextView) view.findViewById(R.id.description);
|
||||||
descriptionMoreView = (TextView) view.findViewById(R.id.description_more);
|
descriptionMoreView = (TextView) view.findViewById(R.id.description_more);
|
||||||
@ -494,9 +496,13 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
lastUpdateView.setVisibility(View.GONE);
|
lastUpdateView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(app.summary)) {
|
||||||
|
summaryView.setText(app.summary);
|
||||||
|
}
|
||||||
Apk suggestedApk = getSuggestedApk();
|
Apk suggestedApk = getSuggestedApk();
|
||||||
if (suggestedApk == null || TextUtils.isEmpty(app.whatsNew)) {
|
if (suggestedApk == null || TextUtils.isEmpty(app.whatsNew)) {
|
||||||
whatsNewView.setVisibility(View.GONE);
|
whatsNewView.setVisibility(View.GONE);
|
||||||
|
summaryView.setBackgroundResource(0); // make background of summary transparent
|
||||||
} else {
|
} else {
|
||||||
//noinspection deprecation Ignore deprecation because the suggested way is only available in API 24.
|
//noinspection deprecation Ignore deprecation because the suggested way is only available in API 24.
|
||||||
Locale locale = context.getResources().getConfiguration().locale;
|
Locale locale = context.getResources().getConfiguration().locale;
|
||||||
|
@ -164,7 +164,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/whats_new"
|
android:id="@+id/summary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
@ -172,6 +172,23 @@
|
|||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:paddingRight="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:paddingTop="16dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user