Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
52d9658
Use software layerType for post content area. Fixes text overlap issu…
roundhill Nov 19, 2013
c0a3391
Added increased line spacing in post content area. Fixes #304. Also i…
roundhill Nov 19, 2013
d072b06
Also set text selection end, if it is valid. Fixes #324.
roundhill Nov 20, 2013
58c948d
Post editor switched to tabbed interface. New fragments for editing p…
roundhill Nov 22, 2013
053cc81
Reorganized the post settings fragment layout. Mostly a de-uglification.
roundhill Nov 22, 2013
1a69250
Cleaned up lint warnings in EditPostContentFragment.
roundhill Nov 22, 2013
db28c9e
Sharing intent fixes
roundhill Nov 22, 2013
05bdade
Simplified code that was checking span styles after the user typed. J…
roundhill Nov 22, 2013
eabcc6c
Optimized the ‘formatBtnClick’ method (renamed it too!) to use way fa…
roundhill Nov 23, 2013
b7c2e40
Comment fix.
roundhill Nov 23, 2013
07413a6
Editor changes:
roundhill Nov 25, 2013
5187c91
Merge branch 'develop' into feature/posting-improvements
roundhill Nov 26, 2013
a006173
Remove now unused action bar layout.
roundhill Nov 26, 2013
6198f9a
Pass correct context to getPostFormatsTask(). Fixes force close.
roundhill Nov 26, 2013
a6db771
Fixed some warnings and code formatting in EditPostSettingsFragment
roundhill Nov 26, 2013
162286b
Tab text color fix
roundhill Nov 26, 2013
d65a4da
Fixed initLocation() force close by passing fragment root view to met…
roundhill Nov 26, 2013
3dbabc6
More reliable method for detecting when the soft keyboard dismisses.
roundhill Nov 26, 2013
7c6757e
* Added basic post preview fragment to post editor.
roundhill Nov 27, 2013
90233bb
Cleaned up some code in EditPostContentFragment, fixed constant refer…
roundhill Nov 27, 2013
95043eb
Fixed quick video/photo field from not being set.
roundhill Nov 27, 2013
d9537bc
Launch the media picker when creating a new gallery from a post. Fixe…
roundhill Nov 27, 2013
ef540be
Fixed an issue where the cancel prompt would appear early if the soft…
roundhill Nov 28, 2013
abc06bb
Update the mOriginalViewBottom value when the device rotates.
roundhill Nov 28, 2013
02f263f
Merge branch 'develop' into feature/posting-improvements
roundhill Nov 28, 2013
1481c93
Moved mixpanel stats calls in to new edit post fragments.
roundhill Nov 28, 2013
07408d8
Merge branch 'develop' into feature/posting-improvements
roundhill Nov 28, 2013
b8d4181
Restored autosave functionality
roundhill Dec 2, 2013
689afa9
Removed tabs from post editor.
roundhill Dec 3, 2013
069b6db
Formatting toolbar improvements:
roundhill Dec 3, 2013
eb8d3bd
Merge branch 'develop' into feature/posting-improvements
roundhill Dec 4, 2013
5d88bc1
Renamed NewEditPostActivity, fixed f/c when using edit button in Post…
roundhill Dec 4, 2013
bfbd508
Cleaned up some unused code and added toast message when downloading …
roundhill Dec 4, 2013
dd41e50
Adding patch from https://github.com/wordpress-mobile/WordPress-Andro…
roundhill Dec 4, 2013
f3154b0
* Media can now be selected from apps/sources outside of the local a…
roundhill Dec 4, 2013
3491153
Don’t convert the post images to <img> tags when saving the post for …
roundhill Dec 5, 2013
52e9bad
Change post date selection from DatePickerDialogs to regular alert di…
roundhill Dec 6, 2013
6ddf1fd
Enter full screen editor when ‘Next’ button is pressed while editing …
roundhill Dec 6, 2013
afe8e28
Reordered post settings items to have more frequently used settings a…
roundhill Dec 6, 2013
dc601a8
Formatting toolbar icons
Dec 6, 2013
12c724c
Use holo light dialog theme for devices > v11.
roundhill Dec 6, 2013
b93f8ff
Merge branch 'feature/posting-improvements' of https://github.com/wor…
roundhill Dec 6, 2013
439c8d0
Set title EditText’s visibility to GONE when the animation starts, so…
roundhill Dec 6, 2013
d334f99
If user is using quick photo/video and cancels, delete the new post a…
roundhill Dec 6, 2013
531ea8f
* Placed new icons from @isaackeyet in the formatting toolbar.
roundhill Dec 6, 2013
909aeb2
Cleaned up some compiler warnings.
roundhill Dec 6, 2013
3330f40
Show the soft keyboard after adding media.
roundhill Dec 6, 2013
9ceec5d
Merge branch 'develop' into feature/posting-improvements
roundhill Dec 6, 2013
af23bba
Set time format based on device settings. Props @nbradbury
roundhill Dec 6, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
<activity
android:name=".ui.posts.EditLinkActivity"
android:label="@string/create_a_link"
android:theme="@style/WordPress.Dialog" />
android:theme="@style/WordPress.Dialog"
android:windowSoftInputMode="stateVisible" />
<activity
android:name=".ui.posts.EditPostActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
Expand Down
Binary file added res/drawable-hdpi/ab_icon_accept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_post_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_post_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_italic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_media.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_more.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_quote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_strikethrough.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/icon_format_underline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/write.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ab_icon_accept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_post_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_post_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_italic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_media.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_more.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_quote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_strikethrough.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/icon_format_underline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ab_icon_accept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_post_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_post_settings.png
Binary file added res/drawable-xhdpi/icon_format_bold.png
Binary file added res/drawable-xhdpi/icon_format_italic.png
Binary file added res/drawable-xhdpi/icon_format_link.png
Binary file added res/drawable-xhdpi/icon_format_media.png
Binary file added res/drawable-xhdpi/icon_format_more.png
Binary file added res/drawable-xhdpi/icon_format_quote.png
Binary file added res/drawable-xhdpi/icon_format_strikethrough.png
Binary file added res/drawable-xhdpi/icon_format_underline.png
Binary file added res/drawable-xxhdpi/ab_icon_accept.png
Binary file added res/drawable-xxhdpi/ic_post_preview.png
Binary file added res/drawable-xxhdpi/ic_post_settings.png
41 changes: 11 additions & 30 deletions res/drawable/format_bar_bg.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<padding
android:top="1dp"
android:bottom="1dp" />
<solid android:color="#e0e0e0" />
</shape>
</item>
<item>
<shape>
<padding android:top="1dp" />
<solid android:color="@color/grey_light" />
</shape>
</item>

<item>
<shape>
<padding
android:top="1dp" />
<solid android:color="#ffffff" />
</shape>
</item>
<item>
<shape>
<padding
android:top="1dp"
android:right="1dp"
android:bottom="1dp"
android:left="1dp" />
<gradient
android:startColor="#F0F0F0"
android:centerColor="#F0F0F0"
android:endColor="#FFFFFF"
android:height="1dp"
android:angle="90" />
</shape>
</item>
<item>
<shape>
<solid android:color="@color/grey_extra_light" />
</shape>
</item>
</layer-list>
15 changes: 15 additions & 0 deletions res/drawable/format_bar_bg_bottom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<padding android:bottom="1dp" />
<solid android:color="@color/grey_light" />
</shape>
</item>

<item>
<shape>
<solid android:color="@color/grey_extra_light" />
</shape>
</item>
</layer-list>
4 changes: 2 additions & 2 deletions res/drawable/format_bar_btn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
android:top="4dp"
android:bottom="4dp"/>
<solid android:color="@android:color/transparent" />
<corners android:radius="1dp" android:bottomRightRadius="4dp" android:bottomLeftRadius="4dp"
android:topLeftRadius="4dp" android:topRightRadius="4dp"/>
<corners android:radius="1dp" android:bottomRightRadius="4dp" android:bottomLeftRadius="4dp"
android:topLeftRadius="4dp" android:topRightRadius="4dp"/>
</shape>
</item>
</layer-list>
15 changes: 0 additions & 15 deletions res/drawable/format_bar_btn_toggled.xml

This file was deleted.

4 changes: 2 additions & 2 deletions res/drawable/wp_button_toggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_checked="false"
android:drawable="@drawable/format_bar_btn" />
android:drawable="@android:color/transparent" />
<item
android:state_checked="true"
android:drawable="@drawable/format_bar_btn_toggled" />
android:drawable="@color/pressed_wordpress" />
</selector>
6 changes: 5 additions & 1 deletion res/layout/edit.xml → res/layout/activity_edit_post.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textSize="22sp"
android:hint="@string/title"
android:inputType="textCapSentences|textAutoCorrect" />

Expand All @@ -38,10 +39,13 @@
android:layout_height="wrap_content"
android:gravity="top"
android:hint="@string/post_content"
android:lineSpacingExtra="4dp"
android:textSize="18sp"
android:inputType="textMultiLine|textCapSentences|textAutoCorrect"
android:minLines="@integer/content_editor_min_lines"
android:paddingBottom="@dimen/content_edit_padding"
android:textColorLink="#21759b" />
android:textColorLink="#21759b"
android:layerType="software" />

<EditText
android:id="@+id/postExcerpt"
Expand Down
6 changes: 6 additions & 0 deletions res/layout/activity_new_edit_post.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<org.wordpress.android.util.WPViewPager xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".EditPostActivity" />
159 changes: 159 additions & 0 deletions res/layout/fragment_edit_post_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:fillViewport="true"
android:layout_weight="1">

<LinearLayout
android:id="@+id/post_content_wrapper"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<EditText
android:id="@+id/post_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:textSize="22sp"
android:hint="@string/title"
android:inputType="textCapSentences|textAutoCorrect" />

<org.wordpress.android.util.WPEditText
android:id="@+id/post_content"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="8dp"
android:gravity="top"
android:layout_weight="1"
android:hint="@string/post_content"
android:background="@null"
android:lineSpacingExtra="4dp"
android:textSize="18sp"
android:inputType="textMultiLine|textCapSentences|textAutoCorrect"
android:imeOptions="flagNoExtractUi"
android:textColorLink="#21759b" />
</LinearLayout>
</ScrollView>

<LinearLayout
android:id="@+id/post_settings_wrapper"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@drawable/list_divider" />

<Button
android:id="@+id/post_settings_button"
android:layout_width="fill_parent"
android:layout_height="48dp"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:textSize="18sp"
android:drawableLeft="@drawable/ic_post_settings"
android:background="@drawable/selectable_background_wordpress"
android:text="@string/post_settings"
android:drawablePadding="6dp"
android:layout_gravity="bottom"/>

</LinearLayout>

<LinearLayout
android:id="@+id/format_bar"
android:layout_width="fill_parent"
android:layout_height="@dimen/format_bar_height"
android:layout_gravity="bottom"
android:background="@drawable/format_bar_bg"
android:orientation="horizontal"
android:paddingTop="1dp"
android:visibility="gone">

<HorizontalScrollView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ToggleButton
android:id="@+id/bold"
style="@style/WordPress.ToggleButton"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:button="@drawable/icon_format_bold" />

<ToggleButton
android:id="@+id/em"
style="@style/WordPress.ToggleButton"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:button="@drawable/icon_format_italic" />

<ToggleButton
android:id="@+id/underline"
style="@style/WordPress.ToggleButton"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:button="@drawable/icon_format_underline" />

<ToggleButton
android:id="@+id/strike"
style="@style/WordPress.ToggleButton"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:button="@drawable/icon_format_strikethrough" />

<ToggleButton
android:id="@+id/bquote"
style="@style/WordPress.ToggleButton"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:button="@drawable/icon_format_quote" />

<ImageButton
android:id="@+id/link"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/icon_format_link"
android:background="@drawable/selectable_background_wordpress"
android:contentDescription="@string/create_a_link"/>

<ImageButton
android:id="@+id/more"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/selectable_background_wordpress"
android:src="@drawable/icon_format_more"
android:contentDescription="@string/more_tag"
/>
</LinearLayout>
</HorizontalScrollView>

<ImageButton
android:id="@+id/addPictureButton"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/selectable_background_wordpress"
android:contentDescription="@string/content_description_add_media"
android:src="@drawable/icon_format_media" />
</LinearLayout>

</LinearLayout>
21 changes: 21 additions & 0 deletions res/layout/fragment_edit_post_preview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<WebView
android:id="@+id/post_preview_webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

<TextView
android:id="@+id/post_preview_textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
android:padding="16dp"
android:textSize="18sp"
android:visibility="gone" />
</FrameLayout>
Loading