forked from mirrors/Fedilab
Option to align left message bottom buttons
This commit is contained in:
parent
e23d2caf00
commit
3ea4559f69
5 changed files with 23 additions and 2 deletions
|
@ -71,6 +71,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||||
import androidx.appcompat.widget.PopupMenu;
|
import androidx.appcompat.widget.PopupMenu;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintSet;
|
||||||
import androidx.core.app.ActivityOptionsCompat;
|
import androidx.core.app.ActivityOptionsCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
@ -413,6 +414,14 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
boolean extraFeatures = sharedpreferences.getBoolean(context.getString(R.string.SET_EXTAND_EXTRA_FEATURES) + MainActivity.currentUserID + MainActivity.currentInstance, false);
|
boolean extraFeatures = sharedpreferences.getBoolean(context.getString(R.string.SET_EXTAND_EXTRA_FEATURES) + MainActivity.currentUserID + MainActivity.currentInstance, false);
|
||||||
boolean displayQuote = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_QUOTES) + MainActivity.currentUserID + MainActivity.currentInstance, true);
|
boolean displayQuote = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_QUOTES) + MainActivity.currentUserID + MainActivity.currentInstance, true);
|
||||||
boolean displayReactions = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_REACTIONS) + MainActivity.currentUserID + MainActivity.currentInstance, true);
|
boolean displayReactions = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_REACTIONS) + MainActivity.currentUserID + MainActivity.currentInstance, true);
|
||||||
|
boolean compactButtons = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_COMPACT_ACTION_BUTTON), false);
|
||||||
|
|
||||||
|
if (compactButtons) {
|
||||||
|
ConstraintSet set = new ConstraintSet();
|
||||||
|
set.clone(holder.binding.actionButtons);
|
||||||
|
set.clear(R.id.status_emoji, ConstraintSet.END);
|
||||||
|
set.applyTo(holder.binding.actionButtons);
|
||||||
|
}
|
||||||
|
|
||||||
if (removeLeftMargin) {
|
if (removeLeftMargin) {
|
||||||
LinearLayoutCompat.MarginLayoutParams p = (LinearLayoutCompat.MarginLayoutParams) holder.binding.spoiler.getLayoutParams();
|
LinearLayoutCompat.MarginLayoutParams p = (LinearLayoutCompat.MarginLayoutParams) holder.binding.spoiler.getLayoutParams();
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="fab_margin">200dp</dimen>
|
<dimen name="fab_margin">48dp</dimen>
|
||||||
</resources>
|
</resources>
|
|
@ -1,3 +1,3 @@
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="fab_margin">48dp</dimen>
|
<dimen name="fab_margin">32dp</dimen>
|
||||||
</resources>
|
</resources>
|
|
@ -1371,6 +1371,8 @@
|
||||||
<string name="SET_UNFOLLOW_VALIDATION" translatable="false">SET_UNFOLLOW_VALIDATION</string>
|
<string name="SET_UNFOLLOW_VALIDATION" translatable="false">SET_UNFOLLOW_VALIDATION</string>
|
||||||
<string name="SET_USE_SINGLE_TOPBAR" translatable="false">SET_USE_SINGLE_TOPBAR</string>
|
<string name="SET_USE_SINGLE_TOPBAR" translatable="false">SET_USE_SINGLE_TOPBAR</string>
|
||||||
<string name="SET_DISPLAY_COUNTERS" translatable="false">SET_DISPLAY_COUNTERS</string>
|
<string name="SET_DISPLAY_COUNTERS" translatable="false">SET_DISPLAY_COUNTERS</string>
|
||||||
|
<string name="SET_DISPLAY_COMPACT_ACTION_BUTTON" translatable="false">SET_DISPLAY_COMPACT_ACTION_BUTTON</string>
|
||||||
|
|
||||||
<string name="SET_TIMELINES_IN_A_LIST" translatable="false">SET_TIMELINES_IN_A_LIST</string>
|
<string name="SET_TIMELINES_IN_A_LIST" translatable="false">SET_TIMELINES_IN_A_LIST</string>
|
||||||
<string name="SET_LED_COLOUR_VAL_N" translatable="false">SET_LED_COLOUR_VAL_N</string>
|
<string name="SET_LED_COLOUR_VAL_N" translatable="false">SET_LED_COLOUR_VAL_N</string>
|
||||||
<string name="SET_SHOW_BOOSTS" translatable="false">SET_SHOW_BOOSTS</string>
|
<string name="SET_SHOW_BOOSTS" translatable="false">SET_SHOW_BOOSTS</string>
|
||||||
|
@ -2201,4 +2203,6 @@
|
||||||
<string name="local_only">Local only</string>
|
<string name="local_only">Local only</string>
|
||||||
<string name="set_display_local_only">Display \"Local only\" button</string>
|
<string name="set_display_local_only">Display \"Local only\" button</string>
|
||||||
<string name="set_pixelfed_presentation">Pixelfed presentation for media</string>
|
<string name="set_pixelfed_presentation">Pixelfed presentation for media</string>
|
||||||
|
<string name="set_display_compact_buttons">Compact action buttons</string>
|
||||||
|
<string name="set_display_compact_buttons_description">Buttons at the bottom of messages will not take the whole width</string>
|
||||||
</resources>
|
</resources>
|
|
@ -53,6 +53,14 @@
|
||||||
app:summary="@string/set_display_counters_description"
|
app:summary="@string/set_display_counters_description"
|
||||||
app:title="@string/set_display_counters" />
|
app:title="@string/set_display_counters" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
|
app:key="@string/SET_DISPLAY_COMPACT_ACTION_BUTTON"
|
||||||
|
app:singleLineTitle="false"
|
||||||
|
app:summary="@string/set_display_compact_buttons_description"
|
||||||
|
app:title="@string/set_display_compact_buttons" />
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
app:defaultValue="true"
|
app:defaultValue="true"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
|
|
Loading…
Reference in a new issue