diff --git a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/appdetail/AppDetailFragment.kt b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/appdetail/AppDetailFragment.kt index 03f07bd3..ac59269d 100644 --- a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/appdetail/AppDetailFragment.kt +++ b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/appdetail/AppDetailFragment.kt @@ -69,9 +69,7 @@ class AppDetailFragment : Fragment(R.layout.fragment_app_detail) { inflateMenu(R.menu.app_detail_menu) if (app.exodusVersionCode == 0L) { menu.findItem(R.id.openExodusPage)?.isVisible = false - } else { - menu.findItem(R.id.submitApp)?.isVisible = false - } + } else menu.findItem(R.id.submitApp)?.isVisible = app.exodusVersionCode != app.versionCode setOnMenuItemClickListener { when (it.itemId) { R.id.openExodusPage -> { @@ -120,23 +118,29 @@ class AppDetailFragment : Fragment(R.layout.fragment_app_detail) { appVersionTV.text = app.versionName } else -> { - appVTV.visibility = View.GONE - appVersionTV.visibility = View.GONE - - appIVTV.visibility = View.VISIBLE - appInstalledVersionTV.apply { - visibility = View.VISIBLE - text = app.versionName - } - - appAVTV.visibility = View.VISIBLE - appAnalyzedVersionTV.apply { - visibility = View.VISIBLE - text = app.exodusVersionName - } if (app.versionName != app.exodusVersionName) { - appSameVersionTV.visibility = View.GONE + appIVTV.visibility = View.VISIBLE + appInstalledVersionTV.apply { + text = app.versionName + visibility = View.VISIBLE + } + appAVTV.visibility = View.VISIBLE + appAnalyzedVersionTV.apply { + text = app.exodusVersionName + visibility = View.VISIBLE + } + appVTV.visibility = View.GONE + appVersionTV.visibility = View.GONE } else { + appIVTV.visibility = View.GONE + appInstalledVersionTV.visibility = View.GONE + appAVTV.visibility = View.GONE + appAnalyzedVersionTV.visibility = View.GONE + appVTV.visibility = View.VISIBLE + appVersionTV.apply { + text = app.versionName + visibility = View.VISIBLE + } appSameVersionTV.visibility = View.VISIBLE } } diff --git a/app/src/main/res/layout/fragment_app_detail.xml b/app/src/main/res/layout/fragment_app_detail.xml index 61224531..d1fb0979 100644 --- a/app/src/main/res/layout/fragment_app_detail.xml +++ b/app/src/main/res/layout/fragment_app_detail.xml @@ -40,6 +40,8 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/appIconIV" android:layout_marginTop="10dp" + android:layout_marginLeft="15dp" + android:layout_marginRight="15dp" android:ellipsize="end" android:maxLines="2" android:textAlignment="center" @@ -114,6 +116,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/appIVTV" android:layout_marginStart="30dp" + android:layout_marginEnd="30dp" android:ellipsize="end" android:maxLines="2" android:paddingHorizontal="5dp" @@ -148,6 +151,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/appAVTV" android:layout_marginStart="30dp" + android:layout_marginEnd="30dp" android:ellipsize="end" android:maxLines="2" android:paddingHorizontal="5dp" @@ -180,8 +184,9 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/appVTV" android:layout_marginStart="30dp" + android:layout_marginEnd="30dp" android:ellipsize="end" - android:maxLines="1" + android:maxLines="2" android:paddingHorizontal="5dp" android:textColor="?android:textColorPrimary" android:textSize="17sp" @@ -210,6 +215,7 @@ app:layout_constraintTop_toBottomOf="@id/appSameVersionTV" android:layout_marginStart="30dp" android:layout_marginTop="12dp" + android:layout_marginEnd="30dp" android:ellipsize="end" android:maxLines="2" android:text="@string/report_date"