ComposeActivity: put buttons into relativelayout and scrollview so they would not push send button outside of screen

main
Alibek Omarov 5 years ago
parent 8eb3b7ecca
commit 645098c3c7
  1. 29
      app/src/main/res/layout/activity_compose.xml

@ -295,7 +295,7 @@
app:behavior_peekHeight="0dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
@ -308,6 +308,18 @@
android:paddingEnd="8dp"
android:paddingBottom="4dp">
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/composeCharactersLeftView"
android:requiresFadingEdge="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/composeAddMediaButton"
style="@style/TuskyImageButton"
@ -385,11 +397,8 @@
android:tooltipText="@string/action_markdown"
android:visibility="gone"
app:srcCompat="@drawable/ic_markdown" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</HorizontalScrollView>
<TextView
android:id="@+id/composeCharactersLeftView"
@ -397,6 +406,8 @@
android:layout_height="wrap_content"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_medium"
android:layout_toLeftOf="@+id/composeTootButton"
android:layout_centerVertical="true"
tools:text="500" />
<com.keylesspalace.tusky.components.compose.view.TootButton
@ -405,8 +416,10 @@
android:layout_width="@dimen/toot_button_width"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textSize="?attr/status_text_medium" />
android:textSize="?attr/status_text_medium"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"/>
</LinearLayout>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

Loading…
Cancel
Save