Observation Module Screens design
parent
6b62c02d52
commit
1ca035b0e9
|
@ -0,0 +1,3 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="17" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetSelector">
|
||||||
|
<selectionStates>
|
||||||
|
<SelectionState runConfigName="app">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
|
</selectionStates>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
<option name="resolveExternalAnnotations" value="false" />
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -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>
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:ignore="DiscouragedApi">
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.camera"
|
android:name="android.hardware.camera"
|
||||||
|
@ -29,10 +30,25 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.HSEObservationsApp"
|
android:theme="@style/Theme.HSEObservationsApp"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".activities.PermitToWorkForms.PermitTwoActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.PermitToWorkForms.PermitOneActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.ObservationForms.ObservationThreeActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.ObservationForms.ObservationTwoActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activities.ObservationForms.ObservationOneActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.LoginActivity"
|
android:name=".activities.LoginActivity"
|
||||||
android:screenOrientation="portrait"
|
android:exported="true"
|
||||||
android:exported="true">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
@ -41,10 +57,18 @@
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.DashboardActivity"
|
android:name=".activities.DashboardActivity"
|
||||||
android:screenOrientation="portrait"
|
android:exported="true"
|
||||||
android:exported="true">
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
</activity>
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="com.utopiaindustries.hseobservationsapp"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.activities.ObservationForms;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.AutoCompleteTextView;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.ObservationClassAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.ObservationSubClassAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.ShiftAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class ObservationOneActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private AutoCompleteTextView observationTextview, observationSubTextview;
|
||||||
|
|
||||||
|
private ObservationClassAdapter observationClassAdapter;
|
||||||
|
private ObservationSubClassAdapter observationSubClassAdapter;
|
||||||
|
private ArrayList<Shift> obClassArrayList = new ArrayList<>();
|
||||||
|
|
||||||
|
private ArrayList<Shift> obSubClassArrayList = new ArrayList<>();
|
||||||
|
|
||||||
|
private Button btnNext;
|
||||||
|
ImageView imgBack;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_observation_one);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
initializeLayout();
|
||||||
|
|
||||||
|
imgBack.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(ObservationOneActivity.this, ObservationTwoActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
observationTextview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
// Perform action when shiftTextview item is clicked
|
||||||
|
Toast.makeText(ObservationOneActivity.this, "Item clicked: " + obClassArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
observationSubTextview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
// Perform action when shiftTextview item is clicked
|
||||||
|
Toast.makeText(ObservationOneActivity.this, "Item clicked: " + obSubClassArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeLayout() {
|
||||||
|
observationTextview = findViewById(R.id.observation_textview);
|
||||||
|
observationSubTextview = findViewById(R.id.observation_sub_textview);
|
||||||
|
btnNext = findViewById(R.id.btn_next);
|
||||||
|
imgBack = findViewById(R.id.img_back);
|
||||||
|
|
||||||
|
obClassArrayList.add(new Shift(1, "Unsafe Act"));
|
||||||
|
obClassArrayList.add(new Shift(2, "Unsafe Condition"));
|
||||||
|
obClassArrayList.add(new Shift(3, "Near Miss"));
|
||||||
|
|
||||||
|
observationClassAdapter = new ObservationClassAdapter(this, obClassArrayList);
|
||||||
|
observationTextview.setAdapter(observationClassAdapter);
|
||||||
|
|
||||||
|
//observation sub class items
|
||||||
|
//for Unsafe
|
||||||
|
//for condition
|
||||||
|
//never miss
|
||||||
|
observationSubClassAdapter = new ObservationSubClassAdapter(this, obSubClassArrayList);
|
||||||
|
observationSubTextview.setAdapter(observationSubClassAdapter);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.activities.ObservationForms;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
|
||||||
|
|
||||||
|
public class ObservationThreeActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
RadioGroup rg1;
|
||||||
|
ImageView imgBack;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_observation_three);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
initializeLayouts();
|
||||||
|
|
||||||
|
imgBack.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rg1.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
|
||||||
|
{
|
||||||
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
|
if (checkedId == R.id.rb_open) {
|
||||||
|
// do operations specific to this selection
|
||||||
|
// Toast.makeText(GeneralDetailActivity.this,"GPS Yes",Toast.LENGTH_SHORT).show();
|
||||||
|
//bool_gps = true;
|
||||||
|
} else if (checkedId == R.id.rb_closed) {
|
||||||
|
// do operations specific to this selection
|
||||||
|
// Toast.makeText(GeneralDetailActivity.this,"GPS No",Toast.LENGTH_SHORT).show();
|
||||||
|
//bool_gps = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeLayouts() {
|
||||||
|
|
||||||
|
rg1 = findViewById(R.id.rg1);
|
||||||
|
imgBack = findViewById(R.id.img_back);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,469 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.activities.ObservationForms;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Environment;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.AutoCompleteTextView;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.activities.DashboardActivity;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.activities.LoginActivity;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.DepartmentAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.ObservationClassAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.ObservationSubClassAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.RiskLevelAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Department;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import pub.devrel.easypermissions.AfterPermissionGranted;
|
||||||
|
import pub.devrel.easypermissions.AppSettingsDialog;
|
||||||
|
import pub.devrel.easypermissions.EasyPermissions;
|
||||||
|
|
||||||
|
public class ObservationTwoActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks{
|
||||||
|
|
||||||
|
private Button btnNext;
|
||||||
|
ImageView imgBack;
|
||||||
|
ImageView imgBefore, beforeCrossButton, imgAfter, afterCrossButton;
|
||||||
|
private AutoCompleteTextView departmentTextview, riskLevelTextview;
|
||||||
|
|
||||||
|
private DepartmentAdapter departmentAdapter;
|
||||||
|
private RiskLevelAdapter riskLevelAdapter;
|
||||||
|
|
||||||
|
private ArrayList<Shift> departmentArrayList = new ArrayList<>();
|
||||||
|
private ArrayList<Shift> riskLevelArrayList = new ArrayList<>();
|
||||||
|
|
||||||
|
private static final int CAMERA_REQUEST = 100;
|
||||||
|
private static final int GALLERY_REQUEST = 200;
|
||||||
|
|
||||||
|
String filePathBefore = "no_pic";
|
||||||
|
String filePathAfter = "no_pic";
|
||||||
|
|
||||||
|
// Activity Result Launcher for Gallery
|
||||||
|
private final ActivityResultLauncher<Intent> imagePickerLauncher =
|
||||||
|
registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||||
|
if (result.getResultCode() == RESULT_OK && result.getData() != null) {
|
||||||
|
Uri selectedImage = result.getData().getData();
|
||||||
|
|
||||||
|
Glide.with(this)
|
||||||
|
.load(selectedImage) // Glide will handle the decoding and placeholder
|
||||||
|
.placeholder(R.drawable.img_load)
|
||||||
|
.apply(new RequestOptions().centerCrop())
|
||||||
|
.into(imgBefore);
|
||||||
|
|
||||||
|
uriToByteArrayAsync(
|
||||||
|
this,
|
||||||
|
selectedImage,
|
||||||
|
200, // Target size in KB
|
||||||
|
compressedImage -> {
|
||||||
|
// Handle the compressed image here, e.g., display it
|
||||||
|
/*runOnUiThread(() -> {
|
||||||
|
itemModelList.get(selectedPosition).setImageUri(compressedImage);
|
||||||
|
List<byte[]> tempList = new ArrayList<>();
|
||||||
|
tempList.add(compressedImage);
|
||||||
|
itemModelList.get(selectedPosition).setImageArrayList(tempList);
|
||||||
|
adapter.notifyItemChanged(selectedPosition);
|
||||||
|
});*/
|
||||||
|
},
|
||||||
|
error -> {
|
||||||
|
// Handle any errors
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
Toast.makeText(this, "Error compressing image: " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (result.getResultCode() == RESULT_CANCELED) {
|
||||||
|
Toast.makeText(this, "Gallery Selection Cancelled!", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Toast.makeText(this, "Gallery Selection Cancelled!", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Activity Result Launcher for Camera
|
||||||
|
private final ActivityResultLauncher<Intent> cameraLauncher =
|
||||||
|
registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||||
|
|
||||||
|
if (result.getResultCode() == RESULT_OK) {
|
||||||
|
Uri contentUri = Uri.fromFile(new File((filePathBefore)));
|
||||||
|
|
||||||
|
Glide.with(this)
|
||||||
|
.load(contentUri) // Glide will handle the decoding and placeholder
|
||||||
|
.placeholder(R.drawable.img_load)
|
||||||
|
.apply(new RequestOptions().centerCrop())
|
||||||
|
.into(imgAfter);
|
||||||
|
|
||||||
|
uriToByteArrayAsync(
|
||||||
|
this,
|
||||||
|
contentUri,
|
||||||
|
200, // Target size in KB
|
||||||
|
compressedImage -> {
|
||||||
|
// Handle the compressed image here, e.g., display it
|
||||||
|
/*runOnUiThread(() -> {
|
||||||
|
itemModelList.get(selectedPosition).setImageUri(compressedImage);
|
||||||
|
List<byte[]> tempList = new ArrayList<>();
|
||||||
|
tempList.add(compressedImage);
|
||||||
|
itemModelList.get(selectedPosition).setImageArrayList(tempList);
|
||||||
|
adapter.notifyItemChanged(selectedPosition);
|
||||||
|
});*/
|
||||||
|
},
|
||||||
|
error -> {
|
||||||
|
// Handle any errors
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
Toast.makeText(this, "Error compressing image: " + error.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (result.getResultCode() == RESULT_CANCELED) {
|
||||||
|
Toast.makeText(this, "Camera capture failed!", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Toast.makeText(this, "Camera capture failed!", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_observation_two);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
initializeLayout();
|
||||||
|
|
||||||
|
imgBack.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(ObservationTwoActivity.this, ObservationThreeActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
imgBefore.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
alertForPictures(ObservationTwoActivity.this, "before");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
imgAfter.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
alertForPictures(ObservationTwoActivity.this, "after");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeCrossButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
afterCrossButton.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
departmentTextview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
riskLevelTextview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeLayout() {
|
||||||
|
|
||||||
|
btnNext = findViewById(R.id.btn_next);
|
||||||
|
imgBack = findViewById(R.id.img_back);
|
||||||
|
|
||||||
|
imgBefore = findViewById(R.id.img_before);
|
||||||
|
imgAfter = findViewById(R.id.img_after);
|
||||||
|
|
||||||
|
beforeCrossButton = findViewById(R.id.before_cross_button);
|
||||||
|
afterCrossButton = findViewById(R.id.after_cross_button);
|
||||||
|
|
||||||
|
departmentTextview = findViewById(R.id.department_textview);
|
||||||
|
riskLevelTextview = findViewById(R.id.risk_textview);
|
||||||
|
|
||||||
|
departmentAdapter = new DepartmentAdapter(this, departmentArrayList);
|
||||||
|
departmentTextview.setAdapter(departmentAdapter);
|
||||||
|
|
||||||
|
riskLevelAdapter = new RiskLevelAdapter(this, riskLevelArrayList);
|
||||||
|
riskLevelTextview.setAdapter(riskLevelAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void alertForPictures(Context con, String imageType) {
|
||||||
|
ViewGroup viewGroup = findViewById(android.R.id.content);
|
||||||
|
|
||||||
|
TextView dialogCameraBtn, dialogGalleryBtn;
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(con);
|
||||||
|
View view1 = LayoutInflater.from(con).inflate(R.layout.custom_layout_for_image, viewGroup, false);
|
||||||
|
builder.setCancelable(false);
|
||||||
|
builder.setView(view1);
|
||||||
|
|
||||||
|
dialogCameraBtn = view1.findViewById(R.id.dialog_camera_btn);
|
||||||
|
dialogGalleryBtn = view1.findViewById(R.id.dialog_gallery_btn);
|
||||||
|
|
||||||
|
AlertDialog alertDialog = builder.create();
|
||||||
|
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
dialogCameraBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
alertDialog.dismiss();
|
||||||
|
openCamera(imageType);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogGalleryBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
alertDialog.dismiss();
|
||||||
|
openGallery(imageType);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
alertDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterPermissionGranted(CAMERA_REQUEST)
|
||||||
|
public void openCamera(String imgType) {
|
||||||
|
if (hasCameraPermission()) {
|
||||||
|
try {
|
||||||
|
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
File photoFile = null;
|
||||||
|
try {
|
||||||
|
photoFile = createImageFile(imgType);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
// Error occurred while creating the File
|
||||||
|
}
|
||||||
|
|
||||||
|
if (photoFile != null) {
|
||||||
|
Uri photoURI = FileProvider.getUriForFile(this,
|
||||||
|
"com.utopiaindustries.hseobservationsapp",
|
||||||
|
photoFile);
|
||||||
|
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
|
||||||
|
//startActivityForResult(takePictureIntent, CAMERA_REQUEST);
|
||||||
|
cameraLauncher.launch(takePictureIntent);
|
||||||
|
}
|
||||||
|
} catch (ActivityNotFoundException e) {
|
||||||
|
Toast.makeText(this, "Camera app not found", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Ask for one permission
|
||||||
|
String[] perms = {};
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
perms = new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.CAMERA};
|
||||||
|
} else {
|
||||||
|
perms = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA};
|
||||||
|
}
|
||||||
|
|
||||||
|
EasyPermissions.requestPermissions(this, getString(R.string.rationale_camera), CAMERA_REQUEST, perms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterPermissionGranted(GALLERY_REQUEST)
|
||||||
|
public void openGallery(String imgType) {
|
||||||
|
if (hasGalleryPermission()) {
|
||||||
|
// Have permission, do the thing!
|
||||||
|
Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
|
// Start the Intent
|
||||||
|
//startActivityForResult(galleryIntent, GALLERY_REQUEST);
|
||||||
|
imagePickerLauncher.launch(galleryIntent);
|
||||||
|
} else {
|
||||||
|
// Ask for one permission
|
||||||
|
String[] perms = {};
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
perms = new String[]{Manifest.permission.READ_MEDIA_IMAGES};
|
||||||
|
} else {
|
||||||
|
perms = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
|
||||||
|
|
||||||
|
}
|
||||||
|
EasyPermissions.requestPermissions(this, getString(R.string.rationale_gallery), GALLERY_REQUEST, perms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasGalleryPermission() {
|
||||||
|
String[] perms = {};
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
perms = new String[]{Manifest.permission.READ_MEDIA_IMAGES};
|
||||||
|
} else {
|
||||||
|
perms = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
|
||||||
|
}
|
||||||
|
|
||||||
|
return EasyPermissions.hasPermissions(this, perms);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasCameraPermission() {
|
||||||
|
String[] perms = {};
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
//Log.e("TIRAMISU: ","***");
|
||||||
|
perms = new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.CAMERA};
|
||||||
|
} else {
|
||||||
|
//Log.e("Not-TIRAMISU: ","***");
|
||||||
|
perms = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Log.e("perms: ",""+perms);
|
||||||
|
return EasyPermissions.hasPermissions(this, perms);
|
||||||
|
}
|
||||||
|
|
||||||
|
private File createImageFile(String imgType) throws IOException {
|
||||||
|
// Create an image file name
|
||||||
|
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
|
||||||
|
String imageFileName = "JPEG_" + timeStamp + "_";
|
||||||
|
File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
|
||||||
|
File image = File.createTempFile(
|
||||||
|
imageFileName, /* prefix */
|
||||||
|
".jpg", /* suffix */
|
||||||
|
storageDir /* directory */
|
||||||
|
);
|
||||||
|
|
||||||
|
if (imgType.equals("before")) {
|
||||||
|
filePathBefore = image.getAbsolutePath();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
filePathAfter = image.getAbsolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void uriToByteArrayAsync(
|
||||||
|
Context context,
|
||||||
|
Uri uri,
|
||||||
|
int targetSizeInKB,
|
||||||
|
Consumer<byte[]> onSuccess,
|
||||||
|
Consumer<Exception> onError
|
||||||
|
) {
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
int targetSizeInBytes = targetSizeInKB * 1024;
|
||||||
|
|
||||||
|
// Load the image as a Bitmap without scaling
|
||||||
|
Bitmap bitmap;
|
||||||
|
try (InputStream inputStream = context.getContentResolver().openInputStream(uri)) {
|
||||||
|
bitmap = BitmapFactory.decodeStream(inputStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bitmap == null) {
|
||||||
|
throw new IOException("Failed to decode image from URI.");
|
||||||
|
}
|
||||||
|
|
||||||
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||||
|
int minQuality = 10;
|
||||||
|
int maxQuality = 100;
|
||||||
|
int quality = maxQuality;
|
||||||
|
|
||||||
|
// Binary search for the best quality that meets the target size
|
||||||
|
while (minQuality <= maxQuality) {
|
||||||
|
byteArrayOutputStream.reset();
|
||||||
|
bitmap.compress(Bitmap.CompressFormat.JPEG, quality, byteArrayOutputStream);
|
||||||
|
|
||||||
|
int byteSize = byteArrayOutputStream.size();
|
||||||
|
if (byteSize > targetSizeInBytes) {
|
||||||
|
maxQuality = quality - 1;
|
||||||
|
} else {
|
||||||
|
minQuality = quality + 1;
|
||||||
|
}
|
||||||
|
quality = (minQuality + maxQuality) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
onSuccess.accept(byteArrayOutputStream.toByteArray());
|
||||||
|
} catch (IOException e) {
|
||||||
|
onError.accept(e);
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
|
||||||
|
if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
|
||||||
|
new AppSettingsDialog.Builder(this).build().show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
|
|
||||||
|
// EasyPermissions handles the request result.
|
||||||
|
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.activities.PermitToWorkForms;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.activities.ObservationForms.ObservationThreeActivity;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.activities.ObservationForms.ObservationTwoActivity;
|
||||||
|
|
||||||
|
public class PermitOneActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private Button btnNext;
|
||||||
|
ImageView imgBack;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_permit_one);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
initializeLayout();
|
||||||
|
|
||||||
|
imgBack.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
/*Intent intent = new Intent(PermitOneActivity.this, ObservationThreeActivity.class);
|
||||||
|
startActivity(intent);*/
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeLayout() {
|
||||||
|
|
||||||
|
btnNext = findViewById(R.id.btn_next);
|
||||||
|
imgBack = findViewById(R.id.img_back);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.activities.PermitToWorkForms;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
|
||||||
|
public class PermitTwoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_permit_two);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.adapters;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DepartmentAdapter extends ArrayAdapter<Shift> {
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final List<Shift> items;
|
||||||
|
|
||||||
|
public DepartmentAdapter(Context context, List<Shift> items) {
|
||||||
|
super(context, 0, items);
|
||||||
|
this.context = context;
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(context).inflate(R.layout.list_items, parent, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shift item = items.get(position);
|
||||||
|
|
||||||
|
TextView titleTextView = convertView.findViewById(R.id.item_text);
|
||||||
|
|
||||||
|
titleTextView.setText(item.getTitle());
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.adapters;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.FormType;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.LocationSite;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class FormTypeAdapter extends ArrayAdapter<FormType> {
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final List<FormType> items;
|
||||||
|
|
||||||
|
public FormTypeAdapter(Context context, List<FormType> items) {
|
||||||
|
super(context, 0, items);
|
||||||
|
this.context = context;
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(context).inflate(R.layout.list_items, parent, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
FormType item = items.get(position);
|
||||||
|
|
||||||
|
TextView titleTextView = convertView.findViewById(R.id.item_text);
|
||||||
|
|
||||||
|
titleTextView.setText(item.getTitle());
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.adapters;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ObservationClassAdapter extends ArrayAdapter<Shift> {
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final List<Shift> items;
|
||||||
|
|
||||||
|
public ObservationClassAdapter(Context context, List<Shift> items) {
|
||||||
|
super(context, 0, items);
|
||||||
|
this.context = context;
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(context).inflate(R.layout.list_items, parent, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shift item = items.get(position);
|
||||||
|
|
||||||
|
TextView titleTextView = convertView.findViewById(R.id.item_text);
|
||||||
|
|
||||||
|
titleTextView.setText(item.getTitle());
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.adapters;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ObservationSubClassAdapter extends ArrayAdapter<Shift> {
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final List<Shift> items;
|
||||||
|
|
||||||
|
public ObservationSubClassAdapter(Context context, List<Shift> items) {
|
||||||
|
super(context, 0, items);
|
||||||
|
this.context = context;
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(context).inflate(R.layout.list_items, parent, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shift item = items.get(position);
|
||||||
|
|
||||||
|
TextView titleTextView = convertView.findViewById(R.id.item_text);
|
||||||
|
|
||||||
|
titleTextView.setText(item.getTitle());
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.adapters;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RiskLevelAdapter extends ArrayAdapter<Shift> {
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final List<Shift> items;
|
||||||
|
|
||||||
|
public RiskLevelAdapter(Context context, List<Shift> items) {
|
||||||
|
super(context, 0, items);
|
||||||
|
this.context = context;
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(context).inflate(R.layout.list_items, parent, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shift item = items.get(position);
|
||||||
|
|
||||||
|
TextView titleTextView = convertView.findViewById(R.id.item_text);
|
||||||
|
|
||||||
|
titleTextView.setText(item.getTitle());
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.utopiaindustries.hseobservationsapp.adapters;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.LocationSite;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ShiftAdapter extends ArrayAdapter<Shift> {
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final List<Shift> items;
|
||||||
|
|
||||||
|
public ShiftAdapter(Context context, List<Shift> items) {
|
||||||
|
super(context, 0, items);
|
||||||
|
this.context = context;
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(context).inflate(R.layout.list_items, parent, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shift item = items.get(position);
|
||||||
|
|
||||||
|
TextView titleTextView = convertView.findViewById(R.id.item_text);
|
||||||
|
|
||||||
|
titleTextView.setText(item.getTitle());
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,9 +19,16 @@ public class DraftFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
Bundle savedInstanceState) {
|
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_draft, container, false);
|
|
||||||
|
View view = inflater.inflate(R.layout.fragment_draft , container, false );
|
||||||
|
|
||||||
|
initializeLayout(view);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeLayout(View view) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
package com.utopiaindustries.hseobservationsapp.fragments;
|
package com.utopiaindustries.hseobservationsapp.fragments;
|
||||||
|
|
||||||
|
import android.app.DatePickerDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
@ -8,20 +11,140 @@ import androidx.fragment.app.Fragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.AutoCompleteTextView;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.DatePicker;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.utopiaindustries.hseobservationsapp.R;
|
import com.utopiaindustries.hseobservationsapp.R;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.activities.ObservationForms.ObservationOneActivity;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.FormTypeAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.adapters.ShiftAdapter;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.FormType;
|
||||||
|
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class HomeFragment extends Fragment {
|
public class HomeFragment extends Fragment {
|
||||||
|
|
||||||
|
private int year, month, day;
|
||||||
|
private Calendar calendar;
|
||||||
|
private TextView txtUserName, txtDate;
|
||||||
|
private ImageView imgCalendar;
|
||||||
|
private Button btnNext;
|
||||||
|
private AutoCompleteTextView shiftTextview, formTextview;
|
||||||
|
|
||||||
|
private ShiftAdapter shiftAdapter;
|
||||||
|
private ArrayList<Shift> shiftArrayList = new ArrayList<>();
|
||||||
|
|
||||||
|
private FormTypeAdapter formTypeAdapter;
|
||||||
|
private ArrayList<FormType> formArrayList = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
Bundle savedInstanceState) {
|
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_home, container, false);
|
View view = inflater.inflate(R.layout.fragment_home , container, false );
|
||||||
|
|
||||||
|
initializeLayout(view);
|
||||||
|
|
||||||
|
txtUserName.setText("Supervisor Name");
|
||||||
|
|
||||||
|
imgCalendar.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
showDatePickerDialog(getActivity());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
shiftTextview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
// Perform action when shiftTextview item is clicked
|
||||||
|
Toast.makeText(getActivity(), "Item clicked: " + shiftArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
formTextview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
// Perform action when formTextview item is clicked
|
||||||
|
Toast.makeText(getActivity(), "Item clicked: " + formArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(getActivity(), ObservationOneActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeLayout(View view) {
|
||||||
|
calendar = Calendar.getInstance();
|
||||||
|
year = calendar.get(Calendar.YEAR);
|
||||||
|
month = calendar.get(Calendar.MONTH);
|
||||||
|
day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||||
|
txtUserName = view.findViewById(R.id.txt_user_name);
|
||||||
|
txtDate = view.findViewById(R.id.txt_date);
|
||||||
|
imgCalendar = view.findViewById(R.id.img_calendar);
|
||||||
|
btnNext = view.findViewById(R.id.btn_next);
|
||||||
|
|
||||||
|
shiftTextview = view.findViewById(R.id.shift_textview);
|
||||||
|
formTextview = view.findViewById(R.id.form_textview);
|
||||||
|
|
||||||
|
shiftArrayList.add(new Shift(1, "General Shift(08:00AM - 05:00PM)"));
|
||||||
|
shiftArrayList.add(new Shift(2, "Evening Shift(12:00PM - 09:00PM)"));
|
||||||
|
shiftArrayList.add(new Shift(3, "Night Shift(09:00PM - 06:00AM)"));
|
||||||
|
|
||||||
|
shiftAdapter = new ShiftAdapter(getActivity(), shiftArrayList);
|
||||||
|
shiftTextview.setAdapter(shiftAdapter);
|
||||||
|
|
||||||
|
formArrayList.add(new FormType(1, "Observation Form"));
|
||||||
|
formArrayList.add(new FormType(2, "Permit To Work Form"));
|
||||||
|
formArrayList.add(new FormType(3, "HSE Training Form"));
|
||||||
|
formArrayList.add(new FormType(4, "Injury Record Form"));
|
||||||
|
formArrayList.add(new FormType(5, "Weekly Activities Form"));
|
||||||
|
formArrayList.add(new FormType(6, "Progressive Activities Form"));
|
||||||
|
formArrayList.add(new FormType(7, "Other HSE Form"));
|
||||||
|
|
||||||
|
formTypeAdapter = new FormTypeAdapter(getActivity(), formArrayList);
|
||||||
|
formTextview.setAdapter(formTypeAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showDatePickerDialog(Context context) {
|
||||||
|
DatePickerDialog datePickerDialog = new DatePickerDialog(
|
||||||
|
context,
|
||||||
|
new DatePickerDialog.OnDateSetListener() {
|
||||||
|
@Override
|
||||||
|
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
|
||||||
|
// Month is 0-indexed, so we add 1
|
||||||
|
Calendar selectedCalendar = Calendar.getInstance();
|
||||||
|
selectedCalendar.set(year, monthOfYear, dayOfMonth);
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy", Locale.getDefault());
|
||||||
|
String selectedDate = dateFormat.format(selectedCalendar.getTime());
|
||||||
|
txtDate.setText(selectedDate);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
year, month, day
|
||||||
|
);
|
||||||
|
datePickerDialog.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
package com.utopiaindustries.hseobservationsapp.models;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class FormType {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
@Expose
|
||||||
|
private Integer id;
|
||||||
|
@SerializedName("title")
|
||||||
|
@Expose
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
public FormType(Integer id, String title) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
package com.utopiaindustries.hseobservationsapp.models;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class Shift {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
@Expose
|
||||||
|
private Integer id;
|
||||||
|
@SerializedName("title")
|
||||||
|
@Expose
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
public Shift(Integer id, String title) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||||
|
<solid android:color="#80000000"/> <!-- Semi-transparent background -->
|
||||||
|
<size android:width="40dp" android:height="40dp"/>
|
||||||
|
</shape>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#808080" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM14,13v4h-4v-4H7l5,-5 5,5h-3z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#808080" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19,4h-1V2h-2v2H8V2H6v2H5C3.89,4 3.01,4.9 3.01,6L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V6C21,4.9 20.1,4 19,4zM19,20H5V10h14V20zM9,14H7v-2h2V14zM13,14h-2v-2h2V14zM17,14h-2v-2h2V14zM9,18H7v-2h2V18zM13,18h-2v-2h2V18zM17,18h-2v-2h2V18z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#808080" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -52,12 +52,8 @@
|
||||||
app:srcCompat="@drawable/ic_logout" />
|
app:srcCompat="@drawable/ic_logout" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="409dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="665dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginStart="1dp"
|
|
||||||
android:layout_marginTop="1dp"
|
|
||||||
android:layout_marginEnd="1dp"
|
|
||||||
android:layout_marginBottom="1dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -67,10 +63,10 @@
|
||||||
android:id="@+id/tab_layout"
|
android:id="@+id/tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:tabMaxWidth="0dp"
|
android:layout_alignParentBottom="true"
|
||||||
app:tabGravity="fill"
|
app:tabGravity="fill"
|
||||||
app:tabMode="fixed"
|
app:tabMaxWidth="0dp"
|
||||||
android:layout_alignParentBottom="true" />
|
app:tabMode="fixed" />
|
||||||
|
|
||||||
<com.utopiaindustries.hseobservationsapp.utils.NonSwipeableViewPager
|
<com.utopiaindustries.hseobservationsapp.utils.NonSwipeableViewPager
|
||||||
android:id="@+id/viewpager"
|
android:id="@+id/viewpager"
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activities.ObservationForms.ObservationOneActivity">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Form Type"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_15sdp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/toolbar"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar"
|
||||||
|
app:srcCompat="@drawable/arrow_back" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="1dp"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:layout_marginEnd="1dp"
|
||||||
|
android:layout_marginBottom="1dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/observation_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Observation Class "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/observation_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/observation_heading"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_observation_class"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/observation_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/observation_sub_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/observation_input"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Observation Sub Class "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/observation_sub_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/observation_sub_heading"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_observation_sub_class"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/observation_sub_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Next"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,164 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activities.ObservationForms.ObservationThreeActivity">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Form Type Third"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_15sdp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/toolbar"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar"
|
||||||
|
app:srcCompat="@drawable/arrow_back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/heading_observation_status"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Observation Status"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/rg1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="left"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/heading_observation_status"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_open"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:buttonTint="@color/theme_color"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Open"
|
||||||
|
android:textSize="@dimen/_13sdp" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_closed"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:buttonTint="@color/theme_color"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Closed"
|
||||||
|
android:textSize="@dimen/_13sdp" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/heading_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Description"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/rg1" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:background="@drawable/et_border"
|
||||||
|
android:gravity="top|start"
|
||||||
|
android:hint="Write Description Here"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="5"
|
||||||
|
android:maxLines="5"
|
||||||
|
android:minLines="5"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:textSize="@dimen/_12sdp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/heading_description"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="@color/black"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/linearLayout" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="2"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_submit"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Submit"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/heading_description" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="2dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_draft"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Draft"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,216 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activities.ObservationForms.ObservationTwoActivity">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Form Type Second"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_15sdp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/toolbar"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar"
|
||||||
|
app:srcCompat="@drawable/arrow_back" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:id="@+id/scrollView2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/btn_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/observation_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Department Name "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/department_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/observation_heading"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_department"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/department_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/before_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/department_input"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Before Picture "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/before_frame"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="150dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_below="@+id/before_heading">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_before"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/icon_image" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/before_cross_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
|
android:background="@drawable/circle_background"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/after_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/before_frame"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="After Picture "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/after_frame"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="150dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_below="@+id/after_heading">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_after"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/icon_image" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/after_cross_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
|
android:background="@drawable/circle_background"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:src="@drawable/ic_close" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/risk_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/after_frame"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Risk Level "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/risk_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/risk_heading"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_risk"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/risk_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Next"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
tools:layout_editor_absoluteX="5dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,227 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activities.PermitToWorkForms.PermitOneActivity">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Permit To Work First"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_15sdp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/toolbar"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar"
|
||||||
|
app:srcCompat="@drawable/arrow_back" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:id="@+id/scrollView2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/btn_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Location "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/location_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_location"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/location_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Sub Location "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/sub_location_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_sub_location"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/sub_location_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="PTW Type "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/ptw_type_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_ptw_type"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/ptw_type_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="PTW Sub Type "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/ptw_sub_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_ptw_sub_type"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/ptw_sub_type_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/observation_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Working Team "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/working_team_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_working_team"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/working_team_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Next"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
tools:layout_editor_absoluteX="5dp" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,78 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activities.PermitToWorkForms.PermitTwoActivity">
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Permit To Work Second"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_15sdp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/toolbar"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/toolbar"
|
||||||
|
app:srcCompat="@drawable/arrow_back" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:id="@+id/scrollView2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/btn_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/observation_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Working Party "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Next"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
tools:layout_editor_absoluteX="5dp" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@drawable/rounded_white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/message"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
android:text="Select Image from"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_15sdp"
|
||||||
|
android:textStyle="normal" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:layout_marginTop="7dp"
|
||||||
|
android:background="@color/white" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dialog_camera_btn"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.495"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:background="@drawable/custom_button"
|
||||||
|
android:text="Camera"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_14sdp"
|
||||||
|
android:textStyle="normal" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.05"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingBottom="15dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dialog_gallery_btn"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.495"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:text="Gallery"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:background="@drawable/custom_button"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_14sdp"
|
||||||
|
android:textStyle="normal" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -7,18 +8,143 @@
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/draft_text"
|
android:id="@+id/txt_user_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:gravity="left"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:textStyle="bold"
|
android:text="HSE Supervisor"
|
||||||
android:textSize="@dimen/_13sdp"
|
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:text="Home"
|
android:textSize="@dimen/_13sdp"
|
||||||
android:textAlignment="center" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/txt_user_name"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Date "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/date_heading"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:hint="MM-dd-yyyy"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_calendar"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_below="@+id/date_heading"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:src="@drawable/icon_calendar" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/txt_date"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/shift_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Shift Name "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/shift_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/shift_heading"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_shift"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/shift_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/form_heading"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/shift_input"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Form Type "
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/form_input"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/form_heading"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:hint="@string/select_form"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/form_textview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="@drawable/rounded_btn_login"
|
||||||
|
android:text="Next"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/item_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/dropdown_item_bg"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/_13sdp" />
|
|
@ -2,4 +2,22 @@
|
||||||
<string name="app_name">HSE App</string>
|
<string name="app_name">HSE App</string>
|
||||||
<!-- TODO: Remove or change this placeholder text -->
|
<!-- TODO: Remove or change this placeholder text -->
|
||||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||||
|
|
||||||
|
<string name="select_shift">Select Shift</string>
|
||||||
|
<string name="select_form">Select Form</string>
|
||||||
|
|
||||||
|
<string name="select_observation_class">Select Observation Class</string>
|
||||||
|
<string name="select_observation_sub_class">Select Observation Sub Class</string>
|
||||||
|
|
||||||
|
<string name="select_department">Select Department</string>
|
||||||
|
|
||||||
|
<string name="select_risk">Select Risk Level</string>
|
||||||
|
<string name="select_location">Select Location</string>
|
||||||
|
<string name="select_sub_location">Select Sub Location</string>
|
||||||
|
<string name="select_ptw_type">Select PTW Type</string>
|
||||||
|
<string name="select_ptw_sub_type">Select PTW Sub Type</string>
|
||||||
|
<string name="select_working_team">Select Working Team</string>
|
||||||
|
|
||||||
|
<string name="rationale_camera">This app require permission for camera.</string>
|
||||||
|
<string name="rationale_gallery">This app require permission for accessing gallery.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue