move version badge to the top bar

This commit is contained in:
Franek 2024-06-17 22:52:53 +02:00
parent db247a876c
commit d5697b54bd
No known key found for this signature in database
GPG Key ID: 0329F871B2079351
2 changed files with 3 additions and 20 deletions

View File

@ -146,10 +146,10 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
errorSnackbar.setCoordinator(b.navView.coordinator, b.navView.bottomBar)
val versionBadge = app.buildManager.versionBadge
b.nightlyText.isVisible = versionBadge != null
b.nightlyText.text = versionBadge
navView.nightlyText.isVisible = versionBadge != null
navView.nightlyText.text = versionBadge
if (versionBadge != null) {
b.nightlyText.background.setTintColor(0xa0ff0000.toInt())
navView.nightlyText.background.setTintColor(0xa0ff0000.toInt())
}
navLoading = true

View File

@ -31,23 +31,6 @@
</pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoTouch>
</pl.szczodrzynski.navlib.NavView>
<TextView
android:id="@+id/nightlyText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginHorizontal="48dp"
android:layout_marginVertical="8dp"
android:background="@drawable/bg_rounded_4dp"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:padding="4dp"
android:textAllCaps="true"
android:textSize="12sp"
android:textStyle="bold"
tools:backgroundTint="#a0ff0000"
tools:text="Nightly\n20200503" />
</FrameLayout>
</layout>