|
|
@@ -9,6 +9,7 @@ import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
import android.graphics.Bitmap;
|
|
|
import android.graphics.Color;
|
|
|
+import android.net.Uri;
|
|
|
import android.os.AsyncTask;
|
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
@@ -415,11 +416,11 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
|
|
|
int group_count = jsonObj.getInt("count");
|
|
|
|
|
|
- if (getArguments().getString("action_type").equals("Detail")) {
|
|
|
- JSONObject commObj = loadfakecontent(R.raw.fake_comm);
|
|
|
- jsonObj.put("group" + group_count++,commObj);
|
|
|
- jsonObj.put("count",group_count);
|
|
|
- }
|
|
|
+// if (getArguments().getString("action_type").equals("Detail")) {
|
|
|
+// JSONObject commObj = loadfakecontent(R.raw.fake_comm);
|
|
|
+// jsonObj.put("group" + group_count++,commObj);
|
|
|
+// jsonObj.put("count",group_count);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
@@ -770,7 +771,7 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
String sender = msgObj.optString("Sender");
|
|
|
String msg = msgObj.optString("msg");
|
|
|
String time = msgObj.optString("mst_time");
|
|
|
- String email_url = msgObj.optString("email_url");
|
|
|
+ final String email_url = msgObj.optString("email_url");
|
|
|
|
|
|
TextView senderTv = msgitem.findViewById(R.id.comm_sender_tv);
|
|
|
TextView msgTv = msgitem.findViewById(R.id.comm_msg_tv);
|
|
|
@@ -784,6 +785,16 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
+
|
|
|
+ Uri content_url = Uri.parse(email_url);
|
|
|
+
|
|
|
+ Intent intent = new Intent(Intent.ACTION_VIEW,content_url);
|
|
|
+
|
|
|
+// Intent intent = new Intent();
|
|
|
+// intent.setAction("android.intent.action.VIEW");
|
|
|
+// intent.setData(content_url);
|
|
|
+
|
|
|
+ startActivity(intent);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -858,11 +869,14 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
pd.setMessage("send email");
|
|
|
pd.setCancelable(false);
|
|
|
pd.show();
|
|
|
+
|
|
|
+ final String serialNo = commGroup.optString("serial_no");
|
|
|
+
|
|
|
new Thread(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
|
|
|
- final JSONObject response = Network.sendEmail(content,cc);
|
|
|
+ final JSONObject response = Network.sendEmail(content,cc,serialNo);
|
|
|
|
|
|
getActivity().runOnUiThread(new Runnable() {
|
|
|
@Override
|
|
|
@@ -907,6 +921,7 @@ public class DetailFragment extends Fragment implements OnClickListener /*
|
|
|
|
|
|
listview.addView(commu_footer);
|
|
|
|
|
|
+ listview.forceLayout();
|
|
|
}
|
|
|
// String value = obj.getString(key);
|
|
|
// JSONArray array = obj.getJSONArray(key);
|