Add stats to community "about" tab

This commit is contained in:
Balazs Toldi
2023-08-20 14:51:57 +02:00
parent 267570d7b4
commit ce7c284c6b
2 changed files with 184 additions and 9 deletions

View File

@@ -8,19 +8,143 @@
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_sidebar_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/markdown_recycler_view_sidebar_fragment"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="8dp"
android:paddingBottom="144dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:clipToPadding="false" />
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewElevatedStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/markdown_recycler_view_sidebar_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="144dp" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewElevatedStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/community_statistics_block_sidebar_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:visibility="gone"
android:layout_marginBottom="16dp">
<ImageView
android:id="@+id/subscriber_count_image_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_person_24" />
<TextView
android:id="@+id/subscriber_count_text_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:text="@string/subscribers_number_detail"
app:layout_constraintStart_toEndOf="@+id/subscriber_count_image_view_sidebar_fragment"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<ImageView
android:id="@+id/active_user_count_image_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@+id/guideline7"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_bolt_24" />
<TextView
android:id="@+id/active_user_count_text_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:text="@string/active_users_number_detail"
app:layout_constraintStart_toEndOf="@+id/active_user_count_image_view_sidebar_fragment"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/post_count_image_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/subscriber_count_image_view_sidebar_fragment"
app:srcCompat="@drawable/ic_post_add_24" />
<TextView
android:id="@+id/post_count_text_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="18dp"
android:text="@string/post_count_detail"
app:layout_constraintStart_toEndOf="@+id/post_count_image_view_sidebar_fragment"
app:layout_constraintTop_toBottomOf="@+id/subscriber_count_image_view_sidebar_fragment" />
<ImageView
android:id="@+id/comment_count_image_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="@+id/guideline7"
app:layout_constraintTop_toBottomOf="@+id/active_user_count_image_view_sidebar_fragment"
app:srcCompat="@drawable/ic_comment_black_24" />
<TextView
android:id="@+id/comment_count_text_view_sidebar_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="18dp"
android:text="@string/comment_count_detail"
app:layout_constraintStart_toEndOf="@+id/comment_count_image_view_sidebar_fragment"
app:layout_constraintTop_toBottomOf="@+id/active_user_count_image_view_sidebar_fragment" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>