Skip to content

Commit

Permalink
feat: add Collapsing toolbar in community, health & leaderboard pages
Browse files Browse the repository at this point in the history
  • Loading branch information
princeraj-pr authored and PratyushSingh07 committed Dec 27, 2023
1 parent 2ad6b2b commit 99e95fe
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 419 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 31 additions & 35 deletions app/src/main/res/layout/fragment_community.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,56 @@
android:layout_height="match_parent"
tools:context=".ui.fragment.CommunityFragment">

<androidx.constraintlayout.widget.ConstraintLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundColor"
android:orientation="vertical">

<ImageView
android:id="@+id/bg_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/background_img"
android:importantForAccessibility="no"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_height="match_parent">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:outlineAmbientShadowColor="@color/dark_green"
android:outlineSpotShadowColor="@color/dark_green"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:outlineSpotShadowColor="@color/dark_green">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbarDashboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/dark_green"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:title="Community" />
</com.google.android.material.appbar.AppBarLayout>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_community_name"
<ImageView
android:id="@+id/bg_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout" />
android:background="@drawable/background_img_small"
android:importantForAccessibility="no"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_community_member"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:clipToPadding="false"
android:paddingTop="32dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rv_community_name"
tools:listitem="@layout/user_community_member_list" />
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_community_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="16dp" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_community_member"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="24dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/user_community_member_list" />
</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
Expand All @@ -73,5 +69,5 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:tint="@color/white" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>
Loading

0 comments on commit 99e95fe

Please sign in to comment.