mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-09-15 08:20:18 +03:00
Use MaterialButtons for counters in status info line
This commit is contained in:
parent
38d01bc488
commit
6c225e2dbb
2 changed files with 20 additions and 44 deletions
|
@ -1347,8 +1347,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
|
||||
if (status.isFocused) {
|
||||
holder.binding.statusInfo.setVisibility(View.VISIBLE);
|
||||
holder.binding.reblogsCount.setText(String.valueOf(status.reblogs_count));
|
||||
holder.binding.favoritesCount.setText(String.valueOf(status.favourites_count));
|
||||
holder.binding.reblogInfo.setText(String.valueOf(status.reblogs_count));
|
||||
holder.binding.favouriteInfo.setText(String.valueOf(status.favourites_count));
|
||||
|
||||
if (statusToDeal.edited_at != null) {
|
||||
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.cardDescription.setTextColor(theme_text_color);
|
||||
holder.binding.time.setTextColor(theme_text_color);
|
||||
holder.binding.reblogsCount.setTextColor(theme_text_color);
|
||||
holder.binding.favoritesCount.setTextColor(theme_text_color);
|
||||
Helper.changeDrawableColor(context, holder.binding.repeatInfo, theme_text_color);
|
||||
Helper.changeDrawableColor(context, holder.binding.favInfo, theme_text_color);
|
||||
holder.binding.reblogInfo.setTextColor(theme_text_color);
|
||||
holder.binding.favouriteInfo.setTextColor(theme_text_color);
|
||||
Helper.changeDrawableColor(context, holder.binding.reblogInfo, theme_text_color);
|
||||
Helper.changeDrawableColor(context, holder.binding.favouriteInfo, theme_text_color);
|
||||
Helper.changeDrawableColor(context, R.drawable.ic_baseline_lock_24, theme_text_color);
|
||||
}
|
||||
if (theme_text_header_1_line != -1) {
|
||||
|
|
|
@ -568,52 +568,28 @@
|
|||
android:layout_height="wrap_content"
|
||||
tools:text="1 January 2021, 12:00" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reblog_info"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
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"
|
||||
android:minWidth="48dp"
|
||||
android:textColor="?attr/colorControlNormal"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:iconTint="?attr/colorControlNormal"
|
||||
tools:text="10" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/favourite_info"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/fav_info"
|
||||
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"
|
||||
android:minWidth="48dp"
|
||||
android:textColor="?attr/colorControlNormal"
|
||||
app:icon="@drawable/ic_star_outline"
|
||||
app:iconTint="?attr/colorControlNormal"
|
||||
tools:text="10" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
|
Loading…
Reference in a new issue