Nicer stats for users

This commit adds more info on the user detail page. The design is heavily inspired by Memmy
This commit is contained in:
Balazs Toldi 2023-08-17 22:43:45 +02:00
parent b5356ee5eb
commit cc21588a66
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58
10 changed files with 542 additions and 51 deletions

View File

@ -4,6 +4,7 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
@ -20,6 +21,7 @@ import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
@ -111,6 +113,7 @@ import eu.toldi.infinityforlemmy.user.FetchUserData;
import eu.toldi.infinityforlemmy.user.UserDao;
import eu.toldi.infinityforlemmy.user.UserData;
import eu.toldi.infinityforlemmy.user.UserFollowing;
import eu.toldi.infinityforlemmy.user.UserStats;
import eu.toldi.infinityforlemmy.user.UserViewModel;
import eu.toldi.infinityforlemmy.utils.APIUtils;
import eu.toldi.infinityforlemmy.utils.LemmyUtils;
@ -176,9 +179,27 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
ProgressBar progressBar;
@BindView(R.id.subscribe_user_chip_view_user_detail_activity)
Chip subscribeUserChip;
@BindView(R.id.karma_text_view_view_user_detail_activity)
TextView karmaTextView;
@BindView(R.id.cakeday_text_view_view_user_detail_activity)
@BindView(R.id.post_count_text_view_view_user_detail_activity)
TextView postCountTextView;
@BindView(R.id.comment_count_text_view_view_user_detail_activity)
TextView commentCountTextView;
@BindView(R.id.upvote_count_post_text_view_view_user_detail_activity)
TextView upvoteCountPostTextView;
@BindView(R.id.upvote_count_comment_text_view_view_user_detail_activity)
TextView upvoteCountCommentTextView;
@BindView(R.id.posts_count_icon_image_view_view_user_detail_activity)
ImageView postsCountIconImageView;
@BindView(R.id.comments_count_icon_image_view_view_user_detail_activity)
ImageView commentsCountIconImageView;
@BindView(R.id.account_created_cake_icon_image_view_view_user_detail_activity)
ImageView accountCreatedCakeIconImageView;
@BindView(R.id.cake_day_text_view_view_user_detail_activity)
TextView cakedayTextView;
@BindView(R.id.description_text_view_view_user_detail_activity)
TextView descriptionTextView;
@ -572,8 +593,15 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
getSupportActionBar().setTitle(userFullName);
}
String karma = "";//getString(R.string.karma_info_user_detail, userData.getTotalKarma(), userData.getLinkKarma(), userData.getCommentKarma());
karmaTextView.setText(karma);
cakedayTextView.setText(getString(R.string.cakeday_info, userData.getCakeday()));
cakedayTextView.setText((String) userData.getCakeday());
UserStats userStats = mUserData.getStats();
if (userStats != null) {
postCountTextView.setText(String.valueOf(userStats.getPostCount()));
commentCountTextView.setText(String.valueOf(userStats.getCommentCount()));
upvoteCountPostTextView.setText(String.valueOf(userStats.getPostScore()));
upvoteCountCommentTextView.setText(String.valueOf(userStats.getCommentScore()));
}
if (userData.getDescription() == null || userData.getDescription().equals("")) {
descriptionTextView.setVisibility(View.GONE);
@ -641,7 +669,13 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
unsubscribedColor = mCustomThemeWrapper.getUnsubscribed();
subscribedColor = mCustomThemeWrapper.getSubscribed();
userNameTextView.setTextColor(mCustomThemeWrapper.getUsername());
karmaTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
postCountTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
upvoteCountPostTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
commentCountTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
upvoteCountCommentTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
postsCountIconImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN);
commentsCountIconImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN);
accountCreatedCakeIconImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN);
cakedayTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
navigationWrapper.applyCustomTheme(mCustomThemeWrapper.getBottomAppBarIconColor(), mCustomThemeWrapper.getBottomAppBarBackgroundColor());
applyFABTheme(navigationWrapper.floatingActionButton, mSharedPreferences.getBoolean(SharedPreferencesUtils.USE_CIRCULAR_FAB, false));
@ -650,7 +684,10 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
applyTabLayoutTheme(tabLayout);
if (typeface != null) {
userNameTextView.setTypeface(typeface);
karmaTextView.setTypeface(typeface);
postCountTextView.setTypeface(typeface);
upvoteCountPostTextView.setTypeface(typeface);
commentCountTextView.setTypeface(typeface);
upvoteCountCommentTextView.setTypeface(typeface);
cakedayTextView.setTypeface(typeface);
subscribeUserChip.setTypeface(typeface);
descriptionTextView.setTypeface(typeface);

View File

@ -28,6 +28,7 @@ public class ParseUserData {
JSONObject personJson = (userDataJson.has("person_view")) ? userDataJson.getJSONObject("person_view").getJSONObject("person") : userDataJson.getJSONObject("person");
JSONObject countsJson = (userDataJson.has("person_view")) ? userDataJson.getJSONObject("person_view").getJSONObject("counts") : userDataJson.getJSONObject("counts");
String userName = personJson.getString(JSONUtils.NAME_KEY);
String actor_id = personJson.getString("actor_id");
String iconImageUrl = "";
@ -59,9 +60,13 @@ public class ParseUserData {
if (!personJson.isNull("display_name")) {
title = personJson.getString("display_name");
}
int postCount = countsJson.optInt("post_count", 0);
int commentCount = countsJson.optInt("comment_count", 0);
int postScore = countsJson.optInt("post_score", 0);
int commentScore = countsJson.optInt("comment_score", 0);
UserStats userStats = new UserStats(postCount, postScore, commentCount, commentScore);
return new UserData(account_id,userName,title, iconImageUrl,isBanned,cakeday,actor_id,isLocal,isDeleted,isAdmin,isBot,instance_id);
return new UserData(account_id, userName, title, iconImageUrl, isBanned, cakeday, actor_id, isLocal, isDeleted, isAdmin, isBot, instance_id, userStats);
}
interface ParseUserDataListener {

View File

@ -49,6 +49,9 @@ public class UserData {
@Ignore
private boolean isSelected;
@Ignore
private UserStats stats;
public boolean isSelected() {
return isSelected;
}
@ -157,6 +160,10 @@ public class UserData {
this.instanceId = instanceId;
}
public UserStats getStats() {
return stats;
}
public UserData(int id, String name, String displayName, String avatar, boolean banned, String published, String actorId, boolean local, boolean deleted, boolean admin, boolean botAccount, int instanceId) {
this.id = id;
this.name = name;
@ -172,6 +179,23 @@ public class UserData {
this.instanceId = instanceId;
}
public UserData(int id, String name, String displayName, String avatar, boolean banned, String published, String actorId, boolean local, boolean deleted, boolean admin, boolean botAccount, int instanceId, UserStats stats) {
this.id = id;
this.name = name;
this.displayName = displayName;
this.avatar = avatar;
this.banned = banned;
this.published = published;
this.actorId = actorId;
this.local = local;
this.deleted = deleted;
this.admin = admin;
this.botAccount = botAccount;
this.instanceId = instanceId;
this.stats = stats;
}
public boolean isCanBeFollowed() {
return false;
}

View File

@ -0,0 +1,40 @@
package eu.toldi.infinityforlemmy.user
import android.os.Parcel
import android.os.Parcelable
data class UserStats(
val postCount: Int,
val postScore: Int,
val commentCount: Int,
val commentScore: Int
) : Parcelable {
constructor(parcel: Parcel) : this(
parcel.readInt(),
parcel.readInt(),
parcel.readInt(),
parcel.readInt()
) {
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeInt(postCount)
parcel.writeInt(postScore)
parcel.writeInt(commentCount)
parcel.writeInt(commentScore)
}
override fun describeContents(): Int {
return 0
}
companion object CREATOR : Parcelable.Creator<UserStats> {
override fun createFromParcel(parcel: Parcel): UserStats {
return UserStats(parcel)
}
override fun newArray(size: Int): Array<UserStats?> {
return arrayOfNulls(size)
}
}
}

View File

@ -0,0 +1,10 @@
<vector android:height="24dp"
android:tint="#000000"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="@android:color/white"
android:pathData="M12,6c1.11,0 2,-0.9 2,-2 0,-0.38 -0.1,-0.73 -0.29,-1.03L12,0l-1.71,2.97c-0.19,0.3 -0.29,0.65 -0.29,1.03 0,1.1 0.9,2 2,2zM16.6,15.99l-1.07,-1.07 -1.08,1.07c-1.3,1.3 -3.58,1.31 -4.89,0l-1.07,-1.07 -1.09,1.07C6.75,16.64 5.88,17 4.96,17c-0.73,0 -1.4,-0.23 -1.96,-0.61L3,21c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1v-4.61c-0.56,0.38 -1.23,0.61 -1.96,0.61 -0.92,0 -1.79,-0.36 -2.44,-1.01zM18,9h-5L13,7h-2v2L6,9c-1.66,0 -3,1.34 -3,3v1.54c0,1.08 0.88,1.96 1.96,1.96 0.52,0 1.02,-0.2 1.38,-0.57l2.14,-2.13 2.13,2.13c0.74,0.74 2.03,0.74 2.77,0l2.14,-2.13 2.13,2.13c0.37,0.37 0.86,0.57 1.38,0.57 1.08,0 1.96,-0.88 1.96,-1.96L20.99,12C21,10.34 19.66,9 18,9z" />
</vector>

View File

@ -0,0 +1,11 @@
<vector android:autoMirrored="true"
android:height="24dp"
android:tint="#000000"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="@android:color/white"
android:pathData="M21.99,4c0,-1.1 -0.89,-2 -1.99,-2L4,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4 -0.01,-18zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z" />
</vector>

View File

@ -0,0 +1,22 @@
<vector android:height="24dp"
android:tint="#000000"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="@android:color/white"
android:pathData="M17,19.22H5V7h7V5H5C3.9,5 3,5.9 3,7v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2v-7h-2V19.22z" />
<path
android:fillColor="@android:color/white"
android:pathData="M19,2h-2v3h-3c0.01,0.01 0,2 0,2h3v2.99c0.01,0.01 2,0 2,0V7h3V5h-3V2z" />
<path
android:fillColor="@android:color/white"
android:pathData="M7,9h8v2h-8z" />
<path
android:fillColor="@android:color/white"
android:pathData="M7,12l0,2l8,0l0,-2l-3,0z" />
<path
android:fillColor="@android:color/white"
android:pathData="M7,15h8v2h-8z" />
</vector>

View File

@ -83,30 +83,144 @@
android:visibility="gone"
app:chipStrokeColor="#00000000" />
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
android:layout_height="wrap_content">
<TextView
android:id="@+id/karma_text_view_view_user_detail_activity"
android:id="@+id/post_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/cakeday_text_view_view_user_detail_activity"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/posts"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/posts_count_icon_image_view_view_user_detail_activity"
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_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_post_add_24" />
<TextView
android:id="@+id/cakeday_text_view_view_user_detail_activity"
android:id="@+id/post_count_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_alignParentEnd="true"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/posts_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
</RelativeLayout>
<ImageView
android:id="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/post_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_post_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<TextView
android:id="@+id/comment_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/comments"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/comments_count_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_comment_black_24" />
<TextView
android:id="@+id/comment_count_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/comments_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<ImageView
android:id="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/comment_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_comment_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<TextView
android:id="@+id/account_created_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="Account Created"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/posts_count_icon_image_view_view_user_detail_activity" />
<ImageView
android:id="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
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_toBottomOf="@+id/account_created_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_cake_24" />
<TextView
android:id="@+id/cake_day_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="11dp"
app:layout_constraintStart_toEndOf="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/account_created_text_view_view_user_detail_activity" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/description_text_view_view_user_detail_activity"

View File

@ -83,30 +83,144 @@
android:visibility="gone"
app:chipStrokeColor="#00000000" />
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
android:layout_height="wrap_content">
<TextView
android:id="@+id/karma_text_view_view_user_detail_activity"
android:id="@+id/post_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/cakeday_text_view_view_user_detail_activity"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/posts"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/posts_count_icon_image_view_view_user_detail_activity"
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_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_post_add_24" />
<TextView
android:id="@+id/cakeday_text_view_view_user_detail_activity"
android:id="@+id/post_count_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_alignParentEnd="true"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/posts_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
</RelativeLayout>
<ImageView
android:id="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/post_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_post_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<TextView
android:id="@+id/comment_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/comments"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/comments_count_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_comment_black_24" />
<TextView
android:id="@+id/comment_count_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/comments_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<ImageView
android:id="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/comment_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_comment_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<TextView
android:id="@+id/account_created_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="Account Created"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/posts_count_icon_image_view_view_user_detail_activity" />
<ImageView
android:id="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
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_toBottomOf="@+id/account_created_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_cake_24" />
<TextView
android:id="@+id/cake_day_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="11dp"
app:layout_constraintStart_toEndOf="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/account_created_text_view_view_user_detail_activity" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/description_text_view_view_user_detail_activity"

View File

@ -83,30 +83,144 @@
android:visibility="gone"
app:chipStrokeColor="#00000000" />
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
android:layout_height="wrap_content">
<TextView
android:id="@+id/karma_text_view_view_user_detail_activity"
android:id="@+id/post_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/cakeday_text_view_view_user_detail_activity"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/posts"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/posts_count_icon_image_view_view_user_detail_activity"
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_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_post_add_24" />
<TextView
android:id="@+id/cakeday_text_view_view_user_detail_activity"
android:id="@+id/post_count_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_alignParentEnd="true"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/posts_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
</RelativeLayout>
<ImageView
android:id="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/post_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_post_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_posts_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/post_stats_text_view_view_user_detail_activity" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<TextView
android:id="@+id/comment_stats_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/comments"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/comments_count_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_comment_black_24" />
<TextView
android:id="@+id/comment_count_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/comments_count_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<ImageView
android:id="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/comment_count_text_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_arrow_upward_black_24dp" />
<TextView
android:id="@+id/upvote_count_comment_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="9dp"
android:text="0"
app:layout_constraintStart_toEndOf="@+id/upvote_count_comments_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/comment_stats_text_view_view_user_detail_activity" />
<TextView
android:id="@+id/account_created_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="Account Created"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/posts_count_icon_image_view_view_user_detail_activity" />
<ImageView
android:id="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
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_toBottomOf="@+id/account_created_text_view_view_user_detail_activity"
app:srcCompat="@drawable/ic_cake_24" />
<TextView
android:id="@+id/cake_day_text_view_view_user_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="11dp"
app:layout_constraintStart_toEndOf="@+id/account_created_cake_icon_image_view_view_user_detail_activity"
app:layout_constraintTop_toBottomOf="@+id/account_created_text_view_view_user_detail_activity" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/description_text_view_view_user_detail_activity"