我正在处理数字,我从共享偏好中得到一个 int,我做了一些数学运算,然后如果结果位于 2 个数字之间,我想做一些事情。
SharedPreferences settings = getApplicationContext().getSharedPreferences("shared", Context.MODE_PRIVATE);
int A = settings.getInt("A", 1);
int B = settings.getInt("B", 1);
operation = (TextView) findViewById(R.id.imc );
operation.setText(A*B);
String operation;
if (SOMETHING HERE!) { // is situated between 1 and 20
something
}
我应该怎么办?任何建议将不胜感激。