|
@@ -0,0 +1,69 @@
|
|
|
+package com.xplora.xpsettings.Activity;
|
|
|
+
|
|
|
+import android.content.Intent;
|
|
|
+import android.os.Build;
|
|
|
+import android.os.Bundle;
|
|
|
+//import android.os.SystemProperties;
|
|
|
+import android.os.SystemProperties;
|
|
|
+import android.widget.ListView;
|
|
|
+
|
|
|
+import com.xplora.xpsettings.Adapter.BaseListAdapter;
|
|
|
+import com.xplora.xpsettings.Adapter.ListAdapter;
|
|
|
+import com.xplora.xpsettings.Model.BaseModel;
|
|
|
+import com.xplora.xpsettings.R;
|
|
|
+import com.xplora.xpsettings.SettingApplication;
|
|
|
+import com.xplora.xpsettings.Utils.Constant;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+public class CameroActivity extends BaseActivity {
|
|
|
+ private final List<BaseModel> mData = new ArrayList<>();
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onCreate(Bundle savedInstanceState) {
|
|
|
+ super.onCreate(savedInstanceState);
|
|
|
+ setContentView(R.layout.activity_list);
|
|
|
+ setWatchTitle(getResources().getStringArray(R.array.settings_title_array)[11]);
|
|
|
+ initData();
|
|
|
+ initView();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void initData() {
|
|
|
+ String photo_resolution = SettingApplication.getPhotoResolution();
|
|
|
+ String video_resolution = SettingApplication.getVideoResolution();
|
|
|
+ String[] stringList = getResources().getStringArray(R.array.camero_titls_array);
|
|
|
+ String[] valueList = {photo_resolution, video_resolution};
|
|
|
+
|
|
|
+ for (int i = 0; i < stringList.length; i++) {
|
|
|
+ BaseModel model = new BaseModel();
|
|
|
+ model.title = stringList[i].trim();
|
|
|
+ model.subTitle = valueList[i];
|
|
|
+ model.isShowArrow = true;
|
|
|
+ model.cellType = Constant.CellType.TITLE_SUBTITLE;
|
|
|
+ mData.add(model);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void initView() {
|
|
|
+ BaseListAdapter adapter = new BaseListAdapter(this, 0, mData);
|
|
|
+ ListView listView = findViewById(R.id.activity_listview);
|
|
|
+ listView.setAdapter(adapter);
|
|
|
+ listView.setOnItemClickListener((adapterView, view, i, l) -> {
|
|
|
+ Intent intent;
|
|
|
+ switch (i) {
|
|
|
+ case 0:
|
|
|
+ intent = new Intent(this, SoftwareVersionActivity.class);
|
|
|
+ startActivity(intent);
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ intent = new Intent(this, RestoreActivity.class);
|
|
|
+ startActivity(intent);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|