Model class ready with data for sending
parent
b50037625f
commit
25eaa9d914
|
|
@ -9,6 +9,7 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ import androidx.navigation.Navigation;
|
|||
import com.utopiaindustries.qc_android.R;
|
||||
import com.utopiaindustries.qc_android.db.CheckpointRepository;
|
||||
import com.utopiaindustries.qc_android.models.InspectionCheckPoint;
|
||||
import com.utopiaindustries.qc_android.viewmodels.DataEntryViewModel;
|
||||
import com.utopiaindustries.qc_android.models.DataEntryModel;
|
||||
import com.utopiaindustries.qc_android.utils.AppDataManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -28,7 +29,7 @@ public class QCTerryActivity extends AppCompatActivity {
|
|||
|
||||
private NavController navController;
|
||||
private List<InspectionCheckPoint> checkPointList = new ArrayList<>();
|
||||
private DataEntryViewModel viewModel;
|
||||
private DataEntryModel dataEntryModel;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
|
@ -49,7 +50,8 @@ public class QCTerryActivity extends AppCompatActivity {
|
|||
|
||||
private void initializeLayout() {
|
||||
|
||||
viewModel = new ViewModelProvider(this).get(DataEntryViewModel.class);
|
||||
dataEntryModel = AppDataManager.getInstance().getCurrentDataEntry();
|
||||
|
||||
loadCheckPoints();
|
||||
|
||||
// Setup Navigation
|
||||
|
|
@ -99,7 +101,7 @@ public class QCTerryActivity extends AppCompatActivity {
|
|||
checkPointList.add(item);
|
||||
}*/
|
||||
|
||||
viewModel.setCheckPointList(checkPointList);
|
||||
dataEntryModel.setCheckPointList(checkPointList);
|
||||
}
|
||||
|
||||
private void setStatusBarColor() {
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
|
||||
public interface OnCheckPointClickListener {
|
||||
void onImagePickerClicked(int position);
|
||||
void onImageClicked(int parentPosition, int imagePosition, Uri imageUri);
|
||||
void onImageDeleteClicked(int parentPosition, int imagePosition);
|
||||
void onDeleteAllImagesClicked(int position);
|
||||
/*void onImageClicked(int parentPosition, int imagePosition, Uri imageUri);*/
|
||||
void onImageDeleteClicked(int parentPosition);
|
||||
/*void onDeleteAllImagesClicked(int position);*/
|
||||
void onRemarksChanged(int position, String remarks);
|
||||
void onCheckBoxChanged(int position, boolean isOkChecked, boolean isNoChecked);
|
||||
}
|
||||
|
|
@ -59,8 +59,12 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
// Set title
|
||||
holder.tvTitle.setText(item.getTitle());
|
||||
|
||||
holder.etRemarks.removeTextChangedListener(holder.remarksTextWatcher);
|
||||
holder.cbOk.setOnCheckedChangeListener(null);
|
||||
holder.cbNo.setOnCheckedChangeListener(null);
|
||||
|
||||
// Set remarks
|
||||
holder.etRemarks.setText(item.getRemarks());
|
||||
holder.etRemarks.setText((item.getRemarks() != null ? item.getRemarks() : ""));
|
||||
|
||||
// Set checkboxes (mutually exclusive)
|
||||
holder.cbOk.setChecked(item.isOkChecked());
|
||||
|
|
@ -97,13 +101,19 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
}
|
||||
|
||||
private void setupListeners(CheckPointViewHolder holder, int position) {
|
||||
|
||||
if (holder.remarksTextWatcher != null) {
|
||||
holder.etRemarks.removeTextChangedListener(holder.remarksTextWatcher);
|
||||
}
|
||||
// Remarks text change listener
|
||||
holder.etRemarks.addTextChangedListener(new TextWatcher() {
|
||||
holder.remarksTextWatcher = new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
checkPointList.get(position).setRemarks(s.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
|
@ -111,8 +121,11 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
listener.onRemarksChanged(position, s.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
holder.etRemarks.addTextChangedListener(holder.remarksTextWatcher);
|
||||
|
||||
holder.cbOk.setOnCheckedChangeListener(null);
|
||||
// OK checkbox listener
|
||||
holder.cbOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
|
@ -133,6 +146,7 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
}
|
||||
});
|
||||
|
||||
holder.cbNo.setOnCheckedChangeListener(null);
|
||||
// NO checkbox listener
|
||||
holder.cbNo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
|
@ -164,11 +178,11 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
});
|
||||
|
||||
// Delete all images button
|
||||
holder.btnDeleteAllImages.setOnClickListener(new View.OnClickListener() {
|
||||
holder.btnDeleteImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (listener != null) {
|
||||
listener.onDeleteAllImagesClicked(position);
|
||||
listener.onImageDeleteClicked(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -183,8 +197,9 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
TextView tvTitle;
|
||||
CheckBox cbOk, cbNo;
|
||||
EditText etRemarks;
|
||||
ImageButton btnImagePicker, btnDeleteAllImages;
|
||||
ImageButton btnImagePicker, btnDeleteImage;
|
||||
RecyclerView imageRecyclerView;
|
||||
TextWatcher remarksTextWatcher;
|
||||
|
||||
public CheckPointViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
|
@ -194,7 +209,7 @@ public class CheckPointAdapter extends RecyclerView.Adapter<CheckPointAdapter.Ch
|
|||
etRemarks = itemView.findViewById(R.id.check_point_remarks);
|
||||
imageRecyclerView = itemView.findViewById(R.id.image_recycler_view);
|
||||
btnImagePicker = itemView.findViewById(R.id.image_picker);
|
||||
btnDeleteAllImages = itemView.findViewById(R.id.delete_image);
|
||||
btnDeleteImage = itemView.findViewById(R.id.delete_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,61 +1,26 @@
|
|||
package com.utopiaindustries.qc_android.fragments;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultCallback;
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.utopiaindustries.qc_android.R;
|
||||
import com.utopiaindustries.qc_android.viewmodels.DataEntryViewModel;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import com.utopiaindustries.qc_android.models.DataEntryModel;
|
||||
import com.utopiaindustries.qc_android.utils.AppDataManager;
|
||||
|
||||
public class FragmentQcTerryOne extends Fragment {
|
||||
|
||||
private EditText edtFirstName, edtLastName, edtEmail;
|
||||
private Button btnNext;
|
||||
private DataEntryViewModel viewModel;
|
||||
|
||||
private ActivityResultLauncher<String[]> requestMultiplePermissionsLauncher;
|
||||
// Activity Result Launchers
|
||||
private ActivityResultLauncher<Intent> cameraLauncher;
|
||||
private ActivityResultLauncher<String> galleryLauncher;
|
||||
|
||||
private ImageView imageView;
|
||||
private Button btnCamera, btnGallery;
|
||||
private Uri photoUri;
|
||||
|
||||
private static final int PENDING_CAMERA = 1;
|
||||
private static final int PENDING_GALLERY = 2;
|
||||
private int pendingAction = 0;
|
||||
|
||||
|
||||
private DataEntryModel dataEntryModel;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
|
@ -64,40 +29,33 @@ public class FragmentQcTerryOne extends Fragment {
|
|||
// Inflate the layout
|
||||
View view = inflater.inflate(R.layout.fragment_qc_terry_one, container, false);
|
||||
|
||||
initializeLayouts(view);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
public void initializeLayouts(View view) {
|
||||
dataEntryModel = AppDataManager.getInstance().getCurrentDataEntry();
|
||||
// Initialize views
|
||||
edtFirstName = view.findViewById(R.id.edtFirstName);
|
||||
edtLastName = view.findViewById(R.id.edtLastName);
|
||||
edtEmail = view.findViewById(R.id.edtEmail);
|
||||
btnNext = view.findViewById(R.id.btnNext);
|
||||
|
||||
imageView = view.findViewById(R.id.imageView);
|
||||
btnCamera = view.findViewById(R.id.btnCamera);
|
||||
btnGallery = view.findViewById(R.id.btnGallery);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
// Initialize ViewModel
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(DataEntryViewModel.class);
|
||||
|
||||
// Load existing data if any
|
||||
if (viewModel.getFirstName().getValue() != null) {
|
||||
edtFirstName.setText(viewModel.getFirstName().getValue());
|
||||
if (dataEntryModel.getFirstName() != null) {
|
||||
edtFirstName.setText(dataEntryModel.getFirstName());
|
||||
}
|
||||
if (viewModel.getLastName().getValue() != null) {
|
||||
edtLastName.setText(viewModel.getLastName().getValue());
|
||||
if (dataEntryModel.getLastName() != null) {
|
||||
edtLastName.setText(dataEntryModel.getLastName());
|
||||
}
|
||||
if (viewModel.getEmail().getValue() != null) {
|
||||
edtEmail.setText(viewModel.getEmail().getValue());
|
||||
}
|
||||
|
||||
if (viewModel.getSelectedImageUri().getValue() != null) {
|
||||
photoUri = viewModel.getSelectedImageUri().getValue();
|
||||
imageView.setImageURI(photoUri);
|
||||
if (dataEntryModel.getEmail() != null) {
|
||||
edtEmail.setText(dataEntryModel.getEmail());
|
||||
}
|
||||
|
||||
// Setup button click
|
||||
|
|
@ -105,189 +63,14 @@ public class FragmentQcTerryOne extends Fragment {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
// Save data to ViewModel
|
||||
viewModel.setFirstName(edtFirstName.getText().toString());
|
||||
viewModel.setLastName(edtLastName.getText().toString());
|
||||
viewModel.setEmail(edtEmail.getText().toString());
|
||||
dataEntryModel.setFirstName(edtFirstName.getText().toString());
|
||||
dataEntryModel.setLastName(edtLastName.getText().toString());
|
||||
dataEntryModel.setEmail(edtEmail.getText().toString());
|
||||
|
||||
// Navigate to next screen
|
||||
Navigation.findNavController(v)
|
||||
.navigate(R.id.action_fragmentOne_to_fragmentTwo);
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize Activity Result Launchers
|
||||
initializeLaunchers();
|
||||
|
||||
btnCamera.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkPermissionAndOpenCamera();
|
||||
}
|
||||
});
|
||||
|
||||
btnGallery.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkPermissionAndOpenGallery();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initializeLaunchers() {
|
||||
|
||||
requestMultiplePermissionsLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.RequestMultiplePermissions(),
|
||||
new ActivityResultCallback<Map<String, Boolean>>() {
|
||||
@Override
|
||||
public void onActivityResult(Map<String, Boolean> result) {
|
||||
boolean allGranted = true;
|
||||
for (Boolean granted : result.values()) {
|
||||
if (!granted) {
|
||||
allGranted = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (allGranted) {
|
||||
// All permissions granted, proceed based on what was requested
|
||||
if (pendingAction == PENDING_CAMERA) {
|
||||
openCamera();
|
||||
} else if (pendingAction == PENDING_GALLERY) {
|
||||
openGallery();
|
||||
}
|
||||
} else {
|
||||
// Some permissions denied
|
||||
Toast.makeText(getContext(), "Permissions denied", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
// Camera launcher
|
||||
cameraLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
result -> {
|
||||
if (result.getResultCode() == getActivity().RESULT_OK && photoUri != null) {
|
||||
imageView.setImageURI(photoUri);
|
||||
viewModel.setSelectedImageUri(photoUri);
|
||||
}
|
||||
});
|
||||
|
||||
// Gallery launcher
|
||||
galleryLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.GetContent(),
|
||||
uri -> {
|
||||
if (uri != null) {
|
||||
imageView.setImageURI(uri);
|
||||
viewModel.setSelectedImageUri(uri);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check permissions and open camera
|
||||
*/
|
||||
private void checkPermissionAndOpenCamera() {
|
||||
String[] requiredPermissions = getRequiredCameraPermissions();
|
||||
|
||||
if (hasPermissions(requiredPermissions)) {
|
||||
openCamera();
|
||||
} else {
|
||||
pendingAction = PENDING_CAMERA;
|
||||
requestMultiplePermissionsLauncher.launch(requiredPermissions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check permissions and open gallery
|
||||
*/
|
||||
private void checkPermissionAndOpenGallery() {
|
||||
String[] requiredPermissions = getRequiredGalleryPermissions();
|
||||
|
||||
if (hasPermissions(requiredPermissions)) {
|
||||
openGallery();
|
||||
} else {
|
||||
pendingAction = PENDING_GALLERY;
|
||||
requestMultiplePermissionsLauncher.launch(requiredPermissions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get required permissions for camera
|
||||
*/
|
||||
private String[] getRequiredCameraPermissions() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// Android 13+ - Camera only (storage permission not needed for camera)
|
||||
return new String[]{Manifest.permission.CAMERA};
|
||||
} else {
|
||||
// Android 12 and below - Camera + storage for saving photo
|
||||
return new String[]{
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get required permissions for gallery
|
||||
*/
|
||||
private String[] getRequiredGalleryPermissions() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// Android 13+ uses READ_MEDIA_IMAGES
|
||||
return new String[]{Manifest.permission.READ_MEDIA_IMAGES};
|
||||
} else {
|
||||
// Android 12 and below use READ_EXTERNAL_STORAGE
|
||||
return new String[]{Manifest.permission.READ_EXTERNAL_STORAGE};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if all permissions are granted
|
||||
*/
|
||||
private boolean hasPermissions(String[] permissions) {
|
||||
for (String permission : permissions) {
|
||||
if (ContextCompat.checkSelfPermission(requireContext(), permission)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void openCamera() {
|
||||
try {
|
||||
File photoFile = createImageFile();
|
||||
photoUri = FileProvider.getUriForFile(
|
||||
requireContext(),
|
||||
requireContext().getPackageName() + ".provider",
|
||||
photoFile
|
||||
);
|
||||
|
||||
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
|
||||
cameraLauncher.launch(cameraIntent);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(getContext(), "Error creating file", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
private void openGallery() {
|
||||
galleryLauncher.launch("image/*");
|
||||
}
|
||||
|
||||
private File createImageFile() throws IOException {
|
||||
// Create an image file name
|
||||
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date());
|
||||
String imageFileName = "JPEG_" + timeStamp + "_";
|
||||
|
||||
File storageDir = requireContext().getExternalFilesDir(null);
|
||||
File image = File.createTempFile(
|
||||
imageFileName, /* prefix */
|
||||
".jpg", /* suffix */
|
||||
storageDir /* directory */
|
||||
);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.utopiaindustries.qc_android.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
@ -12,17 +13,17 @@ import android.widget.Toast;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.utopiaindustries.qc_android.R;
|
||||
import com.utopiaindustries.qc_android.viewmodels.DataEntryViewModel;
|
||||
import com.utopiaindustries.qc_android.models.DataEntryModel;
|
||||
import com.utopiaindustries.qc_android.utils.AppDataManager;
|
||||
|
||||
public class FragmentQcTerryThree extends Fragment {
|
||||
|
||||
private EditText edtCompany, edtPosition, edtSalary;
|
||||
private EditText edtCompany, edtPosition;
|
||||
private Button btnSubmit;
|
||||
private TextView tvSummary;
|
||||
private DataEntryViewModel viewModel;
|
||||
private DataEntryModel dataEntryModel;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
|
@ -30,27 +31,30 @@ public class FragmentQcTerryThree extends Fragment {
|
|||
@Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_qc_terry_three, container, false);
|
||||
|
||||
edtCompany = view.findViewById(R.id.edtCompany);
|
||||
edtPosition = view.findViewById(R.id.edtPosition);
|
||||
edtSalary = view.findViewById(R.id.edtSalary);
|
||||
btnSubmit = view.findViewById(R.id.btnSubmit);
|
||||
tvSummary = view.findViewById(R.id.tvSummary);
|
||||
initializeLayouts(view);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
public void initializeLayouts(View view) {
|
||||
dataEntryModel = AppDataManager.getInstance().getCurrentDataEntry();
|
||||
|
||||
edtCompany = view.findViewById(R.id.edtCompany);
|
||||
edtPosition = view.findViewById(R.id.edtPosition);
|
||||
btnSubmit = view.findViewById(R.id.btnSubmit);
|
||||
tvSummary = view.findViewById(R.id.tvSummary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(DataEntryViewModel.class);
|
||||
|
||||
// Load existing data
|
||||
if (viewModel.getCompany().getValue() != null) {
|
||||
edtCompany.setText(viewModel.getCompany().getValue());
|
||||
if (dataEntryModel.getCompany() != null) {
|
||||
edtCompany.setText(dataEntryModel.getCompany());
|
||||
}
|
||||
if (viewModel.getPosition().getValue() != null) {
|
||||
edtPosition.setText(viewModel.getPosition().getValue());
|
||||
if (dataEntryModel.getPosition() != null) {
|
||||
edtPosition.setText(dataEntryModel.getPosition());
|
||||
}
|
||||
|
||||
// Display summary from previous screens
|
||||
|
|
@ -71,8 +75,8 @@ public class FragmentQcTerryThree extends Fragment {
|
|||
}
|
||||
|
||||
// Save final data
|
||||
viewModel.setCompany(edtCompany.getText().toString());
|
||||
viewModel.setPosition(edtPosition.getText().toString());
|
||||
dataEntryModel.setCompany(edtCompany.getText().toString());
|
||||
dataEntryModel.setPosition(edtPosition.getText().toString());
|
||||
|
||||
// Submit data
|
||||
submitData();
|
||||
|
|
@ -84,33 +88,33 @@ public class FragmentQcTerryThree extends Fragment {
|
|||
StringBuilder summary = new StringBuilder();
|
||||
summary.append("Summary:\n\n");
|
||||
|
||||
if (viewModel.getFirstName().getValue() != null &&
|
||||
!viewModel.getFirstName().getValue().isEmpty()) {
|
||||
if (dataEntryModel.getFirstName() != null &&
|
||||
!dataEntryModel.getFirstName().isEmpty()) {
|
||||
summary.append("Name: ")
|
||||
.append(viewModel.getFirstName().getValue())
|
||||
.append(dataEntryModel.getFirstName())
|
||||
.append(" ")
|
||||
.append(viewModel.getLastName().getValue())
|
||||
.append(dataEntryModel.getLastName())
|
||||
.append("\n");
|
||||
}
|
||||
|
||||
if (viewModel.getEmail().getValue() != null &&
|
||||
!viewModel.getEmail().getValue().isEmpty()) {
|
||||
if (dataEntryModel.getEmail() != null &&
|
||||
!dataEntryModel.getEmail().isEmpty()) {
|
||||
summary.append("Email: ")
|
||||
.append(viewModel.getEmail().getValue())
|
||||
.append(dataEntryModel.getEmail())
|
||||
.append("\n");
|
||||
}
|
||||
|
||||
if (viewModel.getAddress().getValue() != null &&
|
||||
!viewModel.getAddress().getValue().isEmpty()) {
|
||||
if (dataEntryModel.getAddress() != null &&
|
||||
!dataEntryModel.getAddress().isEmpty()) {
|
||||
summary.append("Address: ")
|
||||
.append(viewModel.getAddress().getValue())
|
||||
.append(dataEntryModel.getAddress())
|
||||
.append("\n");
|
||||
}
|
||||
|
||||
if (viewModel.getCity().getValue() != null &&
|
||||
!viewModel.getCity().getValue().isEmpty()) {
|
||||
if (dataEntryModel.getCity() != null &&
|
||||
!dataEntryModel.getCity().isEmpty()) {
|
||||
summary.append("City: ")
|
||||
.append(viewModel.getCity().getValue())
|
||||
.append(dataEntryModel.getCity())
|
||||
.append("\n");
|
||||
}
|
||||
|
||||
|
|
@ -120,11 +124,12 @@ public class FragmentQcTerryThree extends Fragment {
|
|||
private void submitData() {
|
||||
// Show success message
|
||||
Toast.makeText(getActivity(), "Data submitted successfully!", Toast.LENGTH_SHORT).show();
|
||||
|
||||
DataEntryModel dataEntryModel = AppDataManager.getInstance().getCurrentDataEntry();
|
||||
Log.e("DataEntryModel: " ,""+dataEntryModel);
|
||||
// Update UI
|
||||
btnSubmit.setText("Submitted ✓");
|
||||
btnSubmit.setEnabled(false);
|
||||
btnSubmit.setBackgroundColor(getResources().getColor(android.R.color.darker_gray));
|
||||
//btnSubmit.setText("Submitted ✓");
|
||||
//btnSubmit.setEnabled(false);
|
||||
//btnSubmit.setBackgroundColor(getResources().getColor(android.R.color.darker_gray));
|
||||
|
||||
// You would typically:
|
||||
// 1. Send data to API/backend
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
|
@ -38,7 +36,8 @@ import com.utopiaindustries.qc_android.R;
|
|||
import com.utopiaindustries.qc_android.adapters.CheckPointAdapter;
|
||||
import com.utopiaindustries.qc_android.helper.Helper;
|
||||
import com.utopiaindustries.qc_android.models.InspectionCheckPoint;
|
||||
import com.utopiaindustries.qc_android.viewmodels.DataEntryViewModel;
|
||||
import com.utopiaindustries.qc_android.models.DataEntryModel;
|
||||
import com.utopiaindustries.qc_android.utils.AppDataManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
@ -48,12 +47,11 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.OnCheckPointClickListener{
|
||||
public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.OnCheckPointClickListener {
|
||||
|
||||
private Button btnNext;
|
||||
private DataEntryViewModel viewModel;
|
||||
private DataEntryModel dataEntryModel;
|
||||
private CheckPointAdapter adapter;
|
||||
private List<InspectionCheckPoint> checkPointList = new ArrayList<>();
|
||||
private RecyclerView recyclerView;
|
||||
|
|
@ -82,6 +80,8 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
}
|
||||
|
||||
public void initializeLayouts(View view) {
|
||||
dataEntryModel = AppDataManager.getInstance().getCurrentDataEntry();
|
||||
|
||||
recyclerView = view.findViewById(R.id.check_point_recycler_view);
|
||||
btnNext = view.findViewById(R.id.btnNext);
|
||||
|
||||
|
|
@ -91,9 +91,7 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity()).get(DataEntryViewModel.class);
|
||||
|
||||
checkPointList.addAll(viewModel.getCheckPointList().getValue());
|
||||
checkPointList.addAll(dataEntryModel.getCheckPointList());
|
||||
// Setup RecyclerView
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
adapter = new CheckPointAdapter(getActivity(), checkPointList, this);
|
||||
|
|
@ -111,7 +109,6 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
}*/
|
||||
|
||||
|
||||
|
||||
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
@ -133,49 +130,48 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
alertForPictures(getActivity(), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public void onImageClicked(int parentPosition, int imagePosition, Uri imageUri) {
|
||||
// Handle image click - maybe show in full screen
|
||||
// showImageFullScreen(imageUri);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void onImageDeleteClicked(int parentPosition, int imagePosition) {
|
||||
public void onImageDeleteClicked(int parentPosition) {
|
||||
// Remove image from checkpoint
|
||||
//adapter.removeImageFromCheckPoint(parentPosition, imagePosition);
|
||||
if (!checkPointList.get(parentPosition).getImages().isEmpty()) {
|
||||
checkPointList.get(parentPosition).getImages().remove(checkPointList.get(parentPosition).getImages().size() - 1);
|
||||
adapter.notifyItemChanged(parentPosition);
|
||||
dataEntryModel.setCheckPointList(checkPointList);
|
||||
} else {
|
||||
System.out.println("The list is empty");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public void onDeleteAllImagesClicked(int position) {
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void onRemarksChanged(int position, String remarks) {
|
||||
// Update remarks in the model
|
||||
Log.e("Pos: ",""+position);
|
||||
Log.e("Remarks: ",""+remarks);
|
||||
InspectionCheckPoint item = checkPointList.get(position);
|
||||
item.setRemarks(remarks);
|
||||
viewModel.setCheckPointList(checkPointList);
|
||||
Log.e("ViewModel: ",""+viewModel.getCheckPointList().getValue());
|
||||
|
||||
dataEntryModel.setCheckPointList(checkPointList);
|
||||
Log.e("ViewModel: ", "" + dataEntryModel.getCheckPointList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckBoxChanged(int position, boolean isOkChecked, boolean isNoChecked) {
|
||||
// Handle checkbox changes
|
||||
InspectionCheckPoint item = checkPointList.get(position);
|
||||
item.setOkChecked(isOkChecked);
|
||||
item.setNoChecked(isNoChecked);
|
||||
viewModel.setCheckPointList(checkPointList);
|
||||
|
||||
dataEntryModel.setCheckPointList(checkPointList);
|
||||
}
|
||||
|
||||
private void openImagePicker(int position) {
|
||||
/*private void openImagePicker(int position) {
|
||||
// Open camera or gallery
|
||||
// After getting image URI:
|
||||
// Uri imageUri = ...;
|
||||
// adapter.addImageToCheckPoint(position, imageUri);
|
||||
}
|
||||
}*/
|
||||
|
||||
public void alertForPictures(Context con, int position) {
|
||||
ViewGroup viewGroup = requireActivity().findViewById(android.R.id.content);
|
||||
|
|
@ -248,7 +244,7 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
result -> {
|
||||
if (result.getResultCode() == getActivity().RESULT_OK && photoUri != null) {
|
||||
//imageView.setImageURI(photoUri);
|
||||
viewModel.setSelectedImageUri(photoUri);
|
||||
dataEntryModel.setSelectedImageUri(photoUri);
|
||||
|
||||
Helper.uriToByteArrayAsync(
|
||||
getContext(),
|
||||
|
|
@ -258,7 +254,7 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
requireActivity().runOnUiThread(() -> {
|
||||
checkPointList.get(currentPosition).addImage(compressedImage);
|
||||
adapter.notifyItemChanged(currentPosition);
|
||||
viewModel.setCheckPointList(checkPointList);
|
||||
dataEntryModel.setCheckPointList(checkPointList);
|
||||
currentPosition = -1;
|
||||
});
|
||||
},
|
||||
|
|
@ -277,7 +273,7 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
uri -> {
|
||||
if (uri != null) {
|
||||
//imageView.setImageURI(uri);
|
||||
viewModel.setSelectedImageUri(uri);
|
||||
dataEntryModel.setSelectedImageUri(uri);
|
||||
|
||||
Helper.uriToByteArrayAsync(
|
||||
getContext(),
|
||||
|
|
@ -287,7 +283,7 @@ public class FragmentQcTerryTwo extends Fragment implements CheckPointAdapter.On
|
|||
requireActivity().runOnUiThread(() -> {
|
||||
checkPointList.get(currentPosition).addImage(compressedImage);
|
||||
adapter.notifyItemChanged(currentPosition);
|
||||
viewModel.setCheckPointList(checkPointList);
|
||||
dataEntryModel.setCheckPointList(checkPointList);
|
||||
currentPosition = -1;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
package com.utopiaindustries.qc_android.models;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DataEntryModel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// Personal Info
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String email;
|
||||
|
||||
// Address Info
|
||||
private String address;
|
||||
private String city;
|
||||
|
||||
// Employment Info
|
||||
private String company;
|
||||
private String position;
|
||||
|
||||
private Uri selectedImageUri;
|
||||
private List<InspectionCheckPoint> checkPointList = new ArrayList<>();
|
||||
|
||||
// Constructor
|
||||
public DataEntryModel() {
|
||||
// Default constructor
|
||||
}
|
||||
|
||||
// Copy constructor
|
||||
public DataEntryModel(DataEntryModel other) {
|
||||
this.firstName = other.firstName;
|
||||
this.lastName = other.lastName;
|
||||
this.email = other.email;
|
||||
this.address = other.address;
|
||||
this.city = other.city;
|
||||
this.company = other.company;
|
||||
this.position = other.position;
|
||||
this.selectedImageUri = other.selectedImageUri;
|
||||
this.checkPointList = new ArrayList<>(other.checkPointList);
|
||||
}
|
||||
|
||||
public List<InspectionCheckPoint> getCheckPointList() {
|
||||
return checkPointList;
|
||||
}
|
||||
|
||||
public void setCheckPointList(List<InspectionCheckPoint> checkPointList) {
|
||||
this.checkPointList = checkPointList;
|
||||
}
|
||||
|
||||
public Uri getSelectedImageUri() {
|
||||
return selectedImageUri;
|
||||
}
|
||||
|
||||
public void setSelectedImageUri(Uri selectedImageUri) {
|
||||
this.selectedImageUri = selectedImageUri;
|
||||
}
|
||||
|
||||
public String getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(String position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public String getCompany() {
|
||||
return company;
|
||||
}
|
||||
|
||||
public void setCompany(String company) {
|
||||
this.company = company;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
firstName = null;
|
||||
lastName = null;
|
||||
email = null;
|
||||
address = null;
|
||||
city = null;
|
||||
company = null;
|
||||
position = null;
|
||||
selectedImageUri = null;
|
||||
checkPointList.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataEntryModel{" +
|
||||
"firstName='" + firstName + '\'' +
|
||||
", lastName='" + lastName + '\'' +
|
||||
", email='" + email + '\'' +
|
||||
", address='" + address + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", company='" + company + '\'' +
|
||||
", position='" + position + '\'' +
|
||||
", selectedImageUri=" + selectedImageUri +
|
||||
", checkPointListSize=" + checkPointList +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.utopiaindustries.qc_android.utils;
|
||||
|
||||
import com.utopiaindustries.qc_android.models.DataEntryModel;
|
||||
|
||||
public class AppDataManager {
|
||||
|
||||
private static AppDataManager instance;
|
||||
private DataEntryModel currentDataEntry;
|
||||
|
||||
private AppDataManager() {
|
||||
currentDataEntry = new DataEntryModel();
|
||||
}
|
||||
|
||||
public static AppDataManager getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new AppDataManager();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public DataEntryModel getCurrentDataEntry() {
|
||||
return currentDataEntry;
|
||||
}
|
||||
|
||||
public void setCurrentDataEntry(DataEntryModel dataEntry) {
|
||||
this.currentDataEntry = dataEntry;
|
||||
}
|
||||
|
||||
public void clearCurrentDataEntry() {
|
||||
currentDataEntry = new DataEntryModel();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.utopiaindustries.qc_android.utils;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import com.utopiaindustries.qc_android.R;
|
||||
|
||||
public class NotificationHelper {
|
||||
|
||||
private static final String CHANNEL_ID = "00112233";
|
||||
private static final String CHANNEL_NAME = "QC_App_Channel";
|
||||
private static final String CHANNEL_DESCRIPTION = "Channel_for_qc_app";
|
||||
private static final String PRODUCT_CHANNEL_ID = "675463133";
|
||||
private static final String PRODUCT_CHANNEL_NAME= "QC_PRODUCT_NOTIFICATION_CHANNEL";
|
||||
public static final String PRODUCT_CHANNEL_DESCRIPTION = "QC_CHANNEL_FOR_PRODUCT";
|
||||
|
||||
|
||||
public static void showNotification(Context context, String title, String message) {
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
// Create a notification channel for devices running Android Oreo (API 26) and higher
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setDescription(CHANNEL_DESCRIPTION);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
// Build the notification
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.utopia_svg_logo) // Set your notification icon here
|
||||
.setContentTitle(title)
|
||||
.setContentText(message)
|
||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
|
||||
|
||||
// Show the notification
|
||||
notificationManager.notify(0, builder.build());
|
||||
}
|
||||
|
||||
public static void showProductNotification(Context context, String title, String message) {
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
// Create a notification channel for devices running Android Oreo (API 26) and higher
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(PRODUCT_CHANNEL_ID, PRODUCT_CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setDescription(PRODUCT_CHANNEL_DESCRIPTION);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
// Build the notification
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, PRODUCT_CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.utopia_svg_logo) // Set your notification icon here
|
||||
.setContentTitle(title)
|
||||
.setContentText(message)
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH );
|
||||
|
||||
// Show the notification
|
||||
notificationManager.notify(0, builder.build());
|
||||
}
|
||||
|
||||
public static void showNotificationForReportUpload(Context context, int notificationId, String title, String message) {
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setDescription(CHANNEL_DESCRIPTION);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.utopia_svg_logo)
|
||||
.setContentTitle(title)
|
||||
.setContentText(message)
|
||||
.setStyle(new NotificationCompat.BigTextStyle().bigText(message)) // Allow long messages
|
||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT);
|
||||
|
||||
notificationManager.notify(notificationId, builder.build());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
package com.utopiaindustries.qc_android.viewmodels;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.utopiaindustries.qc_android.models.InspectionCheckPoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DataEntryViewModel extends ViewModel {
|
||||
|
||||
// Personal Info
|
||||
private MutableLiveData<String> firstName = new MutableLiveData<>();
|
||||
private MutableLiveData<String> lastName = new MutableLiveData<>();
|
||||
private MutableLiveData<String> email = new MutableLiveData<>();
|
||||
|
||||
// Address Info
|
||||
private MutableLiveData<String> address = new MutableLiveData<>();
|
||||
private MutableLiveData<String> city = new MutableLiveData<>();
|
||||
|
||||
// Employment Info
|
||||
private MutableLiveData<String> company = new MutableLiveData<>();
|
||||
private MutableLiveData<String> position = new MutableLiveData<>();
|
||||
|
||||
private MutableLiveData<Uri> selectedImageUri = new MutableLiveData<>();
|
||||
|
||||
private MutableLiveData<List<InspectionCheckPoint>> checkPointList =
|
||||
new MutableLiveData<>(new ArrayList<>());
|
||||
|
||||
// Getters and Setters
|
||||
public LiveData<String> getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName.setValue(firstName);
|
||||
}
|
||||
|
||||
public LiveData<String> getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName.setValue(lastName);
|
||||
}
|
||||
|
||||
public LiveData<String> getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email.setValue(email);
|
||||
}
|
||||
|
||||
public LiveData<String> getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address.setValue(address);
|
||||
}
|
||||
|
||||
public LiveData<String> getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city.setValue(city);
|
||||
}
|
||||
|
||||
public LiveData<String> getCompany() {
|
||||
return company;
|
||||
}
|
||||
|
||||
public void setCompany(String company) {
|
||||
this.company.setValue(company);
|
||||
}
|
||||
|
||||
public LiveData<String> getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(String position) {
|
||||
this.position.setValue(position);
|
||||
}
|
||||
|
||||
public MutableLiveData<Uri> getSelectedImageUri() {
|
||||
return selectedImageUri;
|
||||
}
|
||||
|
||||
public void setSelectedImageUri(Uri uri) {
|
||||
selectedImageUri.setValue(uri);
|
||||
}
|
||||
|
||||
public LiveData<List<InspectionCheckPoint>> getCheckPointList() {
|
||||
return checkPointList;
|
||||
}
|
||||
|
||||
public void setCheckPointList(List<InspectionCheckPoint> list) {
|
||||
checkPointList.setValue(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="225.36101dp" android:viewportHeight="227" android:viewportWidth="554" android:width="550dp">
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M251.64,198.78V183.84H254v14.94Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M259.74,188.21v10.57h-2.38V183.84h1.94l8.46,10.79V183.86h2.36v14.92h-2.05Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M273.5,198.78L273.5,183.84h5.3a7.46,7.46 0,0 1,4 1,6.25 6.25,0 0,1 2.43,2.69 8.47,8.47 0,0 1,0.83 3.76,8.25 8.25,0 0,1 -0.9,4 6.42,6.42 0,0 1,-2.53 2.61,7.71 7.71,0 0,1 -3.86,0.93ZM283.69,191.29a6.39,6.39 0,0 0,-0.58 -2.78,4.64 4.64,0 0,0 -1.66,-1.9 4.86,4.86 0,0 0,-2.65 -0.69h-2.92v10.77h2.92a4.73,4.73 0,0 0,2.67 -0.71,4.6 4.6,0 0,0 1.65,-1.94A6.41,6.41 0,0 0,283.69 191.29Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M294.8,198.88a6.69,6.69 0,0 1,-3 -0.61,5.28 5.28,0 0,1 -2,-1.66 7.11,7.11 0,0 1,-1.09 -2.4,10.8 10.8,0 0,1 -0.35,-2.8v-7.57h2.38v7.57a9.27,9.27 0,0 0,0.2 2,5.31 5.31,0 0,0 0.66,1.72 3.37,3.37 0,0 0,1.24 1.19,3.81 3.81,0 0,0 1.94,0.45 3.88,3.88 0,0 0,2 -0.45,3.33 3.33,0 0,0 1.25,-1.22 5.43,5.43 0,0 0,0.68 -1.72,9.72 9.72,0 0,0 0.2,-2v-7.57h2.38v7.57a11.16,11.16 0,0 1,-0.37 2.89,7.06 7.06,0 0,1 -1.14,2.39 5.12,5.12 0,0 1,-2 1.61A6.81,6.81 0,0 1,294.8 198.88Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M313.23,187.35a2.71,2.71 0,0 0,-0.6 -0.49,5.61 5.61,0 0,0 -0.95,-0.49 8.61,8.61 0,0 0,-1.18 -0.38,5.66 5.66,0 0,0 -1.31,-0.15 3.64,3.64 0,0 0,-2.19 0.54,1.78 1.78,0 0,0 -0.71,1.51 1.6,1.6 0,0 0,0.39 1.13,2.84 2.84,0 0,0 1.24,0.68c0.55,0.17 1.23,0.36 2.05,0.55a14.89,14.89 0,0 1,2.64 0.86,4.34 4.34,0 0,1 1.7,1.32 3.61,3.61 0,0 1,0.6 2.18,4.07 4.07,0 0,1 -0.43,1.93 3.71,3.71 0,0 1,-1.19 1.33,5.5 5.5,0 0,1 -1.74,0.76 8.52,8.52 0,0 1,-2.13 0.25,10.48 10.48,0 0,1 -2.22,-0.24 10.34,10.34 0,0 1,-2.1 -0.69,10 10,0 0,1 -1.87,-1.11l1.1,-2a4.08,4.08 0,0 0,0.78 0.6,9.06 9.06,0 0,0 1.21,0.62 9.63,9.63 0,0 0,1.49 0.5,7 7,0 0,0 1.65,0.2 4,4 0,0 0,2.16 -0.49,1.61 1.61,0 0,0 0.75,-1.43 1.54,1.54 0,0 0,-0.5 -1.19,4 4,0 0,0 -1.41,-0.76c-0.61,-0.21 -1.34,-0.42 -2.2,-0.63a13.13,13.13 0,0 1,-2.46 -0.86,3.61 3.61,0 0,1 -1.47,-1.21 3.36,3.36 0,0 1,-0.49 -1.91,4.27 4.27,0 0,1 0.71,-2.49 4.32,4.32 0,0 1,1.95 -1.52,7 7,0 0,1 2.75,-0.52 8.65,8.65 0,0 1,1.93 0.22,8.74 8.74,0 0,1 1.7,0.6 6.92,6.92 0,0 1,1.4 0.87Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M328.13,185.92h-5v12.86h-2.38V185.92h-5v-2.08h12.33Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M330.13,198.78L330.13,183.84h6.5a4.09,4.09 0,0 1,1.85 0.42,4.83 4.83,0 0,1 1.46,1.11 5.42,5.42 0,0 1,1 1.57,4.76 4.76,0 0,1 0.35,1.76 5,5 0,0 1,-0.36 1.9,4.55 4.55,0 0,1 -1,1.55 3.92,3.92 0,0 1,-1.55 0.94l3.51,5.69h-2.65l-3.24,-5.2L332.5,193.58v5.2ZM332.5,191.5h4.11a1.82,1.82 0,0 0,1.15 -0.39,2.62 2.62,0 0,0 0.8,-1 3.21,3.21 0,0 0,0.3 -1.39,2.89 2.89,0 0,0 -0.35,-1.41 2.84,2.84 0,0 0,-0.87 -1,2 2,0 0,0 -1.16,-0.37h-4Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M344,198.78V183.84h2.38v14.94Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M360,196.69v2.09H349.76V183.84h10.05v2.08h-7.68v4.27h6.67v1.94h-6.67v4.56Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M371.11,187.35a2.31,2.31 0,0 0,-0.6 -0.49,5.89 5.89,0 0,0 -0.94,-0.49 8.61,8.61 0,0 0,-1.18 -0.38,5.81 5.81,0 0,0 -1.32,-0.15 3.59,3.59 0,0 0,-2.18 0.54,1.79 1.79,0 0,0 -0.72,1.51 1.56,1.56 0,0 0,0.4 1.13,2.86 2.86,0 0,0 1.23,0.68c0.55,0.17 1.24,0.36 2.05,0.55a14.36,14.36 0,0 1,2.64 0.86,4.31 4.31,0 0,1 1.71,1.32 3.61,3.61 0,0 1,0.6 2.18,4.19 4.19,0 0,1 -0.43,1.93 3.8,3.8 0,0 1,-1.19 1.33,5.66 5.66,0 0,1 -1.75,0.76 8.52,8.52 0,0 1,-2.13 0.25,10.48 10.48,0 0,1 -2.22,-0.24A10.76,10.76 0,0 1,363 198a9.63,9.63 0,0 1,-1.86 -1.11l1.09,-2a4.08,4.08 0,0 0,0.78 0.6,9.71 9.71,0 0,0 1.21,0.62 10.14,10.14 0,0 0,1.5 0.5,7 7,0 0,0 1.65,0.2 4,4 0,0 0,2.15 -0.49,1.61 1.61,0 0,0 0.75,-1.43 1.53,1.53 0,0 0,-0.49 -1.19,4 4,0 0,0 -1.41,-0.76c-0.61,-0.21 -1.35,-0.42 -2.2,-0.63a12.88,12.88 0,0 1,-2.46 -0.86,3.71 3.71,0 0,1 -1.48,-1.21 3.44,3.44 0,0 1,-0.48 -1.91,4.27 4.27,0 0,1 0.7,-2.49 4.32,4.32 0,0 1,1.95 -1.52,7 7,0 0,1 2.76,-0.52 8.56,8.56 0,0 1,1.92 0.22,9.08 9.08,0 0,1 1.71,0.6 7.21,7.21 0,0 1,1.4 0.87Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M379.47,191.47a10.71,10.71 0,0 1,0.88 -4.21,34.27 34.27,0 0,1 2.17,-4.26l1.77,0.75a16.31,16.31 0,0 0,-0.84 1.45c-0.3,0.59 -0.59,1.25 -0.88,2a14.37,14.37 0,0 0,-0.69 2.2,9.35 9.35,0 0,0 -0.27,2.18 9.87,9.87 0,0 0,0.72 3.56,24 24,0 0,0 1.89,3.8l-1.68,0.89a23.48,23.48 0,0 1,-1.59 -2.72,15.52 15.52,0 0,1 -1.08,-2.8A10.08,10.08 0,0 1,379.47 191.47Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M386.56,198.78L386.56,183.84h6.27a4.09,4.09 0,0 1,1.85 0.42,5 5,0 0,1 2.78,4.44 5.18,5.18 0,0 1,-0.56 2.35,4.77 4.77,0 0,1 -1.57,1.82 4,4 0,0 1,-2.38 0.71h-4v5.2ZM388.93,191.5h3.88a1.93,1.93 0,0 0,1.15 -0.37,2.45 2.45,0 0,0 0.8,-1 3.37,3.37 0,0 0,0.3 -1.44,2.89 2.89,0 0,0 -0.34,-1.44 2.49,2.49 0,0 0,-0.87 -1,2.1 2.1,0 0,0 -1.15,-0.35h-3.77Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M399.43,198.78L399.43,183.84h6.51a4.09,4.09 0,0 1,1.85 0.42,4.83 4.83,0 0,1 1.46,1.11 5.42,5.42 0,0 1,1 1.57,4.76 4.76,0 0,1 0.35,1.76 5,5 0,0 1,-0.36 1.9,4.55 4.55,0 0,1 -1,1.55 3.92,3.92 0,0 1,-1.55 0.94l3.51,5.69L408.5,198.78l-3.24,-5.2h-3.45v5.2ZM401.81,191.5h4.11a1.82,1.82 0,0 0,1.15 -0.39,2.62 2.62,0 0,0 0.8,-1 3.21,3.21 0,0 0,0.3 -1.39,2.89 2.89,0 0,0 -0.35,-1.41 2.84,2.84 0,0 0,-0.87 -1,2 2,0 0,0 -1.16,-0.37h-4Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M413.34,198.78V183.84h2.38v14.94Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M420,183.84l4.53,12 4.48,-12h2.48l-5.87,14.94H423.4l-5.89,-14.94Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M437.65,183.84h2.23l5.8,14.94L443.2,198.78l-1.46,-4.06h-6l-1.47,4.06h-2.48ZM441.11,192.97 L438.76,186.42L436.4,193Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M458.5,185.92h-5v12.86h-2.38V185.92h-5v-2.08H458.5Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M470.74,196.69v2.09H460.5V183.84h10.05v2.08h-7.68v4.27h6.67v1.94h-6.67v4.56Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M476.91,191.47a10.08,10.08 0,0 1,-0.4 2.8,16.36 16.36,0 0,1 -1.09,2.8 26.65,26.65 0,0 1,-1.58 2.72l-1.71,-0.89a23.22,23.22 0,0 0,1.9 -3.8,10.06 10.06,0 0,0 0.71,-3.56 9.89,9.89 0,0 0,-0.26 -2.18,15.62 15.62,0 0,0 -0.7,-2.2c-0.28,-0.71 -0.58,-1.37 -0.88,-2s-0.57,-1.07 -0.81,-1.45l1.79,-0.75a37,37 0,0 1,2.15 4.26A10.89,10.89 0,0 1,476.91 191.47Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M479,198.78v-2.7h1.92v2.7Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M489.09,198.78V183.84h2.38v12.85h8v2.09Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M510.26,185.92h-5v12.86h-2.37V185.92h-5v-2.08h12.33Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M512.26,198.78L512.26,183.84h5.3a7.48,7.48 0,0 1,4 1,6.38 6.38,0 0,1 2.43,2.69 8.46,8.46 0,0 1,0.82 3.76,8.37 8.37,0 0,1 -0.89,4 6.39,6.39 0,0 1,-2.54 2.61,7.67 7.67,0 0,1 -3.85,0.93ZM522.44,191.29a6.25,6.25 0,0 0,-0.58 -2.78,4.57 4.57,0 0,0 -1.66,-1.9 4.8,4.8 0,0 0,-2.64 -0.69h-2.92v10.77h2.92a4.69,4.69 0,0 0,2.66 -0.71,4.55 4.55,0 0,0 1.66,-1.94A6.56,6.56 0,0 0,522.44 191.29Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M526.78,198.78v-2.7h1.91v2.7Z"/>
|
||||
|
||||
<path android:fillColor="#ccb596" android:pathData="M247.05,107.18l-26.33,0l0,69.01l-20,0l0,-69.01l-26.45,0l0,-17.56l72.78,0l0,17.56z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M347.24,176.1v-85h36.3a24.92,24.92 0,0 1,11.2 2.52,28.58 28.58,0 0,1 8.74,6.59 31.6,31.6 0,0 1,5.75 9.22,27.39 27.39,0 0,1 2.1,10.42 29.78,29.78 0,0 1,-2 10.78,30.91 30.91,0 0,1 -5.51,9.22 26,26 0,0 1,-8.56 6.47,25.56 25.56,0 0,1 -11.14,2.39L366.89,148.71L366.89,176.1ZM366.89,131.55h16.05a7.6,7.6 0,0 0,6 -3c1.67,-2 2.51,-4.91 2.51,-8.74a15.17,15.17 0,0 0,-0.78 -5.15,10.4 10.4,0 0,0 -2.09,-3.59 8,8 0,0 0,-3 -2.1,9.08 9.08,0 0,0 -3.35,-0.66L366.89,108.31Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M480.91,91.06h17.73l31,85L509.54,176.06l-6.59,-19L476.48,157.06l-6.47,19L449.89,176.06ZM499.72,143.53 L489.78,113.46 479.59,143.53Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M168.26,116.3l0,-26.88l-42.22,-22.44l0,16.92l42.22,32.4z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:fillType="evenOdd" android:pathData="M332.87,142.66c-2,-1.25 -4,-2.6 -6,-3.95a1.39,1.39 0,0 1,-0.49 -1c-0.23,-3.36 -0.43,-6.72 -0.57,-10.08a1.9,1.9 0,0 1,0.54 -1.34c1.81,-1.61 3.68,-3.16 5.56,-4.71a2.79,2.79 0,0 0,0.87 -3.7l-0.06,-0.12 -1.23,-2.56c-0.46,-0.94 -0.88,-1.88 -1.37,-2.8a2.75,2.75 0,0 0,-3.28 -1.47c-2.33,0.5 -4.68,0.94 -7,1.48a1.71,1.71 0,0 1,-1.76 -0.54c-2.36,-2.2 -4.82,-4.31 -7.2,-6.48a1.89,1.89 0,0 1,-0.61 -1.29c0.16,-2.42 0.4,-4.84 0.65,-7.26a3.08,3.08 0,0 0,-2 -3.32c-1.85,-0.7 -3.73,-1.36 -5.62,-2A3,3 0,0 0,299.63 93c-1.25,2 -2.5,4 -3.84,5.87a2.24,2.24 0,0 1,-1.51 0.75c-1.07,0.08 -2.13,0.15 -3.2,0.21s-2.14,-0.13 -3.2,-0.21a2.24,2.24 0,0 1,-1.51 -0.75C285,97 283.77,95 282.52,93a3,3 0,0 0,-3.71 -1.44c-1.89,0.6 -3.76,1.26 -5.62,2a3.07,3.07 0,0 0,-2 3.32c0.25,2.42 0.49,4.84 0.65,7.26a2,2 0,0 1,-0.62 1.29c-2.38,2.17 -4.83,4.28 -7.2,6.48a1.71,1.71 0,0 1,-1.76 0.54c-2.32,-0.54 -4.66,-1 -7,-1.48a2.77,2.77 0,0 0,-3.29 1.47c-0.48,0.92 -0.91,1.86 -1.36,2.8s-0.83,1.7 -1.24,2.56l-0.06,0.12a2.78,2.78 0,0 0,0.88 3.7c1.87,1.55 3.74,3.1 5.56,4.71a1.89,1.89 0,0 1,0.53 1.34c-0.14,3.36 -0.34,6.72 -0.56,10.08a1.47,1.47 0,0 1,-0.49 1c-2,1.35 -3.94,2.7 -6,3.95a3.15,3.15 0,0 0,-1.61 4c0.56,1.71 1.17,3.41 1.79,5.11 0.69,1.88 1.79,2.47 3.77,2.24q3.5,-0.37 7,-0.6a1.8,1.8 0,0 1,1.2 0.56q3.35,3.69 6.6,7.45a1.72,1.72 0,0 1,0.47 1.23c-0.43,2.38 -0.92,4.76 -1.47,7.12a3,3 0,0 0,1.56 3.64q2.64,1.36 5.36,2.59a3,3 0,0 0,3.75 -0.91c1.53,-1.89 3.05,-3.78 4.65,-5.6a2,2 0,0 1,1.47 -0.47c2.42,0.1 4.83,0.24 7.25,0.4 2.41,-0.16 4.83,-0.3 7.24,-0.4a2.06,2.06 0,0 1,1.48 0.47c1.6,1.82 3.12,3.71 4.65,5.6a3,3 0,0 0,3.75 0.91q2.7,-1.23 5.36,-2.59a3,3 0,0 0,1.56 -3.64c-0.56,-2.36 -1,-4.74 -1.48,-7.12a1.81,1.81 0,0 1,0.47 -1.23q3.27,-3.75 6.61,-7.45a1.78,1.78 0,0 1,1.2 -0.56c2.33,0.15 4.67,0.35 7,0.6 2,0.23 3.07,-0.36 3.77,-2.24 0.62,-1.7 1.22,-3.4 1.78,-5.11a3.15,3.15 0,0 0,-1.6 -4m-28.36,18.79a29.82,29.82 0,1 1,13.87 -39.83,29.78 29.78,0 0,1 -13.87,39.83"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M126.27,88.78v25.93a66.9,66.9 0,0 1,-1.48 14.2,38.74 38.74,0 0,1 -4.67,12 25.14,25.14 0,0 1,-8.26 8.37,22.73 22.73,0 0,1 -12.29,3.18 22.79,22.79 0,0 1,-12.19 -3.07,24.68 24.68,0 0,1 -8.15,-8.26A38.3,38.3 0,0 1,74.56 129a67.6,67.6 0,0 1,-1.48 -14.3V89L32,121.71a101,101 0,0 0,3.6 21.5,65.06 65.06,0 0,0 12.08,23.63 59,59 0,0 0,21.09 16.21q12.81,6 30.83,6 17.37,0 30.2,-5.72a59.14,59.14 0,0 0,21.3 -15.68,63.84 63.84,0 0,0 12.5,-23.63c2.68,-9.11 4,-22.74 4,-22.74Z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M51.01,98.64l-0.73,-25.98l-3.41,0l-0.84,30.17l4.98,-4.19z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M61.67,90.57l-0.69,-35.54l-3.42,0l-0.76,39.65l4.87,-4.11z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M71.99,83.5l-0.3,-10.84l-3.41,0l-0.4,14.32l4.11,-3.48z"/>
|
||||
|
||||
<path android:fillColor="#1d1a1b" android:pathData="M42.27,105.32l-2.29,-82.91l-7.07,0l-2.57,92.99l11.93,-10.08z"/>
|
||||
|
||||
<path android:fillColor="#ccb596" android:pathData="M421.91,91.06h19.64v85.04h-19.64z"/>
|
||||
|
||||
</vector>
|
||||
|
|
@ -10,16 +10,16 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="@color/theme_color"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme" >
|
||||
android:theme="?attr/actionBarTheme">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QC - Terry"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="QC - Terry"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_11sdp" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
|
@ -27,11 +27,11 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:layout_above="@+id/btnNext"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:layout_margin="5dp"
|
||||
android:padding="10dp"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -83,50 +83,6 @@
|
|||
android:inputType="textEmailAddress" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnCamera"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rounded_btn_login"
|
||||
android:text="Camera" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/rounded_btn_login"
|
||||
android:text="Gallery " />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:background="#f0f0f0"
|
||||
android:padding="5dp"
|
||||
android:scaleType="centerCrop" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
|
|
@ -134,9 +90,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:textSize="@dimen/_11sdp"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/rounded_btn_login"
|
||||
android:text="Next →" />
|
||||
android:padding="10dp"
|
||||
android:text="Next →"
|
||||
android:textSize="@dimen/_11sdp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,32 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/theme_color"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="QC - Terry"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_11sdp" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Employment Information"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:layout_margin="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Summary will appear here"
|
||||
android:textSize="14sp"
|
||||
android:padding="12dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:background="#F5F5F5"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
android:padding="12dp"
|
||||
android:text="Summary will appear here"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -39,7 +52,7 @@
|
|||
android:id="@+id/edtCompany"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"/>
|
||||
android:inputType="text" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
|
@ -53,29 +66,19 @@
|
|||
android:id="@+id/edtPosition"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"/>
|
||||
android:inputType="text" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:hint="Salary (Optional)">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtSalary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSubmit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Submit All Data"
|
||||
android:layout_marginTop="16dp"
|
||||
android:backgroundTint="@android:color/holo_green_dark"/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSubmit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/rounded_btn_login"
|
||||
android:padding="10dp"
|
||||
android:text="Submit"
|
||||
android:textSize="@dimen/_11sdp" />
|
||||
|
||||
</RelativeLayout>
|
||||
Loading…
Reference in New Issue