|
|
@ -26,6 +26,8 @@ import java.io.IOException;
|
|
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.io.OutputStreamWriter;
|
|
|
|
import java.io.OutputStreamWriter;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
|
|
|
import java.text.NumberFormat;
|
|
|
|
|
|
|
|
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
|
|
|
|
|
|
|
|
public class ChannelActivity extends AppCompatActivity {
|
|
|
|
public class ChannelActivity extends AppCompatActivity {
|
|
|
@ -161,6 +163,19 @@ public class ChannelActivity extends AppCompatActivity {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
binding.exposuretime.setText(Integer.toString(jsonObject.optInt("exposureTime", 0)));
|
|
|
|
binding.exposuretime.setText(Integer.toString(jsonObject.optInt("exposureTime", 0)));
|
|
|
|
binding.sensitivity.setText(Integer.toString(jsonObject.optInt("sensibility", 0)));
|
|
|
|
binding.sensitivity.setText(Integer.toString(jsonObject.optInt("sensibility", 0)));
|
|
|
|
|
|
|
|
binding.btnZoom.setChecked(jsonObject.optInt("zoom", 0) == 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NumberFormat nf = NumberFormat.getNumberInstance();
|
|
|
|
|
|
|
|
nf.setMaximumFractionDigits(1);
|
|
|
|
|
|
|
|
nf.setMinimumFractionDigits(1);
|
|
|
|
|
|
|
|
String zoomRatio = nf.format(jsonObject.optDouble("zoomRatio", 1.0));
|
|
|
|
|
|
|
|
for (int idx = 0; idx < binding.zoomRatio.getCount(); idx++) {
|
|
|
|
|
|
|
|
String text = (String)binding.zoomRatio.getItemAtPosition(idx);
|
|
|
|
|
|
|
|
if (TextUtils.equals(text, zoomRatio)) {
|
|
|
|
|
|
|
|
binding.zoomRatio.setSelection(idx);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
binding.orientations.setSelection(jsonObject.optInt("orientation", 0));
|
|
|
|
binding.orientations.setSelection(jsonObject.optInt("orientation", 0));
|
|
|
|
binding.recognization.setSelection(jsonObject.optInt("recognization", 0));
|
|
|
|
binding.recognization.setSelection(jsonObject.optInt("recognization", 0));
|
|
|
|
if (jsonObject.has("cameraId")) {
|
|
|
|
if (jsonObject.has("cameraId")) {
|
|
|
|