|
|
@@ -11,6 +11,7 @@ import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.v7.app.AlertDialog;
|
|
|
import android.support.v7.app.AppCompatActivity;
|
|
|
+import android.text.Html;
|
|
|
import android.text.Layout;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
@@ -263,6 +264,8 @@ public class SearchResultActivity extends AppCompatActivity implements AbsListVi
|
|
|
|
|
|
try {
|
|
|
|
|
|
+ mParams.putInt("offset",adapter.getCount());
|
|
|
+ mParams.putInt("limit",25);
|
|
|
resultData = Network.query(mParams);
|
|
|
if (resultData == null) {
|
|
|
resultData = new JSONObject();
|
|
|
@@ -327,6 +330,7 @@ public class SearchResultActivity extends AppCompatActivity implements AbsListVi
|
|
|
// JSONObject newJson = new JSONObject(res);
|
|
|
|
|
|
mParams.putInt("offset",adapter.getCount());
|
|
|
+ mParams.putInt("limit",25);
|
|
|
JSONObject newJson = Network.query(mParams);
|
|
|
|
|
|
if (newJson != null) {
|
|
|
@@ -409,7 +413,7 @@ public class SearchResultActivity extends AppCompatActivity implements AbsListVi
|
|
|
|
|
|
try {
|
|
|
|
|
|
- JSONArray row_action = resultData.getJSONArray("row_action");
|
|
|
+ JSONArray row_action = resultData.optJSONArray("row_action");
|
|
|
if (row_action != null) {
|
|
|
|
|
|
if (row_action.length() == 1) {
|
|
|
@@ -731,7 +735,11 @@ public class SearchResultActivity extends AppCompatActivity implements AbsListVi
|
|
|
}
|
|
|
|
|
|
|
|
|
- tv.setText(name);
|
|
|
+ if (name.contains("</")) {
|
|
|
+ tv.setText(Html.fromHtml(name));
|
|
|
+ } else {
|
|
|
+ tv.setText(name);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
holder.row.setBackgroundColor(Color.parseColor(bg_color));
|
|
|
@@ -801,7 +809,12 @@ public class SearchResultActivity extends AppCompatActivity implements AbsListVi
|
|
|
tv.setBackgroundDrawable(getResources().getDrawable(R.drawable.result_black_border));
|
|
|
}
|
|
|
|
|
|
- tv.setText(value);
|
|
|
+
|
|
|
+ if (value.contains("</")) {
|
|
|
+ tv.setText(Html.fromHtml(value));
|
|
|
+ } else {
|
|
|
+ tv.setText(value);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -919,12 +932,8 @@ public class SearchResultActivity extends AppCompatActivity implements AbsListVi
|
|
|
public void run() {
|
|
|
|
|
|
// download & get path
|
|
|
- String path = null;
|
|
|
+ String path = Network.download_query(mParams);
|
|
|
|
|
|
- if(BuildConfig.DEBUG && true){
|
|
|
- //do something for assert aim
|
|
|
- Log.e("Result", "onClick: not implement");
|
|
|
- }
|
|
|
|
|
|
documentPath = path;
|
|
|
download_query = path;
|