这是我的代码.我需要得到我的数组的最小值,最大值,以便能够得到范围,每当我输入数字时,最小值为0.请帮助我.谢谢:)
final AutoCompleteTextView inputValues = (AutoCompleteTextView) findViewById(R.id.txt_input);
final TextView txtMinimum = (TextView) findViewById(R.id.txtMinimum);
final TextView txtMaximum = (TextView) findViewById(R.id.txtMaximum);
final TextView txtRange = (TextView) findViewById(R.id.txtRange);
Button btncalculate = (Button)findViewById(R.id.btncalculate);
btncalculate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
String []values = ( inputValues.getText().toString().split(","));
int[] convertedValues = new int[values.length];
// calculate for the minimum and maximum number
int min = 0;
int max=0;
min = max = convertedValues[0];
for (int i = 0; i < convertedValues.length; ++i) {
convertedValues[i] =Integer.parseInt(values[i]);
min …Run Code Online (Sandbox Code Playgroud) 如果模拟器停止工作,我该怎么办?
它在问题详细信息中显示:
Problem signature:
Problem Event Name: APPCRASH
Application Name: emulator-arm.exe
Application Version: 0.0.0.0
Application Timestamp: 5111a505
Fault Module Name: ig4icd32.dll
Fault Module Version: 8.15.10.2057
Fault Module Timestamp: 4b5e41aa
Exception Code: c0000005
Exception Offset: 00032930
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Run Code Online (Sandbox Code Playgroud)
谢谢!