Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<classpathentry kind="lib" path="libs/tagsoup-1.2.1.jar"/>
<classpathentry kind="lib" path="libs/gson-2.2.2.jar"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="lib" path="/ActionBarSherlock/libs/android-support-v4.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="lib" path="/ActionBarSherlock/libs/android-support-v4.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
4 changes: 2 additions & 2 deletions project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ split.density=false
target=android-17
apk-configurations=
android.library=false
android.library.reference.1=../ActionBarSherlock/library
android.library.reference.2=../../../Downloads/android-menudrawer-master/library
android.library.reference.1=../adt-bundle-linux-x86_64/android/java-libs/ActionBarSherlock
android.library.reference.2=../adt-bundle-linux-x86_64/android-menudrawer-master/library
1 change: 1 addition & 0 deletions res/layout/viewpost.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/postHead"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to add onTouch listener for whole layout,so that user can swipe any where on the fragment...

android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
Expand Down
3 changes: 3 additions & 0 deletions res/values/string.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
393a394,395
> <string name="confirm_delete">Confirm Deletion</string>
> <string name="confirm_delete_data">Are you sure to delete the Comment ?</string>
2 changes: 2 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,5 +391,7 @@

<!-- Image Descriptions for Accessibility -->
<string name="content_description_add_media">Add media</string>
<string name="confirm_delete">Confirm Deletion</string>
<string name="confirm_delete_data">Are you sure to delete the Comment ?</string>

</resources>
395 changes: 395 additions & 0 deletions res/values/strings1.xml

Large diffs are not rendered by default.

54 changes: 42 additions & 12 deletions src/org/wordpress/android/ui/comments/CommentsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,50 @@ public void run() {
}
}.start();
} else if (status.equals("delete")) {
showDialog(ID_DIALOG_DELETING);
// pop out of the detail view if on a smaller screen
FragmentManager fm = getSupportFragmentManager();
CommentFragment f = (CommentFragment) fm
.findFragmentById(R.id.commentDetail);
if (f == null) {
fm.popBackStack();
}
new Thread() {

Thread action3 = new Thread() {
public void run() {
deleteComment(commentID);
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(
CommentsActivity.this);
dialogBuilder.setTitle(getResources().getText(
R.string.confirm_delete));
dialogBuilder.setMessage(getResources().getText(R.string.confirm_delete_data));
dialogBuilder.setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
showDialog(ID_DIALOG_DELETING);
// pop out of the detail view if on a smaller screen
FragmentManager fm = getSupportFragmentManager();
CommentFragment f = (CommentFragment) fm
.findFragmentById(R.id.commentDetail);
if (f == null) {
fm.popBackStack();
}
new Thread() {
public void run() {
deleteComment(commentID);
}
}.start();


}
});
dialogBuilder.setNegativeButton("No",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
//Don't delete Comment
}
});
dialogBuilder.setCancelable(true);
if (!isFinishing()) {
dialogBuilder.create().show();
}
}
}.start();
} else if (status.equals("reply")) {
};
runOnUiThread(action3);
} else if (status.equals("reply")) {

Intent i = new Intent(CommentsActivity.this, AddCommentActivity.class);
i.putExtra("commentID", commentID);
Expand Down
Loading