feat(compose): move charCounter to action bar if relocatePublishButton is enabled

This commit is contained in:
FineFindus 2023-01-10 15:43:26 +01:00
parent f4e5baf94d
commit 1206ce6efc
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
3 changed files with 19 additions and 2 deletions

View File

@ -307,12 +307,14 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
draftsBtn=view.findViewById(R.id.drafts_btn);
draftsBtn.setVisibility(View.VISIBLE);
} else {
charCounter=view.findViewById(R.id.char_counter);
charCounter.setVisibility(View.VISIBLE);
charCounter.setText(String.valueOf(charLimit));
}
mainEditText=view.findViewById(R.id.toot_text);
mainEditTextWrap=view.findViewById(R.id.toot_text_wrap);
charCounter=view.findViewById(R.id.char_counter);
charCounter.setText(String.valueOf(charLimit));
scrollView=view.findViewById(R.id.scroll_view);
selfName=view.findViewById(R.id.self_name);
@ -748,6 +750,10 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
draftsBtn = wrap.findViewById(R.id.drafts_btn);
draftsBtn.setVisibility(View.VISIBLE);
}else{
charCounter = wrap.findViewById(R.id.char_counter);
charCounter.setVisibility(View.VISIBLE);
charCounter.setText(String.valueOf(charLimit));
}
// draftsBtn = wrap.findViewById(R.id.drafts_btn);

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@ -54,6 +55,15 @@
android:contentDescription="@string/sk_schedule_or_draft"
android:tooltipText="@string/sk_schedule_or_draft" />
<TextView
android:id="@+id/char_counter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/m3_body_large"
android:textColor="?android:textColorSecondary"
android:visibility="gone"
tools:text="500"/>
<Button
android:id="@+id/publish_btn"
android:layout_width="wrap_content"

View File

@ -422,6 +422,7 @@
android:layout_height="wrap_content"
android:textAppearance="@style/m3_body_large"
android:textColor="?android:textColorSecondary"
android:visibility="gone"
tools:text="500"/>
<Button