mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Click user names in comment to view the user's details. Minor visual redesign.
This commit is contained in:
parent
86bc381906
commit
ebc2cac0a6
@ -68,7 +68,14 @@ class CommentMultiLevelRecyclerViewAdapter extends MultiLevelAdapter {
|
|||||||
public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) {
|
public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) {
|
||||||
final CommentData commentItem = mCommentData.get(position);
|
final CommentData commentItem = mCommentData.get(position);
|
||||||
|
|
||||||
((CommentViewHolder) holder).authorTextView.setText(commentItem.getAuthor());
|
String authorPrefixed = "u/" + commentItem.getAuthor();
|
||||||
|
((CommentViewHolder) holder).authorTextView.setText(authorPrefixed);
|
||||||
|
((CommentViewHolder) holder).authorTextView.setOnClickListener(view -> {
|
||||||
|
Intent intent = new Intent(mContext, ViewUserDetailActivity.class);
|
||||||
|
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, commentItem.getAuthor());
|
||||||
|
mContext.startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
((CommentViewHolder) holder).commentTimeTextView.setText(commentItem.getCommentTime());
|
((CommentViewHolder) holder).commentTimeTextView.setText(commentItem.getCommentTime());
|
||||||
SpannableConfiguration spannableConfiguration = SpannableConfiguration.builder(mContext).linkResolver((view, link) -> {
|
SpannableConfiguration spannableConfiguration = SpannableConfiguration.builder(mContext).linkResolver((view, link) -> {
|
||||||
if(link.startsWith("/u/")) {
|
if(link.startsWith("/u/")) {
|
||||||
|
@ -222,6 +222,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
((DataViewHolder) holder).subredditNameTextView.setTextColor(mContext.getResources().getColor(R.color.colorAccent));
|
||||||
((DataViewHolder) holder).subredditNameTextView.setText(subredditNamePrefixed);
|
((DataViewHolder) holder).subredditNameTextView.setText(subredditNamePrefixed);
|
||||||
|
|
||||||
((DataViewHolder) holder).subredditNameTextView.setOnClickListener(view -> {
|
((DataViewHolder) holder).subredditNameTextView.setOnClickListener(view -> {
|
||||||
@ -305,6 +306,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
((DataViewHolder) holder).subredditNameTextView.setTextColor(mContext.getResources().getColor(R.color.colorPrimaryDark));
|
||||||
((DataViewHolder) holder).subredditNameTextView.setText(author);
|
((DataViewHolder) holder).subredditNameTextView.setText(author);
|
||||||
|
|
||||||
((DataViewHolder) holder).subredditNameTextView.setOnClickListener(view -> {
|
((DataViewHolder) holder).subredditNameTextView.setOnClickListener(view -> {
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@color/colorAccent"
|
android:textColor="@color/colorPrimaryDark"
|
||||||
android:layout_gravity="center_horizontal"/>
|
android:layout_gravity="center_horizontal"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -47,7 +47,8 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginBottom="8dp"/>
|
android:layout_marginBottom="8dp"
|
||||||
|
android:textColor="@android:color/black"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/relative_layout_item_post_comment"
|
android:id="@+id/relative_layout_item_post_comment"
|
||||||
|
Loading…
Reference in New Issue
Block a user