szkolny/app/src/main/res/layout/contributors_fragment.xml
Kuba Szczodrzyński 37a94595c0
Some checks failed
Schedule/dispatch / Build nightly release (APK) (push) Has been skipped
Schedule/dispatch / Check new changes (push) Failing after 25s
[UI] Enable colored app bars on scroll (#211)
* Extract fragment scroll listener to separate file

* Replace canRefresh with isScrolled

* Add empty helper class to animate app bar color

* Implement AppBarColorAnimator

* Rename getRefreshScrollingView() to getScrollingView()

* Set isScrolled on drag start

* Clear isScrolled on fling to top

* Add getSyncParams() to fragments

* Convert getAppBars() to property

* Tint TabLayout background drawable
2024-07-09 18:15:03 +02:00

112 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
tools:visibility="gone" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/konami"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_gravity="bottom|end"
android:visibility="gone"
app:srcCompat="@drawable/emoji_glasses" />
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?actionBarSize">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="?actionBarSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="?actionBarSize"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="0.7">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp">
<ImageView
android:id="@+id/szkolny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="center"
android:scaleX="0.8"
android:scaleY="0.8"
android:src="@mipmap/ic_splash_v5" />
<ImageView
android:id="@+id/glove"
android:layout_width="144dp"
android:layout_height="144dp"
android:layout_gravity="center"
android:paddingBottom="4dp"
android:visibility="gone"
app:srcCompat="@drawable/thanos_idle" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="64dp"
android:gravity="center"
android:text="@string/app_name"
android:textAppearance="?textAppearanceHeadlineMedium" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="64dp"
android:layout_marginBottom="48dp"
android:gravity="center"
android:text="@string/contributors_headline"
android:textAppearance="?textAppearanceTitleLarge" />
</LinearLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:visibility="gone"
app:tabMode="auto"
tools:visibility="visible" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:visibility="visible" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>