Skip to content

Commit

Permalink
Merge pull request #511 from wordpress-mobile/issue/editor-issues
Browse files Browse the repository at this point in the history
Issue/editor issues
  • Loading branch information
nbradbury committed Dec 17, 2013
2 parents 6a2f7dd + 39d1170 commit e4ad17f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
3 changes: 2 additions & 1 deletion res/layout/fragment_edit_post_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:focusableInTouchMode="true">

<ScrollView
android:layout_width="fill_parent"
Expand Down
15 changes: 0 additions & 15 deletions src/org/wordpress/android/ui/posts/EditPostContentFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,6 @@ private void addExistingMediaToEditor(String mediaId) {
AlignmentSpan.Standard as = new AlignmentSpan.Standard(Layout.Alignment.ALIGN_CENTER);
s.setSpan(as, selectionStart, selectionEnd + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
s.insert(selectionEnd + 1, "\n\n");
try {
mContentEditText.setSelection(s.length());
} catch (Exception e) {
e.printStackTrace();
}
}

// load image from server
Expand Down Expand Up @@ -934,11 +929,6 @@ private void handleMediaGalleryResult(Intent data) {
AlignmentSpan.Standard as = new AlignmentSpan.Standard(Layout.Alignment.ALIGN_CENTER);
s.setSpan(as, selectionStart, selectionEnd + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
s.insert(selectionEnd + 1, "\n\n");
try {
mContentEditText.setSelection(s.length());
} catch (Exception e) {
e.printStackTrace();
}
}

private boolean addMedia(Uri imageUri, SpannableStringBuilder ssb) {
Expand Down Expand Up @@ -1017,11 +1007,6 @@ private boolean addMedia(Uri imageUri, SpannableStringBuilder ssb) {
AlignmentSpan.Standard as = new AlignmentSpan.Standard(Layout.Alignment.ALIGN_CENTER);
s.setSpan(as, selectionStart, selectionEnd + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
s.insert(selectionEnd + 1, "\n\n");
try {
mContentEditText.setSelection(s.length());
} catch (Exception e) {
e.printStackTrace();
}
}
// Show the soft keyboard after adding media
if (mActivity != null && !mActivity.getSupportActionBar().isShowing())
Expand Down

0 comments on commit e4ad17f

Please sign in to comment.