|
|
@@ -2173,8 +2173,8 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
JSONObject item_json = content_data_control.optJSONArray(groupPosition).optJSONObject(childPosition);
|
|
|
String control = item_json.optString("control");
|
|
|
if (control.equals("enum")) {
|
|
|
- int disable = item_json.optInt("disable");
|
|
|
- if (disable == 1 || readonly) {
|
|
|
+ boolean disable = item_json.optBoolean("disable");
|
|
|
+ if (disable || readonly) {
|
|
|
return false;
|
|
|
}
|
|
|
JSONObject cadedate_json = item_json.optJSONObject("cadedate");
|
|
|
@@ -2327,7 +2327,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
String value = null;
|
|
|
String align = "";
|
|
|
int capital = 0;
|
|
|
- int disable = 0;
|
|
|
+ boolean disable = false;
|
|
|
|
|
|
// 重用时先保存
|
|
|
if (holder.text_view.getText().length() > 0) {
|
|
|
@@ -2346,7 +2346,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
value = item_json.optString("value");
|
|
|
align = item_json.optString("align");
|
|
|
capital = item_json.optInt("capital");
|
|
|
- disable = item_json.optInt("disable");
|
|
|
+ disable = item_json.optBoolean("disable");
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -2378,7 +2378,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- if (disable == 1 || readonly) {
|
|
|
+ if (disable|| readonly) {
|
|
|
holder.text_view.setEnabled(false);
|
|
|
holder.text_view.setTextColor(Color.LTGRAY);
|
|
|
} else {
|
|
|
@@ -2420,7 +2420,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
String img_url_up_0 = null;
|
|
|
String img_url_up_1 = null;
|
|
|
String img_url_up_2 = null;
|
|
|
- int disable = 0;
|
|
|
+ boolean disable = false;
|
|
|
|
|
|
holder.group = group;
|
|
|
holder.child = child;
|
|
|
@@ -2446,7 +2446,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
title = item_json.optString("aname");
|
|
|
value = item_json.optString("value");
|
|
|
- disable = item_json.optInt("disable");
|
|
|
+ disable = item_json.optBoolean("disable");
|
|
|
img_url_0 = item_json.optString("img_url_0");
|
|
|
img_url_up_0 = item_json.optString("img_url_aname_0");
|
|
|
img_url_1 = item_json.optString("img_url_1");
|
|
|
@@ -2458,7 +2458,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
- if (disable == 1 || readonly) {
|
|
|
+ if (disable|| readonly) {
|
|
|
holder.editable = false;
|
|
|
} else {
|
|
|
holder.editable = true;
|
|
|
@@ -2564,7 +2564,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
String value = null;
|
|
|
String align = null;
|
|
|
int capital = 0;
|
|
|
- int disable = 0;
|
|
|
+ boolean disable = false;
|
|
|
String keyboard = null;
|
|
|
String required = null;
|
|
|
|
|
|
@@ -2587,7 +2587,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
value = item_json.optString("value");
|
|
|
align = item_json.optString("align");
|
|
|
capital = item_json.optInt("capital");
|
|
|
- disable = item_json.optInt("disable");
|
|
|
+ disable = item_json.optBoolean("disable");
|
|
|
keyboard = item_json.optString("keyboard");
|
|
|
|
|
|
if (!keyboard.equals("number") && !keyboard.equals("int")) {
|
|
|
@@ -2643,7 +2643,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
holder.text_field.setInputType(inputType);
|
|
|
|
|
|
- if (disable == 1 || readonly) {
|
|
|
+ if (disable|| readonly) {
|
|
|
holder.text_field.setEnabled(false);
|
|
|
holder.text_field.setTextColor(Color.LTGRAY);
|
|
|
} else {
|
|
|
@@ -2899,7 +2899,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
String title = null;
|
|
|
String value = "";
|
|
|
JSONObject cadedate_json = null;
|
|
|
- int disable = 0;
|
|
|
+ boolean disable = false;
|
|
|
String align = null;
|
|
|
String required = null;
|
|
|
|
|
|
@@ -2912,11 +2912,11 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
title = item_json.optString("aname");
|
|
|
cadedate_json = item_json.optJSONObject("cadedate");
|
|
|
- disable = item_json.optInt("disable");
|
|
|
+ disable = item_json.optBoolean("disable");
|
|
|
align = item_json.optString("align");
|
|
|
required = item_json.optString("required");
|
|
|
|
|
|
- if (disable == 1 && readonly) {
|
|
|
+ if (disable || readonly) {
|
|
|
holder.value_lb.setTextColor(Color.LTGRAY);
|
|
|
} else {
|
|
|
holder.value_lb.setTextColor(Color.BLACK);
|
|
|
@@ -3261,7 +3261,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
holder.min_et.setText(min_str);
|
|
|
holder.max_et.setText(max_str);
|
|
|
|
|
|
-// if (disable == 1 || readonly) {
|
|
|
+// if (disable|| readonly) {
|
|
|
// holder.text_field.setEnabled(false);
|
|
|
// holder.text_field.setTextColor(Color.LTGRAY);
|
|
|
// } else {
|