카메라 추가

This commit is contained in:
DESKTOP-1A3P75F\lee
2022-08-31 07:40:34 +09:00
parent f114491825
commit 1ed10b75db
18 changed files with 594 additions and 389 deletions

View File

@@ -13,7 +13,7 @@
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.location.gps" />
@@ -21,7 +21,6 @@
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
@@ -81,6 +80,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -69,6 +69,7 @@ public class CaptureFragment extends Fragment {
context = container.getContext();
View view = inflater.inflate(R.layout.fragment_capture, container, false);
/*
Button topFront = view.findViewById(R.id.button_top_front);
topFront.setOnClickListener(new View.OnClickListener() {
@RequiresApi(api = Build.VERSION_CODES.M)
@@ -80,7 +81,7 @@ public class CaptureFragment extends Fragment {
Toast.makeText(context, "이미지 교체", Toast.LENGTH_SHORT).show();
}
});
});*/
//button_top_front
// Inflate the layout for this fragment
return view;

View File

@@ -1,19 +1,33 @@
package com.qtagger.Activity.Test;
import static android.app.Activity.RESULT_CANCELED;
import static android.app.Activity.RESULT_OK;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;
import android.provider.MediaStore;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
import com.qtagger.R;
import com.qtagger.util.CommonHelper;
import com.qtagger.util.DataManager;
/**
* A simple {@link Fragment} subclass.
@@ -22,6 +36,9 @@ import com.qtagger.R;
*/
public class PhotographFragment extends Fragment {
View view;
Button pictureAdd;
private DataManager dataManager = DataManager.getInstance();
private static final int Image_Capture_Code = 1;
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
@@ -61,11 +78,33 @@ public class PhotographFragment extends Fragment {
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
ActivityResultLauncher<Intent> activityResultPicture = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult>() {
@RequiresApi(api = Build.VERSION_CODES.M)
@Override
public void onActivityResult(ActivityResult result) {
Bitmap bmp = CommonHelper.CameraResult(result);
pictureAdd.setBackground(new BitmapDrawable(bmp));
pictureAdd.setForeground(null);
}
});
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_photograph, container, false);
//button_img_add
pictureAdd = view.findViewById(R.id.button_img_add);
pictureAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
activityResultPicture.launch(dataManager.cameraIntent);
}
});
/*
Button t1 = view.findViewById(R.id.button_picture1_test);
t1.setOnLongClickListener(new View.OnLongClickListener() {
@@ -87,9 +126,21 @@ public class PhotographFragment extends Fragment {
t1.setForeground(getActivity().getDrawable(R.drawable.circle_check_foreground));
t1.setForegroundGravity(Gravity.TOP|Gravity.RIGHT);
}
});
});*/
// Inflate the layout for this fragment
return view;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == Image_Capture_Code) {
if (resultCode == RESULT_OK) {
Bitmap bp = (Bitmap) data.getExtras().get("data");
pictureAdd.setBackground(new BitmapDrawable(bp));
} else if (resultCode == RESULT_CANCELED) {
Toast.makeText(getActivity(), "Cancelled", Toast.LENGTH_LONG).show();
}
}
}
}

View File

@@ -1,17 +1,53 @@
package com.qtagger.Activity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.FileProvider;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.view.View;
import com.qtagger.Data.TestEnum;
import com.qtagger.R;
import com.qtagger.util.CommonHelper;
import com.qtagger.util.DataManager;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
public class TestSelectActivity extends AppCompatActivity {
private DataManager dataManager = DataManager.getInstance();
private static final int REQUESTR_IMAGE_CAPTURE = 1;
private static final int SINGLE_PERMISSION = 1004;
private String imageFilePath;
private Uri photoUri;
ActivityResultLauncher<Intent> activityResultPicture = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult>() {
@Override
public void onActivityResult(ActivityResult result) {
CommonHelper.CameraResult(result);
}
});
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -31,9 +67,12 @@ public class TestSelectActivity extends AppCompatActivity {
@Override
public void onClick(View v) {
dataManager.testEnum = TestEnum.예비검사;
activityResultPicture.launch(dataManager.cameraIntent);
}
});
findViewById(R.id.button_인수검사).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@@ -1,6 +1,22 @@
package com.qtagger.util;
import static android.app.Activity.RESULT_OK;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.TypedValue;
import androidx.activity.result.ActivityResult;
public class CommonHelper {
public static Bitmap CameraResult(ActivityResult result){
if( result.getResultCode() == RESULT_OK && result.getData() != null){
Bundle extras = result.getData().getExtras();
return (Bitmap) extras.get("data");
}
return null;
}
}

View File

@@ -1,5 +1,14 @@
package com.qtagger.util;
import static android.app.Activity.RESULT_OK;
import android.content.Intent;
import android.provider.MediaStore;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.fragment.app.FragmentManager;
import com.qtagger.Data.TestEnum;
@@ -11,6 +20,7 @@ public class DataManager {
public Account loginAccount;
public FragmentManager fragmentManager;
public TestEnum testEnum = TestEnum.선택안함;
public Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
private static class DataManagerHolder{
public static final DataManager INSTANCE = new DataManager();

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/drawable-v24.iml" filepath="$PROJECT_DIR$/.idea/drawable-v24.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../../../.." vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="NONE" />
</component>
<component name="ChangeListManager">
<list default="true" id="71e575b3-36f1-4171-ab68-e4a491f67269" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/add_picture_32.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/ironweight_64.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../../../../.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../../../.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../../java/com/qtagger/Activity/Test/CaptureFragment.java" beforeDir="false" afterPath="$PROJECT_DIR$/../../java/com/qtagger/Activity/Test/CaptureFragment.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drawable/default_fragment_background.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drawable/default_fragment_background.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../layout/fragment_capture.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../layout/fragment_capture.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../layout/fragment_fill.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../layout/fragment_fill.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../layout/fragment_photograph.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../layout/fragment_photograph.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../layout/fragment_weight2.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../layout/fragment_weight2.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../../../.." />
</component>
<component name="ProjectId" id="2E5XN2PeijaLYp3c3h6yB2794Mf" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="RunOnceActivity.cidr.known.project.marker" value="true" />
<property name="cidr.known.project.marker" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="AndroidSdkUpdater" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="71e575b3-36f1-4171-ab68-e4a491f67269" name="Changes" comment="" />
<created>1661886375861</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1661886375861</updated>
</task>
<servers />
</component>
</project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -10,8 +10,7 @@
android:bottomRightRadius="12dp"
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
<stroke
android:width="1dp"
android:color="#5C000000"/>
<padding
android:bottom="5dp"/>
</shape>

View File

@@ -3,13 +3,13 @@
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"
tools:context=".Activity.Test.CaptureFragment">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:scrollbars="none">
<LinearLayout
android:id="@+id/linearList"
@@ -17,316 +17,407 @@
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="상단">
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:background="@drawable/default_fragment_background"
android:layout_margin="10dp"
android:orientation="vertical">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_top_front"
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal" />
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="상단"
android:textSize="24sp">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
</TextView>
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
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:foreground="@drawable/add_picture_32"
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
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: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: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"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@drawable/default_fragment_background"
android:layout_margin="10dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 앞쪽 ">
android:orientation="horizontal">
</TextView>
<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
android:layout_width="wrap_content"
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 뒤쪽 ">
android:orientation="horizontal">
</TextView>
<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" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 왼쪽 ">
<com.qtagger.CustomPalette.SquareButton
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" />
</TextView>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="오른쪽">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TextView>
<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: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: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>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:text="중단">
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
android:background="@drawable/default_fragment_background"
android:layout_margin="10dp"
android:orientation="vertical">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
<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:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
<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:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
</LinearLayout>
<com.qtagger.CustomPalette.SquareButton
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
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 앞쪽 ">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="앞쪽">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 뒤쪽 ">
</TextView>
</TextView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="뒤쪽">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 왼쪽 ">
</TextView>
</TextView>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="오른쪽">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TextView>
<com.qtagger.CustomPalette.SquareButton
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: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>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:text="하단">
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:foreground="@drawable/picture_image_32"
android:foregroundGravity="center_vertical|center_horizontal"
android:adjustViewBounds="true" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 앞쪽 ">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 뒤쪽 ">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text=" 왼쪽 ">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="오른쪽">
</TextView>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -15,42 +15,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="채움률">
</TextView>
<TextView
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:textSize="20sp"
android:text="25%"
android:layout_width="match_parent"
android:layout_height="match_parent">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="사진">
</TextView>
<com.qtagger.CustomPalette.SquareButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="500dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/fill_test"
/>
</LinearLayout>
</ScrollView>

View File

@@ -41,99 +41,67 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_picture1_test"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="300dp"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:foregroundGravity="top|right"
android:background="@drawable/fill_test" />
android:background="@drawable/weight_test_image"
/>
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
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="@drawable/capture_test_image"
android:foregroundGravity="top|right"
android:adjustViewBounds="true"/>
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:background="@drawable/capture_test_image2"
android:foregroundGravity="top|right"
android:adjustViewBounds="true" />
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:background="@drawable/fill_test"
android:foregroundGravity="top|right"
android:adjustViewBounds="true" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:background="@drawable/fill_test"
android:foregroundGravity="top|right"
android:adjustViewBounds="true" />
android:orientation="horizontal">
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/image_squrebutton_background" />
<com.qtagger.CustomPalette.SquareButton
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="@drawable/capture_test_image2"
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/image_squrebutton_background" />
android:foregroundGravity="center_vertical|center_horizontal" />
<com.qtagger.CustomPalette.SquareButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="3dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="@drawable/image_squrebutton_background" />
<com.qtagger.CustomPalette.SquareButton
android:id="@+id/button_img_add"
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>
</LinearLayout>

View File

@@ -15,37 +15,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="무게">
</TextView>
<TextView
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:textSize="20sp"
android:text="43.9"
android:layout_width="match_parent"
android:layout_height="match_parent">
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:text="사진">
</TextView>
<com.qtagger.CustomPalette.SquareButton
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="500dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/weight_test_image" />