Merge branch 'feature/publish_button_improvements'

This commit is contained in:
LucasGGamerM 2022-12-29 14:04:08 -03:00
commit a0b62ab434
5 changed files with 20 additions and 2 deletions

View File

@ -301,8 +301,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
if(GlobalUserPreferences.relocatePublishButton){ if(GlobalUserPreferences.relocatePublishButton){
publishButton=view.findViewById(R.id.publish); publishButton=view.findViewById(R.id.publish);
publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save); // publishButton.setText(editingStatus==null || redraftStatus ? R.string.publish : R.string.save);
publishButton.setEllipsize(TextUtils.TruncateAt.END);
publishButton.setOnClickListener(this::onPublishClick); publishButton.setOnClickListener(this::onPublishClick);
publishButton.setSingleLine(true);
publishButton.setVisibility(View.VISIBLE); publishButton.setVisibility(View.VISIBLE);
} }

View File

@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M5.694 12L2.299 3.27C2.063 2.664 2.655 2.083 3.241 2.29l0.093 0.039 18 9c0.518 0.259 0.55 0.968 0.097 1.284l-0.097 0.058-18 9c-0.583 0.291-1.216-0.245-1.065-0.848l0.03-0.095L5.694 12 2.299 3.27 5.694 12zM4.402 4.54l2.61 6.71h6.627c0.38 0 0.693 0.282 0.743 0.648L14.389 12c0 0.38-0.282 0.693-0.649 0.743l-0.1 0.007H7.01l-2.609 6.71L19.322 12 4.401 4.54z" android:fillColor="?colorButtonText"/>
</vector>

View File

@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M5.694 12L2.299 3.27C2.063 2.664 2.655 2.083 3.241 2.29l0.093 0.039 18 9c0.518 0.259 0.55 0.968 0.097 1.284l-0.097 0.058-18 9c-0.583 0.291-1.216-0.245-1.065-0.848l0.03-0.095L5.694 12 2.299 3.27 5.694 12zM4.402 4.54l2.61 6.71h6.627c0.38 0 0.693 0.282 0.743 0.648L14.389 12c0 0.38-0.282 0.693-0.649 0.743l-0.1 0.007H7.01l-2.609 6.71L19.322 12 4.401 4.54z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_activated="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_checked="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_selected="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_enabled" android:state_enabled="true"/>
<item android:drawable="@drawable/ic_fluent_send_24_regular"/>
</selector>

View File

@ -294,7 +294,7 @@
android:id="@+id/btn_visibility" android:id="@+id/btn_visibility"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginEnd="24dp" android:layout_marginEnd="16dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:padding="0px" android:padding="0px"
android:tint="@color/compose_button" android:tint="@color/compose_button"
@ -322,6 +322,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:visibility="gone" android:visibility="gone"
android:tooltipText="@string/publish"
android:drawableStart="@drawable/ic_fluent_send_24_selector"
/> />
</LinearLayout> </LinearLayout>