From 5623468e6a975f45b2183f938804e6dac4d64b63 Mon Sep 17 00:00:00 2001 From: Dan Roundhill Date: Fri, 9 Aug 2013 12:58:42 -0700 Subject: [PATCH] Adding @aagam94's post excerpt patch with a few tweaks: * Modified existing post constructor instead of creating another one. * Used 'Excerpt' instead of 'Post excerpt' string to match up with core editor. * Tweaked the layout margins a bit. * Hid the excerpt field if the user is editing a Page. --- res/layout/edit.xml | 459 +++++++++--------- res/values/strings.xml | 1 + src/org/wordpress/android/WordPressDB.java | 6 +- src/org/wordpress/android/models/Post.java | 3 +- .../android/ui/posts/EditPostActivity.java | 270 ++++++----- 5 files changed, 381 insertions(+), 358 deletions(-) diff --git a/res/layout/edit.xml b/res/layout/edit.xml index 4a5ca068f585..927dc80975f2 100644 --- a/res/layout/edit.xml +++ b/res/layout/edit.xml @@ -1,134 +1,147 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#FFFFFFFF" + android:orientation="vertical"> - - + android:scrollbars="vertical"> - + android:orientation="vertical" + android:padding="8dp"> - + android:layout_marginBottom="10dp" + android:orientation="vertical"> + + + android:id="@+id/postContent" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingBottom="@dimen/content_edit_padding" + android:gravity="top" + android:hint="@string/post_content" + android:inputType="textMultiLine|textCapSentences|textAutoCorrect" + android:minLines="@integer/content_editor_min_lines" + android:textColorLink="#21759b"/> + + + - - + android:layout_marginBottom="8dp" + android:orientation="vertical"> + + + android:text="@string/categories"/> + android:layout_height="wrap_content" + android:id="@+id/sectionCategories" + android:paddingLeft="8dp"> + android:id="@+id/sectionLocation" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_marginBottom="10dp" + android:orientation="vertical" + android:visibility="gone"> + android:id="@+id/locationText" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginLeft="12dp" + android:layout_marginRight="4dp" + android:layout_marginTop="4dp" + android:text="@string/loading"/>