Allow to scroll buttons for larger screen in conversation

This commit is contained in:
Thomas 2025-03-04 17:50:03 +01:00
parent cbed45da29
commit 01109c3842
3 changed files with 72 additions and 72 deletions

View file

@ -69,9 +69,8 @@ public class DividerDecoration extends RecyclerView.ItemDecoration {
StatusAdapter statusAdapter = ((StatusAdapter) parent.getAdapter());
if (statusAdapter != null && statusAdapter.getItemCount() > position && position > 0) {
Status status = statusAdapter.getItem(position);
int indentation = (status.isFocused?1:indentationMax);
int start = (int) Helper.convertDpToPixel(
6 * fontScale * CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentation),
6 * fontScale * CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax),
_mContext);
if (parent.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) {
@ -95,9 +94,6 @@ public class DividerDecoration extends RecyclerView.ItemDecoration {
int indentation = Math.min(
CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax),
indentationMax);
if(status.isFocused) {
indentation = 1;
}
if (indentation > 0) {
Paint paint = new Paint();
paint.setDither(false);

View file

@ -22,7 +22,6 @@ import static app.fedilab.android.activities.LoginActivity.client_secretLogin;
import static app.fedilab.android.activities.LoginActivity.currentInstanceLogin;
import static app.fedilab.android.activities.LoginActivity.requestedAdmin;
import static app.fedilab.android.activities.LoginActivity.softwareLogin;
import static app.fedilab.android.mastodon.helper.Helper.TAG;
import android.Manifest;
import android.content.Intent;
@ -263,7 +262,7 @@ public class FragmentLoginMain extends Fragment {
if (apiLogin != Account.API.PEERTUBE) {
retrievesClientId(currentInstanceLogin);
} else {
Intent peertubeLogin = new Intent(requireActivity(), LoginActivity.class);
Intent peertubeLogin = new Intent(requireActivity(), app.fedilab.android.peertube.activities.LoginActivity.class);
peertubeLogin.putExtra(Helper.ARG_INSTANCE, instance);
startActivity(peertubeLogin);
requireActivity().finish();

View file

@ -528,86 +528,91 @@
tools:text="Fedilab"
tools:visibility="visible" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/status_info"
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="6dp"
android:alpha="0.8"
android:gravity="center_vertical"
android:padding="6dp"
android:visibility="gone"
tools:visibility="visible">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="1 January 2021, 12:00" />
android:layout_marginEnd="6dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/reblog_info"
android:layout_width="wrap_content"
android:id="@+id/status_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
android:padding="6dp"
android:visibility="gone"
tools:visibility="visible">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="1 January 2021, 12:00" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/reblog_info"
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"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/favourite_info"
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"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/repeat_info"
android:contentDescription="@string/reblog"
android:id="@+id/visibility"
android:contentDescription="@string/visibility"
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" />
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_baseline_public_24" />
</androidx.appcompat.widget.LinearLayoutCompat>
</HorizontalScrollView>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/favourite_info"
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"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/visibility"
android:contentDescription="@string/visibility"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="12dp"
android:adjustViewBounds="true"
app:srcCompat="@drawable/ic_baseline_public_24" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/action_share_container"