forked from github/szkolny
move version badge to the top bar
This commit is contained in:
parent
db247a876c
commit
d5697b54bd
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user