mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 22:45:18 +01:00
Compose panel: Rework padding and alignments
Center components vertically and avoid giving a min height to the text field. Fixes #193
This commit is contained in:
parent
9aeb8be893
commit
11be260339
1 changed files with 35 additions and 44 deletions
|
@ -111,71 +111,62 @@
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/compose_panel"
|
|
||||||
android:id="@+id/chat_compose_panel"
|
android:id="@+id/chat_compose_panel"
|
||||||
|
android:background="@drawable/compose_panel"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true">
|
android:layout_alignParentBottom="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:src="@drawable/ic_msg_panel_smiles"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:scaleType="centerInside"
|
|
||||||
android:paddingLeft="4dp"
|
|
||||||
android:id="@+id/chat_smile_button"
|
android:id="@+id/chat_smile_button"
|
||||||
android:layout_alignBottom="@+id/chat_text_edit"/>
|
android:src="@drawable/ic_msg_panel_smiles"
|
||||||
|
android:scaleType="centerInside"
|
||||||
<ImageButton
|
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_centerVertical="true"/>
|
||||||
android:scaleType="centerInside"
|
|
||||||
|
<ImageButton
|
||||||
android:id="@+id/chat_send_button"
|
android:id="@+id/chat_send_button"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignBottom="@+id/chat_text_edit"
|
|
||||||
android:enabled="false"
|
|
||||||
android:src="@drawable/send_button_states"
|
android:src="@drawable/send_button_states"
|
||||||
android:background="@android:color/transparent"/>
|
android:enabled="false"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
<ImageButton
|
android:scaleType="centerInside"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:scaleType="centerInside"
|
|
||||||
android:id="@+id/chat_audio_send_button"
|
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignBottom="@+id/chat_text_edit"
|
android:layout_centerVertical="true"/>
|
||||||
android:enabled="false"
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/chat_audio_send_button"
|
||||||
android:src="@drawable/mic_button_states"
|
android:src="@drawable/mic_button_states"
|
||||||
android:paddingRight="4dp"
|
android:enabled="false"
|
||||||
android:background="@android:color/transparent"/>
|
android:background="@android:color/transparent"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/chat_text_edit"
|
||||||
|
android:inputType="textCapSentences|textMultiLine"
|
||||||
|
android:maxLines="4"
|
||||||
|
android:maxLength="16384"
|
||||||
|
android:ems="10"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textCursorDrawable="@null"
|
||||||
|
android:hint="@string/TypeMessage"
|
||||||
|
android:textColorHint="#909090"
|
||||||
|
android:imeOptions="flagNoExtractUi"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/chat_text_edit"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toRightOf="@id/chat_smile_button"
|
android:layout_toRightOf="@id/chat_smile_button"
|
||||||
android:layout_toLeftOf="@id/chat_send_button"
|
android:layout_toLeftOf="@id/chat_send_button"/>
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:maxLines="4"
|
|
||||||
android:minHeight="48dp"
|
|
||||||
android:textSize="18dp"
|
|
||||||
android:textColorHint="#909090"
|
|
||||||
android:ems="10"
|
|
||||||
android:imeOptions="flagNoExtractUi"
|
|
||||||
android:hint="@string/TypeMessage"
|
|
||||||
android:inputType="textCapSentences|textMultiLine"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:maxLength="16384"
|
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textColor="#000000"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue