Use MaterialButtons for counters in status info line

This commit is contained in:
0xd9a 2025-08-20 01:58:46 +05:30
parent 38d01bc488
commit 6c225e2dbb
2 changed files with 20 additions and 44 deletions

View file

@ -1347,8 +1347,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
if (status.isFocused) { if (status.isFocused) {
holder.binding.statusInfo.setVisibility(View.VISIBLE); holder.binding.statusInfo.setVisibility(View.VISIBLE);
holder.binding.reblogsCount.setText(String.valueOf(status.reblogs_count)); holder.binding.reblogInfo.setText(String.valueOf(status.reblogs_count));
holder.binding.favoritesCount.setText(String.valueOf(status.favourites_count)); holder.binding.favouriteInfo.setText(String.valueOf(status.favourites_count));
if (statusToDeal.edited_at != null) { if (statusToDeal.edited_at != null) {
holder.binding.editTime.setText(context.getString(R.string.edited_message_at, Helper.longDateToString(status.edited_at))); holder.binding.editTime.setText(context.getString(R.string.edited_message_at, Helper.longDateToString(status.edited_at)));
@ -3203,10 +3203,10 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
holder.binding.poll.pollInfo.setTextColor(theme_text_color); holder.binding.poll.pollInfo.setTextColor(theme_text_color);
holder.binding.cardDescription.setTextColor(theme_text_color); holder.binding.cardDescription.setTextColor(theme_text_color);
holder.binding.time.setTextColor(theme_text_color); holder.binding.time.setTextColor(theme_text_color);
holder.binding.reblogsCount.setTextColor(theme_text_color); holder.binding.reblogInfo.setTextColor(theme_text_color);
holder.binding.favoritesCount.setTextColor(theme_text_color); holder.binding.favouriteInfo.setTextColor(theme_text_color);
Helper.changeDrawableColor(context, holder.binding.repeatInfo, theme_text_color); Helper.changeDrawableColor(context, holder.binding.reblogInfo, theme_text_color);
Helper.changeDrawableColor(context, holder.binding.favInfo, theme_text_color); Helper.changeDrawableColor(context, holder.binding.favouriteInfo, theme_text_color);
Helper.changeDrawableColor(context, R.drawable.ic_baseline_lock_24, theme_text_color); Helper.changeDrawableColor(context, R.drawable.ic_baseline_lock_24, theme_text_color);
} }
if (theme_text_header_1_line != -1) { if (theme_text_header_1_line != -1) {

View file

@ -568,51 +568,27 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="1 January 2021, 12:00" /> tools:text="1 January 2021, 12:00" />
<androidx.appcompat.widget.LinearLayoutCompat <com.google.android.material.button.MaterialButton
android:id="@+id/reblog_info" android:id="@+id/reblog_info"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:minWidth="48dp"
android:orientation="horizontal"> android:textColor="?attr/colorControlNormal"
app:icon="@drawable/ic_repeat"
app:iconTint="?attr/colorControlNormal"
tools:text="10" />
<androidx.appcompat.widget.AppCompatImageView <com.google.android.material.button.MaterialButton
android:id="@+id/repeat_info"
android:contentDescription="@string/reblog"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="12dp"
app:srcCompat="@drawable/ic_repeat" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/reblogs_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/favourite_info" android:id="@+id/favourite_info"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:minWidth="48dp"
android:orientation="horizontal"> android:textColor="?attr/colorControlNormal"
app:icon="@drawable/ic_star_outline"
<androidx.appcompat.widget.AppCompatImageView app:iconTint="?attr/colorControlNormal"
android:id="@+id/fav_info" tools:text="10" />
android:layout_width="20dp"
android:contentDescription="@string/favourite"
android:layout_height="20dp"
android:layout_marginStart="12dp"
app:srcCompat="@drawable/ic_star_outline" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/favorites_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
<View <View
android:layout_width="0dp" android:layout_width="0dp"