├── app
├── .gitignore
├── libs
│ ├── httpcore-4.3.2.jar
│ ├── httpmime-4.3.5.jar
│ ├── armeabi
│ │ └── libtencentloc.so
│ ├── android-async-http-1.4.6.jar
│ └── TencentLocationSDK_v4.0_r139747.jar
├── src
│ ├── main
│ │ ├── assets
│ │ │ └── database.sqlite
│ │ ├── res
│ │ │ ├── drawable-nodpi
│ │ │ │ ├── logo.png
│ │ │ │ ├── nav_menu_but.png
│ │ │ │ ├── login_password.png
│ │ │ │ ├── login_username.png
│ │ │ │ ├── bottom_bar_but.9.png
│ │ │ │ ├── bottom_bar_camera.png
│ │ │ │ ├── bottom_bar_edit.png
│ │ │ │ ├── bottom_bar_save.png
│ │ │ │ ├── login_background.png
│ │ │ │ ├── login_login_but.9.png
│ │ │ │ ├── login_text_back.9.png
│ │ │ │ ├── nav_menu_back.9.png
│ │ │ │ ├── bottom_bar_location.png
│ │ │ │ ├── product_img_default.png
│ │ │ │ ├── nav_menu_but_pressed.png
│ │ │ │ ├── bottom_bar_but_pressed.9.png
│ │ │ │ ├── bottom_bar_edit_pressed.png
│ │ │ │ └── login_login_but_pressed.9.png
│ │ │ ├── drawable-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable
│ │ │ │ ├── transparent_bg.xml
│ │ │ │ ├── detail_key_cell_bg.xml
│ │ │ │ ├── but_bottom_bar_color.xml
│ │ │ │ ├── detail_value_cell_bg.xml
│ │ │ │ ├── but_nav_menu.xml
│ │ │ │ ├── edit_text_color.xml
│ │ │ │ ├── but_bottom_bar_bg.xml
│ │ │ │ ├── but_login_bg.xml
│ │ │ │ ├── list_item_color.xml
│ │ │ │ ├── but_bottom_bar_edit.xml
│ │ │ │ ├── but_menu_color.xml
│ │ │ │ └── light_gray_bg.xml
│ │ │ ├── layout
│ │ │ │ ├── layout_horizontal_line.xml
│ │ │ │ ├── layout_nav_menu_seperator.xml
│ │ │ │ ├── layout_detail_attach_header.xml
│ │ │ │ ├── layout_detail_other_info_item.xml
│ │ │ │ ├── layout_detail_other_info_header.xml
│ │ │ │ ├── layout_detail_photo_item.xml
│ │ │ │ ├── layout_detail_result_item.xml
│ │ │ │ ├── layout_dialog_button.xml
│ │ │ │ ├── layout_detail_operation_item.xml
│ │ │ │ ├── activity_sign.xml
│ │ │ │ ├── layout_menu.xml
│ │ │ │ ├── layout_navbar.xml
│ │ │ │ ├── layout_detail_prod_info_item.xml
│ │ │ │ ├── layout_detail_instrument_header.xml
│ │ │ │ ├── layout_detail_instrument_item.xml
│ │ │ │ ├── activity_dialog_other_info.xml
│ │ │ │ ├── layout_task_item.xml
│ │ │ │ ├── layout_report_item.xml
│ │ │ │ ├── layout_detail_prod_info_header.xml
│ │ │ │ ├── activity_dialog_photo.xml
│ │ │ │ ├── layout_detail_export_carton_item.xml
│ │ │ │ ├── layout_dialog_setparam.xml
│ │ │ │ ├── layout_detail_sampling_header.xml
│ │ │ │ ├── layout_detail_tech_data_header.xml
│ │ │ │ ├── layout_detail_unit_pack_item.xml
│ │ │ │ ├── layout_detail_sampling_item.xml
│ │ │ │ ├── layout_detail_tech_data_item.xml
│ │ │ │ ├── layout_detail_electric_comp_item.xml
│ │ │ │ ├── layout_detail_export_carton_header.xml
│ │ │ │ ├── layout_detail_unit_pack_header.xml
│ │ │ │ ├── activity_operation.xml
│ │ │ │ ├── layout_detail_electric_comp_header.xml
│ │ │ │ ├── layout_detail_electric_spec_header.xml
│ │ │ │ ├── layout_detail_electric_spec_item.xml
│ │ │ │ └── activity_task.xml
│ │ │ ├── anim
│ │ │ │ ├── anim_out.xml
│ │ │ │ ├── pop_in.xml
│ │ │ │ ├── anim_in.xml
│ │ │ │ └── pop_out.xml
│ │ │ ├── menu
│ │ │ │ └── menu_main.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── dimens.xml
│ │ ├── jniLibs
│ │ │ └── armeabi
│ │ │ │ └── libtencentloc.so
│ │ └── java
│ │ │ └── com
│ │ │ └── highjump
│ │ │ └── cqccollect
│ │ │ ├── model
│ │ │ ├── AttachmentData.java
│ │ │ ├── ProductData.java
│ │ │ ├── LogData.java
│ │ │ ├── TaskData.java
│ │ │ ├── ReportData.java
│ │ │ ├── OtherInfoData.java
│ │ │ ├── InstrumentData.java
│ │ │ ├── SamplingData.java
│ │ │ ├── ExportCartonData.java
│ │ │ ├── BaseData.java
│ │ │ ├── DataMeasuredData.java
│ │ │ ├── UnitPackData.java
│ │ │ ├── ElectricCompData.java
│ │ │ ├── CollectImgData.java
│ │ │ ├── ElectricSpecData.java
│ │ │ ├── UserData.java
│ │ │ └── LocationData.java
│ │ │ ├── provider
│ │ │ ├── OtherInfoColumns.java
│ │ │ ├── AttachmentColumns.java
│ │ │ ├── UserColumns.java
│ │ │ ├── ProcessLogColumns.java
│ │ │ ├── ProductColumns.java
│ │ │ ├── CollectImageColumns.java
│ │ │ ├── InstrumentColumns.java
│ │ │ ├── SamplingColumns.java
│ │ │ ├── DataMeasuredColumns.java
│ │ │ ├── ExportCartonColumns.java
│ │ │ ├── ElectricCompColumns.java
│ │ │ ├── UnitPackColumns.java
│ │ │ ├── ElectricSpecColumns.java
│ │ │ └── ReportColumns.java
│ │ │ ├── utils
│ │ │ ├── Config.java
│ │ │ └── TencentGPSTracker.java
│ │ │ ├── DetailDialogActivity.java
│ │ │ ├── view
│ │ │ ├── DetailAttachmentItemView.java
│ │ │ ├── OtherInfoItemView.java
│ │ │ ├── CollectImgItemView.java
│ │ │ ├── InstrumentItemView.java
│ │ │ ├── DetailProductItemView.java
│ │ │ ├── ExportCartonItemView.java
│ │ │ ├── SamplingItemView.java
│ │ │ ├── UnitPackItemView.java
│ │ │ ├── DataMeasuredItemView.java
│ │ │ ├── ElectricCompItemView.java
│ │ │ └── ElectricSpecItemView.java
│ │ │ ├── adapter
│ │ │ ├── OperationAdapter.java
│ │ │ ├── ReportAdapter.java
│ │ │ └── TaskAdapter.java
│ │ │ ├── OperationActivity.java
│ │ │ ├── DialogOtherInfoActivity.java
│ │ │ ├── DialogExportCartonActivity.java
│ │ │ ├── DialogInstrumentActivity.java
│ │ │ ├── DialogUnitPackActivity.java
│ │ │ ├── DialogElectricCompActivity.java
│ │ │ └── DialogSamplingActivity.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── highjump
│ │ └── cqccollect
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── Readme.md
├── gradle.properties
└── gradlew.bat
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/libs/httpcore-4.3.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/libs/httpcore-4.3.2.jar
--------------------------------------------------------------------------------
/app/libs/httpmime-4.3.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/libs/httpmime-4.3.5.jar
--------------------------------------------------------------------------------
/app/libs/armeabi/libtencentloc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/libs/armeabi/libtencentloc.so
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/assets/database.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/assets/database.sqlite
--------------------------------------------------------------------------------
/app/libs/android-async-http-1.4.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/libs/android-async-http-1.4.6.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/logo.png
--------------------------------------------------------------------------------
/app/libs/TencentLocationSDK_v4.0_r139747.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/libs/TencentLocationSDK_v4.0_r139747.jar
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/libtencentloc.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/jniLibs/armeabi/libtencentloc.so
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/nav_menu_but.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/nav_menu_but.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/login_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/login_password.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/login_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/login_username.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_but.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_but.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/login_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/login_background.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/login_login_but.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/login_login_but.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/login_text_back.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/login_text_back.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/nav_menu_back.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/nav_menu_back.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_location.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/product_img_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/product_img_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/nav_menu_but_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/nav_menu_but_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_but_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_but_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bottom_bar_edit_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/bottom_bar_edit_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/login_login_but_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/highjump0615/CQCcheck/HEAD/app/src/main/res/drawable-nodpi/login_login_but_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/transparent_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | * 采用腾讯定位SDK实现定位功能
9 | * 跟后台通讯是用android-async-http
10 | * 采用sqlite3为内部数据库
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/highjump/cqccollect/model/AttachmentData.java:
--------------------------------------------------------------------------------
1 | package com.highjump.cqccollect.model;
2 |
3 | /**
4 | * Created by highjump on 15-2-1.
5 | */
6 | public class AttachmentData {
7 |
8 | public int mnNo;
9 | public String mStrFileName;
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/detail_key_cell_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
54 | * 重复调用 requestLocationUpdates, 将忽略之前的 reqest 并自动取消之前的 listener, 并使用最新的 55 | * request 和 listener 继续定位 56 | *
57 | * 重复调用 removeUpdates, 将定位停止
58 | */
59 |
60 | // 退出 activity 前一定要停止定位!
61 | stopLocation();
62 | // 清空
63 | if (mHandler != null)
64 | mHandler.removeCallbacksAndMessages(null);
65 | // 停止线程
66 | if (mThread != null)
67 | mThread.getLooper().quit();
68 | }
69 |
70 |
71 | // 响应点击"开始"
72 | public void startLocation() {
73 |
74 | // 创建定位请求
75 | final TencentLocationRequest request = TencentLocationRequest.create();
76 |
77 | // 修改定位请求参数, 定位周期 3000 ms
78 | request.setInterval(3000);
79 |
80 | // 在 mThread 线程发起定位
81 | mHandler.post(new Runnable() {
82 |
83 | @Override
84 | public void run() {
85 | mLocationManager.requestLocationUpdates(request, TencentGPSTracker.this);
86 | }
87 | });
88 |
89 | updateLocationStatus("开始定位: " + request);
90 | }
91 |
92 | @Override
93 | public void onLocationChanged(TencentLocation location, int error, String reason) {
94 | String msg = null;
95 | if (error == TencentLocation.ERROR_OK) {
96 |
97 | mLatitude = location.getLatitude();
98 | mLongitude = location.getLongitude();
99 |
100 | // 当前线程名字
101 | String threadName = Thread.currentThread().getName();
102 |
103 | // 定位成功
104 | StringBuilder sb = new StringBuilder();
105 | sb.append("(纬度=").append(location.getLatitude()).append(",经度=")
106 | .append(location.getLongitude()).append(",精度=")
107 | .append(location.getAccuracy()).append("), 来源=")
108 | .append(location.getProvider()).append(", 地址=")
109 | .append(location.getAddress());
110 | sb.append(", 当前线程=").append(threadName);
111 | msg = sb.toString();
112 |
113 | if (mLatitude > 0 && mLongitude > 0) {
114 | stopLocation();
115 | }
116 | }
117 | else {
118 | // 定位失败
119 | msg = "定位失败: " + reason;
120 | }
121 |
122 | Log.i(TAG, "result = " + msg);
123 | }
124 |
125 | @Override
126 | public void onStatusUpdate(String s, int i, String s2) {
127 |
128 | }
129 |
130 | // ====== location callback
131 |
132 | // 响应点击"停止"
133 | public void stopLocation() {
134 | if (mLocationManager != null)
135 | mLocationManager.removeUpdates(this);
136 |
137 | updateLocationStatus("停止定位");
138 | }
139 |
140 | private void updateLocationStatus(String message) {
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/app/src/main/java/com/highjump/cqccollect/DialogElectricCompActivity.java:
--------------------------------------------------------------------------------
1 | package com.highjump.cqccollect;
2 |
3 | import android.content.res.Configuration;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.EditText;
7 | import android.widget.RadioButton;
8 |
9 | import com.highjump.cqccollect.model.BaseData;
10 | import com.highjump.cqccollect.model.ElectricCompData;
11 |
12 |
13 | public class DialogElectricCompActivity extends DetailDialogActivity {
14 |
15 | private ReportDetailActivity mDetailActivity;
16 |
17 | private EditText mEditName;
18 | private EditText mEditTradeMark;
19 | private EditText mEditModel;
20 | private EditText mEditSpec;
21 | private EditText mEditConformityMark;
22 |
23 | private RadioButton mRadioSameY;
24 | private RadioButton mRadioSameN;
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.activity_dialog_electric_comp);
30 |
31 | initControls();
32 |
33 | mDetailActivity = ReportDetailActivity.getInstance();
34 |
35 | // edit text
36 | mEditName = (EditText)findViewById(R.id.edit_name);
37 | mEditTradeMark = (EditText)findViewById(R.id.edit_trade_mark);
38 | mEditModel = (EditText)findViewById(R.id.edit_model);
39 | mEditSpec = (EditText)findViewById(R.id.edit_spec);
40 | mEditConformityMark = (EditText)findViewById(R.id.edit_conform_mark);
41 |
42 | mRadioSameY = (RadioButton)findViewById(R.id.rad_yes);
43 | mRadioSameY.setChecked(true);
44 | mRadioSameN = (RadioButton)findViewById(R.id.rad_no);
45 |
46 | showData();
47 | }
48 |
49 | private void showData() {
50 | if (mDetailActivity.mnCurElectricComp >= 0) {
51 | ElectricCompData ecData = mDetailActivity.mArrayElectricComp.get(mDetailActivity.mnCurElectricComp);
52 |
53 | // product index
54 | mEditName.setText(ecData.mStrName);
55 | mEditTradeMark.setText(ecData.mStrTradeMark);
56 | mEditModel.setText(ecData.mStrModel);
57 | mEditSpec.setText(ecData.mStrSpec);
58 | mEditConformityMark.setText(ecData.mStrConformityMark);
59 |
60 | if (ecData.mnSameAs == 0) {
61 | mRadioSameN.setChecked(true);
62 | }
63 | }
64 | else {
65 | mButDelete.setVisibility(View.INVISIBLE);
66 | }
67 | }
68 |
69 | @Override
70 | public void onClick(View v) {
71 | super.onClick(v);
72 |
73 | int id = v.getId();
74 |
75 | switch (id) {
76 | case R.id.but_save:
77 | saveData();
78 | finish();
79 | break;
80 |
81 | case R.id.but_delete:
82 | deleteData();
83 | finish();
84 | break;
85 | }
86 | }
87 |
88 | private void saveData() {
89 | ElectricCompData electricCompData;
90 |
91 | if (mDetailActivity.mnCurElectricComp >= 0) {
92 | electricCompData = mDetailActivity.mArrayElectricComp.get(mDetailActivity.mnCurElectricComp);
93 | }
94 | else {
95 | electricCompData = new ElectricCompData();
96 | }
97 |
98 | electricCompData.mStrName = mEditName.getText().toString();
99 | electricCompData.mStrTradeMark = mEditTradeMark.getText().toString();
100 | electricCompData.mStrModel = mEditModel.getText().toString();
101 | electricCompData.mStrSpec = mEditSpec.getText().toString();
102 | electricCompData.mStrConformityMark = mEditConformityMark.getText().toString();
103 |
104 | if (mRadioSameY.isChecked()) {
105 | electricCompData.mnSameAs = 1;
106 | }
107 | else {
108 | electricCompData.mnSameAs = 0;
109 | }
110 |
111 | if (mDetailActivity.mnCurElectricComp >= 0) {
112 | electricCompData.mStatus += BaseData.DS_UPDATED;
113 | }
114 | else {
115 | electricCompData.mStatus += BaseData.DS_ADDED;
116 | mDetailActivity.mArrayElectricComp.add(electricCompData);
117 | }
118 | }
119 |
120 | private void deleteData() {
121 |
122 | if (mDetailActivity.mnCurElectricComp < 0) {
123 | return;
124 | }
125 |
126 | ElectricCompData electricCompData = mDetailActivity.mArrayElectricComp.get(mDetailActivity.mnCurElectricComp);
127 | electricCompData.mStatus += BaseData.DS_DELETED;
128 | }
129 |
130 | @Override
131 | public void onConfigurationChanged(Configuration newConfig) {
132 | super.onConfigurationChanged(newConfig);
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/app/src/main/java/com/highjump/cqccollect/DialogSamplingActivity.java:
--------------------------------------------------------------------------------
1 | package com.highjump.cqccollect;
2 |
3 | import android.content.res.Configuration;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.ArrayAdapter;
7 | import android.widget.EditText;
8 | import android.widget.Spinner;
9 | import android.widget.Toast;
10 |
11 | import com.highjump.cqccollect.model.BaseData;
12 | import com.highjump.cqccollect.model.ProductData;
13 | import com.highjump.cqccollect.model.SamplingData;
14 |
15 | import java.util.ArrayList;
16 |
17 |
18 | public class DialogSamplingActivity extends DetailDialogActivity {
19 |
20 | private Spinner mSpinProduct;
21 | private ReportDetailActivity mDetailActivity;
22 | private ArrayList