|
|
@@ -62,7 +62,13 @@ public class fragment_gx extends LinearLayout { |
|
|
|
case 0://数字 |
|
|
|
editsp.setVisibility(View.GONE); |
|
|
|
edittext.setVisibility(View.VISIBLE); |
|
|
|
edittext.setInputType(InputType.TYPE_CLASS_NUMBER); |
|
|
|
if(model.IsWL) |
|
|
|
{ |
|
|
|
edittext.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL); |
|
|
|
}else |
|
|
|
{ |
|
|
|
edittext.setInputType(InputType.TYPE_CLASS_NUMBER); |
|
|
|
} |
|
|
|
edittext.setText("0".toCharArray(), 0, "0".length()); |
|
|
|
break; |
|
|
|
case 1://字符串 |
|
|
@@ -107,15 +113,17 @@ public class fragment_gx extends LinearLayout { |
|
|
|
{ |
|
|
|
text="0"; |
|
|
|
} |
|
|
|
int val=Integer.parseInt(text); |
|
|
|
|
|
|
|
if(model.IsWL) |
|
|
|
{ |
|
|
|
double val=Double.parseDouble(text); |
|
|
|
if(check.isChecked()) |
|
|
|
{ |
|
|
|
ResStu=String.valueOf(val); |
|
|
|
ResStu=String.format("%.1f", val); |
|
|
|
} |
|
|
|
}else |
|
|
|
{ |
|
|
|
int val=Integer.parseInt(text); |
|
|
|
ResStu=String.valueOf(val); |
|
|
|
} |
|
|
|
break; |
|
|
|