Comment #48 - Add fetch more layout

pull/254/head
Thomas 2 years ago
parent 07af2ea9a5
commit 6a9c7c13a9

@ -105,6 +105,7 @@ import app.fedilab.android.client.entities.api.Poll;
import app.fedilab.android.client.entities.api.Status; import app.fedilab.android.client.entities.api.Status;
import app.fedilab.android.client.entities.app.StatusDraft; import app.fedilab.android.client.entities.app.StatusDraft;
import app.fedilab.android.client.entities.app.Timeline; import app.fedilab.android.client.entities.app.Timeline;
import app.fedilab.android.databinding.DrawerFetchMoreBinding;
import app.fedilab.android.databinding.DrawerStatusArtBinding; import app.fedilab.android.databinding.DrawerStatusArtBinding;
import app.fedilab.android.databinding.DrawerStatusBinding; import app.fedilab.android.databinding.DrawerStatusBinding;
import app.fedilab.android.databinding.DrawerStatusHiddenBinding; import app.fedilab.android.databinding.DrawerStatusHiddenBinding;
@ -1736,6 +1737,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
DrawerStatusBinding binding; DrawerStatusBinding binding;
DrawerStatusHiddenBinding bindingHidden; DrawerStatusHiddenBinding bindingHidden;
DrawerStatusReportBinding bindingReport; DrawerStatusReportBinding bindingReport;
DrawerFetchMoreBinding bindingFetchMore;
DrawerStatusNotificationBinding bindingNotification; DrawerStatusNotificationBinding bindingNotification;
DrawerStatusArtBinding bindingArt; DrawerStatusArtBinding bindingArt;
Timer timer; Timer timer;
@ -1762,6 +1764,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
bindingHidden = itemView; bindingHidden = itemView;
} }
StatusViewHolder(DrawerFetchMoreBinding itemView) {
super(itemView.getRoot());
bindingFetchMore = itemView;
}
StatusViewHolder(DrawerStatusArtBinding itemView) { StatusViewHolder(DrawerStatusArtBinding itemView) {
super(itemView.getRoot()); super(itemView.getRoot());
bindingArt = itemView; bindingArt = itemView;

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fetch_more"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="6dp"
android:text="@string/fetch_more_messages"
android:textColor="?colorAccent"
app:strokeColor="@color/cyanea_accent_dark_reference" />

@ -1613,6 +1613,7 @@
<string name="origin_report">Origin of reported account</string> <string name="origin_report">Origin of reported account</string>
<string name="status">Status</string> <string name="status">Status</string>
<string name="resolved">Resolved</string> <string name="resolved">Resolved</string>
<string name="fetch_more_messages">Fetch more messages…</string>
</resources> </resources>

Loading…
Cancel
Save