feat(compose): move charCounter to action bar if relocatePublishButton is enabled
This commit is contained in:
parent
f4e5baf94d
commit
1206ce6efc
|
@ -307,12 +307,14 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
|
|
||||||
draftsBtn=view.findViewById(R.id.drafts_btn);
|
draftsBtn=view.findViewById(R.id.drafts_btn);
|
||||||
draftsBtn.setVisibility(View.VISIBLE);
|
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);
|
mainEditText=view.findViewById(R.id.toot_text);
|
||||||
mainEditTextWrap=view.findViewById(R.id.toot_text_wrap);
|
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);
|
scrollView=view.findViewById(R.id.scroll_view);
|
||||||
|
|
||||||
selfName=view.findViewById(R.id.self_name);
|
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 = wrap.findViewById(R.id.drafts_btn);
|
||||||
draftsBtn.setVisibility(View.VISIBLE);
|
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);
|
// draftsBtn = wrap.findViewById(R.id.drafts_btn);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -54,6 +55,15 @@
|
||||||
android:contentDescription="@string/sk_schedule_or_draft"
|
android:contentDescription="@string/sk_schedule_or_draft"
|
||||||
android:tooltipText="@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
|
<Button
|
||||||
android:id="@+id/publish_btn"
|
android:id="@+id/publish_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -422,6 +422,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="@style/m3_body_large"
|
android:textAppearance="@style/m3_body_large"
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textColor="?android:textColorSecondary"
|
||||||
|
android:visibility="gone"
|
||||||
tools:text="500"/>
|
tools:text="500"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Reference in New Issue