Reply improvements (#432)
* Refactor ComposeActivity intent. Fix bug with URLs When user saved toot link was removed from the text field itself, not only from the text to be saved. * Show what you reply to Closes #119
This commit is contained in:
parent
2d390f6603
commit
62f4837135
10 changed files with 260 additions and 78 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/activity_compose"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -18,12 +18,38 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reply_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:text="Reply to @username"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reply_content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="?attr/compose_reply_content_background"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:visibility="gone"
|
||||
tools:text="Post content which may be preeettyy long, so please, make sure there's enough room for everything, okay? Not kidding. I wish Eugen answered me more often, sigh."
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/compose_content_warning_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="8dp">
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/field_content_warning"
|
||||
|
@ -31,16 +57,16 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:ems="10"
|
||||
android:hint="@string/hint_content_warning"
|
||||
android:inputType="text|textCapSentences"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:hint="@string/hint_content_warning"
|
||||
android:inputType="text|textCapSentences" />
|
||||
android:paddingRight="16dp" />
|
||||
|
||||
<View
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -54,16 +80,16 @@
|
|||
android:paddingRight="16dp">
|
||||
|
||||
<com.keylesspalace.tusky.view.EditTextTyped
|
||||
android:id="@+id/compose_edit_field"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/compose_edit_field"
|
||||
android:background="@android:color/transparent"
|
||||
android:completionThreshold="2"
|
||||
android:dropDownWidth="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="start|top"
|
||||
android:hint="@string/hint_compose"
|
||||
android:inputType="text|textMultiLine|textCapSentences"
|
||||
android:dropDownWidth="wrap_content"
|
||||
android:completionThreshold="2" />
|
||||
android:inputType="text|textMultiLine|textCapSentences" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -96,10 +122,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="4dp">
|
||||
|
||||
<ImageButton
|
||||
|
@ -107,57 +133,57 @@
|
|||
style="?attr/image_button_style"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:contentDescription="@string/action_photo_pick"
|
||||
android:paddingBottom="4dp"
|
||||
app:srcCompat="@drawable/ic_attach_file_24dp"
|
||||
android:contentDescription="@string/action_photo_pick" />
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="4dp"
|
||||
app:srcCompat="@drawable/ic_attach_file_24dp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_toggle_visibility"
|
||||
style="?attr/image_button_style"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:contentDescription="@string/action_compose_options"
|
||||
android:paddingBottom="4dp"
|
||||
app:srcCompat="@drawable/ic_public_24dp"
|
||||
android:contentDescription="@string/action_compose_options" />
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="4dp"
|
||||
app:srcCompat="@drawable/ic_public_24dp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/compose_save_draft"
|
||||
style="?attr/image_button_style"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:contentDescription="@string/action_save"
|
||||
android:paddingBottom="4dp"
|
||||
app:srcCompat="@drawable/ic_save_24dp"
|
||||
android:contentDescription="@string/action_save" />
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="4dp"
|
||||
app:srcCompat="@drawable/ic_save_24dp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_hide_media"
|
||||
style="?attr/image_button_style"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:srcCompat="@drawable/ic_hide_media_24dp"
|
||||
android:contentDescription="@string/action_hide_media"
|
||||
android:visibility="gone" />
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_hide_media_24dp" />
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:layout_width="0dp"
|
||||
|
@ -172,11 +198,11 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/floating_btn"
|
||||
android:background="@drawable/compose_button_colors"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/compose_button_colors"
|
||||
android:text="@string/action_send"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue