Merge branch 'fix-1326' into 'master'
display versionCode in expanded Versions list entries Closes #1326 See merge request fdroid/fdroidclient!770
This commit is contained in:
commit
a2addd22a6
@ -1010,6 +1010,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
final TextView statusInstalled;
|
final TextView statusInstalled;
|
||||||
final TextView statusSuggested;
|
final TextView statusSuggested;
|
||||||
final TextView statusIncompatible;
|
final TextView statusIncompatible;
|
||||||
|
final TextView versionCode;
|
||||||
final TextView added;
|
final TextView added;
|
||||||
final ImageView expandArrow;
|
final ImageView expandArrow;
|
||||||
final View expandedLayout;
|
final View expandedLayout;
|
||||||
@ -1031,6 +1032,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
statusInstalled = (TextView) view.findViewById(R.id.status_installed);
|
statusInstalled = (TextView) view.findViewById(R.id.status_installed);
|
||||||
statusSuggested = (TextView) view.findViewById(R.id.status_suggested);
|
statusSuggested = (TextView) view.findViewById(R.id.status_suggested);
|
||||||
statusIncompatible = (TextView) view.findViewById(R.id.status_incompatible);
|
statusIncompatible = (TextView) view.findViewById(R.id.status_incompatible);
|
||||||
|
versionCode = view.findViewById(R.id.versionCode);
|
||||||
added = (TextView) view.findViewById(R.id.added);
|
added = (TextView) view.findViewById(R.id.added);
|
||||||
expandArrow = (ImageView) view.findViewById(R.id.expand_arrow);
|
expandArrow = (ImageView) view.findViewById(R.id.expand_arrow);
|
||||||
expandedLayout = (View) view.findViewById(R.id.expanded_layout);
|
expandedLayout = (View) view.findViewById(R.id.expanded_layout);
|
||||||
@ -1121,6 +1123,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
|
|
||||||
// Display when the expert mode is enabled
|
// Display when the expert mode is enabled
|
||||||
if (Preferences.get().expertMode()) {
|
if (Preferences.get().expertMode()) {
|
||||||
|
versionCode.setText(String.format(Locale.ENGLISH, " (%d) ", apk.versionCode));
|
||||||
// Display incompatible reasons when the app isn't compatible
|
// Display incompatible reasons when the app isn't compatible
|
||||||
if (!apk.compatible) {
|
if (!apk.compatible) {
|
||||||
String incompatibleReasonsText = getIncompatibleReasonsText(apk);
|
String incompatibleReasonsText = getIncompatibleReasonsText(apk);
|
||||||
@ -1143,6 +1146,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
incompatibleReasons.setVisibility(View.GONE);
|
incompatibleReasons.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
versionCode.setText("");
|
||||||
incompatibleReasons.setVisibility(View.GONE);
|
incompatibleReasons.setVisibility(View.GONE);
|
||||||
targetArch.setVisibility(View.GONE);
|
targetArch.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -1244,6 +1248,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
private void expand(boolean expand) {
|
private void expand(boolean expand) {
|
||||||
versionsExpandTracker.put(apk.apkName, expand);
|
versionsExpandTracker.put(apk.apkName, expand);
|
||||||
expandedLayout.setVisibility(expand ? View.VISIBLE : View.GONE);
|
expandedLayout.setVisibility(expand ? View.VISIBLE : View.GONE);
|
||||||
|
versionCode.setVisibility(expand ? View.VISIBLE : View.GONE);
|
||||||
expandArrow.setImageDrawable(ContextCompat.getDrawable(context, expand ?
|
expandArrow.setImageDrawable(ContextCompat.getDrawable(context, expand ?
|
||||||
R.drawable.ic_expand_less_grey600 : R.drawable.ic_expand_more_grey600));
|
R.drawable.ic_expand_less_grey600 : R.drawable.ic_expand_more_grey600));
|
||||||
|
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<TextView android:id="@+id/version"
|
<TextView android:id="@+id/version"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -36,6 +40,15 @@
|
|||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
tools:text="1.2.3"/>
|
tools:text="1.2.3"/>
|
||||||
|
|
||||||
|
<TextView android:id="@+id/versionCode"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -58,7 +71,6 @@
|
|||||||
android:text="@string/app_incompatible" />
|
android:text="@string/app_incompatible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView android:id="@+id/added"
|
<TextView android:id="@+id/added"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user