parent
fc27122dae
commit
f7049a3295
@ -1010,6 +1010,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
final TextView statusInstalled;
|
||||
final TextView statusSuggested;
|
||||
final TextView statusIncompatible;
|
||||
final TextView versionCode;
|
||||
final TextView added;
|
||||
final ImageView expandArrow;
|
||||
final View expandedLayout;
|
||||
@ -1031,6 +1032,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
statusInstalled = (TextView) view.findViewById(R.id.status_installed);
|
||||
statusSuggested = (TextView) view.findViewById(R.id.status_suggested);
|
||||
statusIncompatible = (TextView) view.findViewById(R.id.status_incompatible);
|
||||
versionCode = view.findViewById(R.id.versionCode);
|
||||
added = (TextView) view.findViewById(R.id.added);
|
||||
expandArrow = (ImageView) view.findViewById(R.id.expand_arrow);
|
||||
expandedLayout = (View) view.findViewById(R.id.expanded_layout);
|
||||
@ -1121,6 +1123,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
|
||||
// Display when the expert mode is enabled
|
||||
if (Preferences.get().expertMode()) {
|
||||
versionCode.setText(String.format(Locale.ENGLISH, " (%d) ", apk.versionCode));
|
||||
// Display incompatible reasons when the app isn't compatible
|
||||
if (!apk.compatible) {
|
||||
String incompatibleReasonsText = getIncompatibleReasonsText(apk);
|
||||
@ -1143,6 +1146,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
incompatibleReasons.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
versionCode.setText("");
|
||||
incompatibleReasons.setVisibility(View.GONE);
|
||||
targetArch.setVisibility(View.GONE);
|
||||
}
|
||||
@ -1244,6 +1248,7 @@ public class AppDetailsRecyclerViewAdapter
|
||||
private void expand(boolean expand) {
|
||||
versionsExpandTracker.put(apk.apkName, expand);
|
||||
expandedLayout.setVisibility(expand ? View.VISIBLE : View.GONE);
|
||||
versionCode.setVisibility(expand ? View.VISIBLE : View.GONE);
|
||||
expandArrow.setImageDrawable(ContextCompat.getDrawable(context, expand ?
|
||||
R.drawable.ic_expand_less_grey600 : R.drawable.ic_expand_more_grey600));
|
||||
|
||||
|
@ -27,6 +27,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -36,6 +40,15 @@
|
||||
android:textSize="18sp"
|
||||
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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
@ -58,7 +71,6 @@
|
||||
android:text="@string/app_incompatible" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView android:id="@+id/added"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
|
Loading…
x
Reference in New Issue
Block a user