capture fragment 구현, Viewer용 액티비티 구현

This commit is contained in:
DESKTOP-1A3P75F\lee
2022-10-02 02:32:02 +09:00
parent 543bef8f28
commit f2a2e82e5e
36 changed files with 613 additions and 636 deletions

3
.idea/misc.xml generated
View File

@@ -80,6 +80,7 @@
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_main.xml" value="0.33" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_more.xml" value="0.40625" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_permission_checker.xml" value="0.3848958333333333" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_picture_info.xml" value="0.34427083333333336" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_search.xml" value="0.3848958333333333" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_sync.xml" value="0.40625" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_test.xml" value="0.31302083333333336" />
@@ -87,10 +88,12 @@
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/activity_test_select.xml" value="0.40625" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_barcode.xml" value="0.3848958333333333" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_capture.xml" value="0.3848958333333333" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_fill.xml" value="0.34427083333333336" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_info.xml" value="0.40625" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_list.xml" value="0.3848958333333333" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_photograph.xml" value="0.40625" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_rfid.xml" value="0.40625" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/fragment_weight2.xml" value="0.34427083333333336" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/layout_capture_test.xml" value="0.34322916666666664" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/layout_dialog.xml" value="0.34322916666666664" />
<entry key="..\:/QTagger/a/QTagger_Android10/app/src/main/res/layout/layout_seekbar_thumb.xml" value="0.38385416666666666" />

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -1,2 +1,4 @@
# C/C++ build system timings
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -0,0 +1,2 @@
# C/C++ build system timings

View File

@@ -11,7 +11,7 @@
"fieldsDescending": {}
},
"memoizedSize": -1,
"memoizedHashCode": 1337815546
"memoizedHashCode": 75119626
},
{
"level_": 0,
@@ -25,7 +25,7 @@
"fieldsDescending": {}
},
"memoizedSize": -1,
"memoizedHashCode": 998686476
"memoizedHashCode": -264009444
},
{
"level_": 0,
@@ -39,6 +39,6 @@
"fieldsDescending": {}
},
"memoizedSize": -1,
"memoizedHashCode": 1129704711
"memoizedHashCode": -132991209
}
]

View File

@@ -0,0 +1,5 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 18ms
create_cxx_tasks completed in 19ms

View File

@@ -0,0 +1,5 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 24ms
create_cxx_tasks completed in 25ms

View File

@@ -0,0 +1,5 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 18ms
create_cxx_tasks completed in 19ms

View File

@@ -0,0 +1,5 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 19ms
create_cxx_tasks completed in 20ms

View File

@@ -0,0 +1,5 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 18ms
create_cxx_tasks completed in 18ms

View File

@@ -3,3 +3,8 @@ create_cxx_tasks
create-initial-cxx-model 20ms
create_cxx_tasks completed in 21ms
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 19ms
create_cxx_tasks completed in 20ms

View File

@@ -0,0 +1,5 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 26ms
create_cxx_tasks completed in 27ms

View File

@@ -0,0 +1,10 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 17ms
create_cxx_tasks completed in 18ms
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 24ms
create_cxx_tasks completed in 25ms

View File

@@ -0,0 +1,10 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 33ms
create_cxx_tasks completed in 34ms
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 22ms
create_cxx_tasks completed in 22ms

View File

@@ -0,0 +1,10 @@
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 19ms
create_cxx_tasks completed in 20ms
# C/C++ build system timings
create_cxx_tasks
create-initial-cxx-model 19ms
create_cxx_tasks completed in 20ms

View File

@@ -35,6 +35,9 @@
android:theme="@style/Theme.QTagger"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".Activity.PictureInfoActivity"
android:exported="false" />
<activity
android:name=".Activity.LayoutTestActivity"
android:exported="false" />
@@ -76,8 +79,7 @@
android:exported="false" />
<activity
android:name=".Activity.NavigationActivity"
android:exported="false">
</activity>
android:exported="false"></activity>
<activity
android:name=".Activity.AccountModify"
android:exported="false" />

View File

@@ -0,0 +1,69 @@
package com.qtagger.Activity;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import com.qtagger.Database.ImageFile;
import com.qtagger.R;
import com.qtagger.util.DataManager;
public class PictureInfoActivity extends AppCompatActivity {
DataManager dataManager = DataManager.getInstance();
Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_picture_info);
context = this;
Intent intent = getIntent();
String dbTestType = intent.getStringExtra("TestType");
if(dbTestType == null || dbTestType.isEmpty())
finish();
ImageFile imageFile = dataManager.dbHelper.selectFile(dataManager.selPkg.getPKG_NO(),dataManager.testEnum.label(),dbTestType);
if(imageFile == null)
finish();
ImageView imageView = findViewById(R.id.imageView);
imageView.setImageDrawable(new BitmapDrawable(BitmapFactory.decodeFile(imageFile.getFilePath())));
findViewById(R.id.imageFilterButton_Back).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
findViewById(R.id.imageFilterButton_delete).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//삭제 로직 추가
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(context);
builder.setTitle("삭제 알림").setMessage("해당파일을 삭제하시겠습니까?");
builder.setPositiveButton("삭제", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dataManager.dbHelper.deleteFile(imageFile);
finish();
}
}).setNegativeButton("취소",null);
android.app.AlertDialog alertDialog = builder.create();
alertDialog.show();
}
});
}
}

View File

@@ -1,6 +1,17 @@
package com.qtagger.Activity.Test;
import static com.qtagger.Database.TestType.Bottom_Back;
import static com.qtagger.Database.TestType.Bottom_Front;
import static com.qtagger.Database.TestType.Bottom_Left;
import static com.qtagger.Database.TestType.Bottom_Right;
import static com.qtagger.Database.TestType.Middle_Back;
import static com.qtagger.Database.TestType.Middle_Front;
import static com.qtagger.Database.TestType.Middle_Left;
import static com.qtagger.Database.TestType.Middle_Right;
import static com.qtagger.Database.TestType.Top_Back;
import static com.qtagger.Database.TestType.Top_Front;
import static com.qtagger.Database.TestType.Top_Left;
import static com.qtagger.Database.TestType.Top_Right;
import android.content.Context;
import android.content.Intent;
@@ -13,6 +24,7 @@ import android.os.Build;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
@@ -20,10 +32,14 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.qtagger.Activity.AccountList;
import com.qtagger.Activity.CameraActivity;
import com.qtagger.Activity.PictureInfoActivity;
import com.qtagger.Data.CaptureFragmentEnum;
import com.qtagger.Database.ImageFile;
import com.qtagger.Database.TestType;
@@ -39,9 +55,9 @@ public class CaptureFragment extends Fragment {
DataManager dataManager = DataManager.getInstance();
private Context context;
private CaptureFragmentEnum Type;
Button btnTopFront,btnTopBack,btnTopLeft,btnTopRight;
Button btnMiddleFront,btnMiddleBack,btnMiddleLeft,btnMiddleRight;
Button btnBottomFront,btnBottomBack,btnBottomLeft,btnBottomRight;
View btnTopFront,btnTopBack,btnTopLeft,btnTopRight;
View btnMiddleFront,btnMiddleBack,btnMiddleLeft,btnMiddleRight;
View btnBottomFront,btnBottomBack,btnBottomLeft,btnBottomRight;
public CaptureFragment(CaptureFragmentEnum type) {
// Required empty public constructor
@@ -59,21 +75,29 @@ public class CaptureFragment extends Fragment {
context = container.getContext();
View view = inflater.inflate(R.layout.fragment_capture, container, false);
btnTopFront = view.findViewById(R.id.button_top_front);
btnTopBack = view.findViewById(R.id.button_top_back);
btnTopLeft = view.findViewById(R.id.button_top_left);
btnTopRight = view.findViewById(R.id.button_top_right);
/*
View tobacco = view.findViewById(R.id.capture_topBack);
TextView textView = tobacco.findViewById(R.id.capture_title);
textView.setText("TOP-BACK");*/
btnMiddleFront = view.findViewById(R.id.button_middle_front);
btnMiddleBack = view.findViewById(R.id.button_middle_back);
btnMiddleLeft = view.findViewById(R.id.button_middle_left);
btnMiddleRight = view.findViewById(R.id.button_middle_right);
btnBottomFront = view.findViewById(R.id.button_bottom_front);
btnBottomBack = view.findViewById(R.id.button_bottom_back);
btnBottomLeft = view.findViewById(R.id.button_bottom_left);
btnBottomRight = view.findViewById(R.id.button_bottom_right);
btnTopFront = view.findViewById(R.id.capture_topFront);
btnTopBack = view.findViewById(R.id.capture_topBack);
btnTopLeft = view.findViewById(R.id.capture_topLeft);
btnTopRight = view.findViewById(R.id.capture_topRight);
btnMiddleFront = view.findViewById(R.id.capture_middleFront);
btnMiddleBack = view.findViewById(R.id.capture_middleBack);
btnMiddleLeft = view.findViewById(R.id.capture_middleLeft);
btnMiddleRight = view.findViewById(R.id.capture_middleRight);
btnBottomFront = view.findViewById(R.id.capture_bottomFront);
btnBottomBack = view.findViewById(R.id.capture_bottomBack);
btnBottomLeft = view.findViewById(R.id.capture_bottomLeft);
btnBottomRight = view.findViewById(R.id.capture_bottomRight);
/*
btnTopFront.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -162,13 +186,95 @@ public class CaptureFragment extends Fragment {
public void onClick(View v) {
cameraActivityOpen(Type.getTestType(TestType.Bottom_Right));
}
});
});*/
return view;
}
private void resetView(View view, String title, TestType type)
{
if(title != null && !title.isEmpty()) {
TextView textView = view.findViewById(R.id.capture_title);
textView.setText(title);
}
//item_title
TextView textView = view.findViewById(R.id.item_title);
textView.setText(type.label());
ConstraintLayout constraintLayout = view.findViewById(R.id.capture_add);
constraintLayout.setVisibility(View.VISIBLE);
constraintLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
cameraActivityOpen(Type.getTestType(type));
}
});
//ImageView imageView = view.findViewById(R.id.imageView_deleteButton);
//imageView.setVisibility(View.INVISIBLE);
LinearLayout linearLayout = view.findViewById(R.id.linearlayout_Info);
linearLayout.setVisibility(View.INVISIBLE);
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//
pictureInfoActivityOpen(Type.getTestType(Top_Front));
//Toast.makeText(context, "테스트입니다.", Toast.LENGTH_SHORT).show();
}
});
}
private void allResetView()
{
resetView(btnTopFront,"TOP-FRONT", Top_Front);
resetView(btnTopBack,"TOP-BACK" ,Top_Back);
resetView(btnTopLeft,"TOP-LEFT" ,Top_Left);
resetView(btnTopRight,"TOP-RIGHT",Top_Right);
resetView(btnMiddleFront,"MIDDLE-FRONT" ,Middle_Front);
resetView(btnMiddleBack,"MIDDLE-BACK" ,Middle_Back);
resetView(btnMiddleLeft,"MIDDLE-LEFT" ,Middle_Left);
resetView(btnMiddleRight,"MIDDLE-RIGHT",Middle_Right );
resetView(btnBottomFront,"BOTTOM-FRONT",Bottom_Front );
resetView(btnBottomBack,"BOTTOM-BACK" ,Bottom_Back);
resetView(btnBottomLeft,"BOTTOM-LEFT" ,Bottom_Left);
resetView(btnBottomRight,"BOTTOM-RIGHT" ,Bottom_Right);
}
//추가화면, 혹은 정보뷰 중에 하나 입력
public void setInfoView(View view, ImageFile file)
{
ConstraintLayout constraintLayout = view.findViewById(R.id.capture_add);
constraintLayout.setVisibility(View.INVISIBLE);
LinearLayout linearLayout = view.findViewById(R.id.linearlayout_Info);
linearLayout.setVisibility(View.VISIBLE);
ImageView imageView = view.findViewById(R.id.nuclide_picture);
imageView.setImageDrawable(new BitmapDrawable(BitmapFactory.decodeFile(file.getFilePath())));
TextView textViewDate = view.findViewById(R.id.nuclide_date);
textViewDate.setText(file.getCreateDate());
TextView textViewData = view.findViewById(R.id.nuclide_data);
textViewData.setText(file.getPkgData()+" μ㏜/hr");
}
@RequiresApi(api = Build.VERSION_CODES.M)
@Override
public void onStart() {
@@ -177,7 +283,9 @@ public class CaptureFragment extends Fragment {
if(dataManager.selPkg == null)
return;
resetButton();
allResetView();
List<ImageFile> files = dataManager.dbHelper.selectFiles(dataManager.selPkg.getPKG_NO(),dataManager.testEnum.label());
for(ImageFile file : files)
@@ -185,51 +293,21 @@ public class CaptureFragment extends Fragment {
if(file.getType().contains(Type.name()))
{
TestType dbType =TestType.getByName(file.getType().replace(Type.name(),""));
Button selButton = getTestTypeButton(dbType);
View selView = getTestTypeView(dbType);
setInfoView(selView,file);
/*
if(selButton != null)
{
selButton.setBackground(new BitmapDrawable(BitmapFactory.decodeFile(file.getFilePath())));
selButton.setForeground(null);
}
}*/
}
}
}
@RequiresApi(api = Build.VERSION_CODES.M)
public void resetButton(){
int defaultColor = Color.parseColor("#C8C8C8");
Drawable defaultDrawable = ContextCompat.getDrawable(context,R.drawable.add_picture_32);
btnTopFront.setBackgroundColor(defaultColor);
btnTopFront.setForeground(defaultDrawable);
btnTopBack.setBackgroundColor(defaultColor);
btnTopBack.setForeground(defaultDrawable);
btnTopLeft.setBackgroundColor(defaultColor);
btnTopLeft.setForeground(defaultDrawable);
btnTopRight.setBackgroundColor(defaultColor);
btnTopRight.setForeground(defaultDrawable);
btnMiddleFront.setBackgroundColor(defaultColor);
btnMiddleFront.setForeground(defaultDrawable);
btnMiddleBack.setBackgroundColor(defaultColor);
btnMiddleBack.setForeground(defaultDrawable);
btnMiddleLeft.setBackgroundColor(defaultColor);
btnMiddleLeft.setForeground(defaultDrawable);
btnMiddleRight.setBackgroundColor(defaultColor);
btnMiddleRight.setForeground(defaultDrawable);
btnBottomFront.setBackgroundColor(defaultColor);
btnBottomFront.setForeground(defaultDrawable);
btnBottomBack.setBackgroundColor(defaultColor);
btnBottomBack.setForeground(defaultDrawable);
btnBottomLeft.setBackgroundColor(defaultColor);
btnBottomLeft.setForeground(defaultDrawable);
btnBottomRight.setBackgroundColor(defaultColor);
btnBottomRight.setForeground(defaultDrawable);
}
public Button getTestTypeButton(TestType type){
public View getTestTypeView(TestType type){
switch (type)
{
case Top_Front:
@@ -269,6 +347,13 @@ public class CaptureFragment extends Fragment {
startActivity(cameraIntent);
}
private void pictureInfoActivityOpen(String testType)
{
Intent intent = new Intent(getActivity().getApplicationContext(), PictureInfoActivity.class);
intent.putExtra("TestType",testType);
startActivity(intent);
}
}

View File

@@ -366,6 +366,33 @@ public class DBHelper extends SQLiteOpenHelper {
db.close();
}
public void deleteFile(ImageFile f)
{
db = getWritableDatabase();
List<ImageFile> selectData = new ArrayList<>();
String selQuery = "Select * From File Where PkgNo ='" + f.getPkgNo()+"' AND TestEnum = '" + f.getTestEnum() + "' AND Type = '" + f.getType()+"'";
//기존에 데이터가 있는지 확인
Cursor cs = db.rawQuery(selQuery,null);
while (cs.moveToNext()){
selectData.add(new ImageFile(cs.getString(0),cs.getString(1),cs.getString(2),cs.getString(3),cs.getString(4)
,cs.getString(5),cs.getString(6),cs.getString(7)));
}
//있으면 이미지 삭제
if(selectData.size() != 0)
{
for (ImageFile imagefile:
selectData) {
File file = new File(imagefile.getFilePath());
if(file.exists())
file.delete();
}
}
//db데이터 삭제
db.execSQL("DELETE from File where PKGNo ='" + f.getPkgNo()+"' AND TestEnum = '" + f.getTestEnum() + "' AND Type = '" + f.getType()+"'");
db.close();
}
public List<ImageFile> selectFiles(String PkgNo, String TestEnum){
List<ImageFile> resultData = new ArrayList<ImageFile>();
db = getWritableDatabase();
@@ -379,6 +406,21 @@ public class DBHelper extends SQLiteOpenHelper {
}
public ImageFile selectFile(String PkgNo, String TestEnum,String type )
{
ImageFile imageFile = null;
String selQuery = "Select * From File Where PkgNo ='" + PkgNo+"' AND TestEnum = '" + TestEnum + "' AND Type = '" + type+"'";
db = getWritableDatabase();
Cursor cs = db.rawQuery(selQuery,null);
while (cs.moveToNext()){
imageFile = new ImageFile(cs.getString(0),cs.getString(1),cs.getString(2),cs.getString(3),cs.getString(4)
,cs.getString(5),cs.getString(6),cs.getString(7));
}
db.close();
return imageFile;
}

View File

@@ -1,27 +1,33 @@
package com.qtagger.Database;
import com.qtagger.Data.CaptureFragmentEnum;
import com.qtagger.Data.TestEnum;
public enum TestType {
Top_Front,
Top_Back,
Top_Left,
Top_Right,
Top_Front("TOP - FRONT"),
Top_Back("TOP - BACK"),
Top_Left("TOP - LEFT"),
Top_Right("TOP - RIGHT"),
Middle_Front,
Middle_Back,
Middle_Left,
Middle_Right,
Middle_Front("MIDDLE - FRONT"),
Middle_Back("MIDDLE - BACK"),
Middle_Left("MIDDLE - LEFT"),
Middle_Right("MIDDLE - RIGHT"),
Bottom_Front,
Bottom_Back,
Bottom_Left,
Bottom_Right,
Bottom_Front("BOTTOM - FRONT"),
Bottom_Back("BOTTOM - BACK"),
Bottom_Left("BOTTOM - LEFT"),
Bottom_Right("BOTTOM - RIGHT"),
Filling,
Weight,
Nothing;
Filling("Filling"),
Weight("Weight"),
Nothing("Nothing");
private final String label;
public String label() {
return label;
}
TestType(String label) {
this.label = label;
}
public static TestType getByName(String Name){

View File

@@ -5,7 +5,7 @@
<item>
<shape android:shape="rectangle">
<corners
android:radius="20dp" />
android:radius="10dp" />
<solid
android:color="@color/white"/>
</shape>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activity.PictureInfoActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/imageView"
android:background="@color/white"
android:scaleType="fitXY"
android:layout_gravity="center"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_top_menu"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="#66000000"
android:orientation="horizontal">
<androidx.constraintlayout.utils.widget.ImageFilterButton
android:id="@+id/imageFilterButton_Back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:background="@android:color/transparent"
android:minWidth="48dp"
android:minHeight="48dp"
android:src="@drawable/btn_back_white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.utils.widget.ImageFilterButton
android:id="@+id/imageFilterButton_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:background="@android:color/transparent"
android:minWidth="32dp"
android:minHeight="32dp"
android:src="@drawable/btn_save"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Activity.Test.CaptureFragment">
<ScrollView
@@ -15,477 +16,82 @@
android:id="@+id/linearList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"
android:background="@color/defaultBackgroundColor"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="20dp"
android:padding="10dp"
android:background="@android:color/transparent"
android:orientation="horizontal"
>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:src="@color/black"
android:layout_weight="0.5"/>
<LinearLayout
android:layout_weight="0.3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="위치"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="날짜"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="선량률"/>
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="TOP - FRONT"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="2022-09-28 15:23:26"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="0.04112 μSv/hr"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/default_fragment_background"
android:layout_margin="10dp"
android:orientation="vertical">
android:text="TOP"
android:textSize="18sp"
android:layout_marginLeft="25dp"
android:layout_marginTop="20dp"
android:textColor="@color/defaultTitleColor"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_topFront"
/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_topBack"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_topLeft"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_topRight"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="상단"
android:textSize="24sp">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_top_front"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="#C8C8C8"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_top_back"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="앞쪽">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="뒤쪽">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_top_left"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_top_right"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="왼쪽">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="오른쪽">
</TextView>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/default_fragment_background"
android:layout_margin="10dp"
android:orientation="vertical">
android:text="MIDDLE"
android:textSize="18sp"
android:layout_marginLeft="25dp"
android:layout_marginTop="20dp"
android:textColor="@color/defaultTitleColor"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_middleFront"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_middleBack"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_middleLeft"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_middleRight"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="중단"
android:textSize="24sp">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_middle_front"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_middle_back"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="앞쪽">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="뒤쪽">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_middle_left"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_middle_right"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="왼쪽">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="오른쪽">
</TextView>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/default_fragment_background"
android:layout_margin="10dp"
android:orientation="vertical">
android:text="BOTTOM"
android:textSize="18sp"
android:layout_marginLeft="25dp"
android:layout_marginTop="20dp"
android:textColor="@color/defaultTitleColor"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="하단"
android:textSize="24sp">
</TextView>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_bottomFront"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_bottomBack"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_bottomLeft"/>
<include
layout="@layout/layout_capture_test"
android:id="@+id/capture_bottomRight"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_bottom_front"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_bottom_back"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="앞쪽">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="뒤쪽">
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_bottom_left"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_bottom_right"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="왼쪽">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="오른쪽">
</TextView>
</LinearLayout>
</LinearLayout>

View File

@@ -3,8 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:background="@drawable/default_fragment_background"
android:background="@color/defaultBackgroundColor"
tools:context=".Activity.Test.WeightFragment">
<ScrollView
@@ -14,7 +13,7 @@
android:id="@+id/linearList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_fragment_background"
android:background="@android:color/transparent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:orientation="vertical">
@@ -24,7 +23,8 @@
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:paddingLeft="10dp"
android:text="무게 측정"
android:gravity="center"
android:text="전자저울 인디케이터를 촬영해주세요"
android:textSize="20sp"
android:textColor="@color/black"/>
@@ -34,8 +34,10 @@
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_margin="20dp"
android:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:background="@drawable/listview_background"
android:stateListAnimator="@null"
android:foreground="@drawable/img_cam02"
android:foregroundGravity="center"
/>

View File

@@ -1,116 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:background="@drawable/listview_background">
android:background="#000000"
android:orientation="vertical">
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/capture_add"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_margin="20dp"
android:background="@drawable/listview_background">
android:layout_height="match_parent"
android:background="@android:color/transparent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintlayout_topFront_add"
android:layout_width="match_parent"
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/img_cam01" />
<TextView
android:id="@+id/capture_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TOP-FRONT"
android:textColor="@color/defaultDisableTextColor"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/imageView_deleteButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/btn_close"
android:visibility="invisible" />
<LinearLayout
android:id="@+id/linearlayout_Info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:orientation="horizontal"
android:padding="10dp"
android:visibility="invisible">
<ImageView
android:id="@+id/nuclide_picture"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@android:color/transparent">
android:layout_weight="0.7"
android:src="@color/black" />
<ImageView
android:id="@+id/imageView3"
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="0.3"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/img_cam01" />
android:text="위치" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TOP-FRONT"
android:textColor="@color/defaultDisableTextColor"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
android:text="날짜" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/imageView_deleteButton_topFront"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_alignParentEnd="true"
android:visibility="invisible"
android:src="@drawable/btn_close" />
<LinearLayout
android:id="@+id/linearlayout_topFront"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:background="@android:color/transparent"
android:orientation="horizontal"
android:visibility="invisible"
>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:src="@color/black"
android:layout_weight="0.7"/>
<LinearLayout
android:layout_weight="0.3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="위치"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="날짜"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="선량률"/>
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="TOP - FRONT"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="2022-09-28 15:23:26"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="0.04112 μSv/hr"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="선량률" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TOP - FRONT"
android:textStyle="bold" />
<TextView
android:id="@+id/nuclide_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2022-09-28 15:23:26"
android:textStyle="bold" />
<TextView
android:id="@+id/nuclide_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0.04112 μSv/hr"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -19,6 +19,7 @@
<color name="dialogIdColor">#0f8fc4</color>
<color name="editTextBorder">#b4b4b4</color>
<color name="editTextSelectBorder">#408dcf</color>
<color name="defaultTitleColor">#333333</color>
<color name="cutLine">#EAEAEA</color>
<color name="gray_background">#F3F3F3</color>
<color name="seekbar_progress_background">#D6D6D6</color>