Permit to work Module Screens design
parent
8fdf939558
commit
6dc0aa4617
|
@ -32,63 +32,10 @@
|
|||
android:theme="@style/Theme.HSEObservationsApp"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".activities.OtherHSEActivityForms.OtherHseActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:name=".activities.ObservationForms.ObservationNearMissActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.ProgressiveActivityForms.ProgressiveActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.WeeklyActivityForms.WeeklyFormOne"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormFour"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormThree"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormTwo"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormOne"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.HSETrainingForms.HseTwoActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.HSETrainingForms.HseOneActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.PermitToWorkForms.PermitTwoActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.PermitToWorkForms.PermitOneActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.ObservationForms.ObservationThreeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.ObservationForms.ObservationTwoActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.ObservationForms.ObservationOneActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activities.LoginActivity"
|
||||
android:name=".activities.SplashActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
|
@ -97,6 +44,66 @@
|
|||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activities.OtherHSEActivityForms.OtherHseActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.ProgressiveActivityForms.ProgressiveActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.WeeklyActivityForms.WeeklyFormOne"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormFour"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormThree"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormTwo"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.InjuryRecordForms.InjuryFormOne"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.HSETrainingForms.HseTwoActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.HSETrainingForms.HseOneActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.PermitToWorkForms.PermitTwoActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.PermitToWorkForms.PermitOneActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.ObservationForms.ObservationThreeActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.ObservationForms.ObservationTwoActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.ObservationForms.ObservationOneActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activities.LoginActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"></activity>
|
||||
<activity
|
||||
android:name=".activities.DashboardActivity"
|
||||
android:exported="true"
|
||||
|
|
|
@ -68,9 +68,6 @@ public class LoginActivity extends AppCompatActivity {
|
|||
btnLogin = findViewById(R.id.btn_login);
|
||||
apiService = ApiServiceFactory.getApiService();
|
||||
|
||||
//tfEmail.setText("adnan.niaz");
|
||||
//tfPassword.setText("Utopia01");
|
||||
|
||||
loginViewModel = new ViewModelProvider(this).get(LoginViewModel.class);
|
||||
|
||||
loginViewModel.getLoadingState().observe(this, isLoading -> {
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
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.EditText;
|
||||
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.models.Shift;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ObservationNearMissActivity extends AppCompatActivity {
|
||||
|
||||
private AutoCompleteTextView observationTextview;
|
||||
private ObservationClassAdapter observationClassAdapter;
|
||||
private ArrayList<Shift> obClassArrayList = new ArrayList<>();
|
||||
|
||||
private Button btnNext;
|
||||
ImageView imgBack;
|
||||
|
||||
String observationClass = "";
|
||||
EditText etDescription;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_observation_near_miss);
|
||||
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) {
|
||||
if (isValidate()) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
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(ObservationNearMissActivity.this, "Item clicked: " + obClassArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void initializeLayout() {
|
||||
observationTextview = findViewById(R.id.observation_near_textview);
|
||||
btnNext = findViewById(R.id.btn_next);
|
||||
imgBack = findViewById(R.id.img_back);
|
||||
etDescription = findViewById(R.id.et_description);
|
||||
|
||||
obClassArrayList.add(new Shift(1, "Option 1"));
|
||||
obClassArrayList.add(new Shift(2, "Option 2"));
|
||||
obClassArrayList.add(new Shift(3, "Option 3"));
|
||||
|
||||
observationClassAdapter = new ObservationClassAdapter(this, obClassArrayList);
|
||||
observationTextview.setAdapter(observationClassAdapter);
|
||||
|
||||
}
|
||||
|
||||
public boolean isValidate() {
|
||||
boolean returnValue = true;
|
||||
String message = "";
|
||||
|
||||
if (etDescription.getText().toString().isEmpty()) {
|
||||
message = "Please enter description.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (observationClass.isEmpty()) {
|
||||
message = "Please select Location.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (!returnValue) {
|
||||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
|
@ -36,6 +36,8 @@ public class ObservationOneActivity extends AppCompatActivity {
|
|||
private Button btnNext;
|
||||
ImageView imgBack;
|
||||
|
||||
String observationClass = "", observationSubClass = "";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -59,17 +61,26 @@ public class ObservationOneActivity extends AppCompatActivity {
|
|||
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// if (isValidate()) {
|
||||
if (observationClass.equalsIgnoreCase("Near Miss")) {
|
||||
Intent intent = new Intent(ObservationOneActivity.this, ObservationNearMissActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
else {
|
||||
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();
|
||||
|
||||
//Toast.makeText(ObservationOneActivity.this, "Item clicked: " + obClassArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||
observationClass = obClassArrayList.get(position).getTitle();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -77,7 +88,7 @@ public class ObservationOneActivity extends AppCompatActivity {
|
|||
@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();
|
||||
//Toast.makeText(ObservationOneActivity.this, "Item clicked: " + obSubClassArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -103,4 +114,25 @@ public class ObservationOneActivity extends AppCompatActivity {
|
|||
observationSubClassAdapter = new ObservationSubClassAdapter(this, obSubClassArrayList);
|
||||
observationSubTextview.setAdapter(observationSubClassAdapter);
|
||||
}
|
||||
|
||||
public boolean isValidate() {
|
||||
boolean returnValue = true;
|
||||
String message = "";
|
||||
|
||||
if (observationSubClass.isEmpty()) {
|
||||
message = "Please select observation sub class.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (observationClass.isEmpty()) {
|
||||
message = "Please select observation class.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (!returnValue) {
|
||||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
package com.utopiaindustries.hseobservationsapp.activities.ObservationForms;
|
||||
|
||||
import static com.utopiaindustries.hseobservationsapp.R.*;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
@ -60,7 +63,8 @@ import pub.devrel.easypermissions.AfterPermissionGranted;
|
|||
import pub.devrel.easypermissions.AppSettingsDialog;
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
public class ObservationTwoActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks{
|
||||
public class ObservationTwoActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks,
|
||||
EasyPermissions.RationaleCallbacks{
|
||||
|
||||
private Button btnNext;
|
||||
ImageView imgBack;
|
||||
|
@ -79,31 +83,29 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
String filePathBefore = "no_pic";
|
||||
String filePathAfter = "no_pic";
|
||||
|
||||
String imgType = "";
|
||||
|
||||
// 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);
|
||||
if (imgType.equalsIgnoreCase("before")) {
|
||||
|
||||
uriToByteArrayAsync(
|
||||
this,
|
||||
selectedImage,
|
||||
200, // Target size in KB
|
||||
100, // 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);
|
||||
});*/
|
||||
runOnUiThread(() -> {
|
||||
Glide.with(this)
|
||||
.load(compressedImage) // Glide will handle the decoding and placeholder
|
||||
.placeholder(R.drawable.img_load)
|
||||
.apply(new RequestOptions().centerCrop())
|
||||
.into(imgBefore);
|
||||
});
|
||||
},
|
||||
error -> {
|
||||
// Handle any errors
|
||||
|
@ -112,6 +114,31 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
});
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
else {
|
||||
uriToByteArrayAsync(
|
||||
this,
|
||||
selectedImage,
|
||||
100, // Target size in KB
|
||||
compressedImage -> {
|
||||
// Handle the compressed image here, e.g., display it
|
||||
runOnUiThread(() -> {
|
||||
Glide.with(this)
|
||||
.load(compressedImage) // Glide will handle the decoding and placeholder
|
||||
.placeholder(R.drawable.img_load)
|
||||
.apply(new RequestOptions().centerCrop())
|
||||
.into(imgAfter);
|
||||
});
|
||||
},
|
||||
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();
|
||||
|
@ -126,27 +153,23 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
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);
|
||||
if (imgType.equalsIgnoreCase("before")) {
|
||||
Uri contentUri = Uri.fromFile(new File((filePathBefore)));
|
||||
|
||||
uriToByteArrayAsync(
|
||||
this,
|
||||
contentUri,
|
||||
200, // Target size in KB
|
||||
100, // 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);
|
||||
});*/
|
||||
runOnUiThread(() -> {
|
||||
Glide.with(this)
|
||||
.load(contentUri) // Glide will handle the decoding and placeholder
|
||||
.placeholder(R.drawable.img_load)
|
||||
.apply(new RequestOptions().centerCrop())
|
||||
.into(imgBefore);
|
||||
});
|
||||
},
|
||||
error -> {
|
||||
// Handle any errors
|
||||
|
@ -156,6 +179,32 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
}
|
||||
);
|
||||
}
|
||||
else {
|
||||
Uri contentUri = Uri.fromFile(new File((filePathAfter)));
|
||||
|
||||
uriToByteArrayAsync(
|
||||
this,
|
||||
contentUri,
|
||||
100, // Target size in KB
|
||||
compressedImage -> {
|
||||
// Handle the compressed image here, e.g., display it
|
||||
runOnUiThread(() -> {
|
||||
Glide.with(this)
|
||||
.load(contentUri) // Glide will handle the decoding and placeholder
|
||||
.placeholder(R.drawable.img_load)
|
||||
.apply(new RequestOptions().centerCrop())
|
||||
.into(imgAfter);
|
||||
});
|
||||
},
|
||||
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();
|
||||
}
|
||||
|
@ -195,28 +244,30 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
imgBefore.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
alertForPictures(ObservationTwoActivity.this, "before");
|
||||
imgType = "before";
|
||||
alertForPictures(ObservationTwoActivity.this);
|
||||
}
|
||||
});
|
||||
|
||||
imgAfter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
alertForPictures(ObservationTwoActivity.this, "after");
|
||||
imgType = "after";
|
||||
alertForPictures(ObservationTwoActivity.this);
|
||||
}
|
||||
});
|
||||
|
||||
beforeCrossButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
imgBefore.setImageResource(R.drawable.icon_image);
|
||||
}
|
||||
});
|
||||
|
||||
afterCrossButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
imgAfter.setImageResource(R.drawable.icon_image);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -256,7 +307,8 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
riskLevelTextview.setAdapter(riskLevelAdapter);
|
||||
}
|
||||
|
||||
public void alertForPictures(Context con, String imageType) {
|
||||
@SuppressLint("MissingInflatedId")
|
||||
public void alertForPictures(Context con) {
|
||||
ViewGroup viewGroup = findViewById(android.R.id.content);
|
||||
|
||||
TextView dialogCameraBtn, dialogGalleryBtn;
|
||||
|
@ -277,7 +329,7 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
public void onClick(View view) {
|
||||
|
||||
alertDialog.dismiss();
|
||||
openCamera(imageType);
|
||||
openCamera();
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -287,7 +339,7 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
public void onClick(View view) {
|
||||
|
||||
alertDialog.dismiss();
|
||||
openGallery(imageType);
|
||||
openGallery();
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -296,7 +348,7 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
}
|
||||
|
||||
@AfterPermissionGranted(CAMERA_REQUEST)
|
||||
public void openCamera(String imgType) {
|
||||
public void openCamera() {
|
||||
if (hasCameraPermission()) {
|
||||
try {
|
||||
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
|
@ -332,7 +384,7 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
}
|
||||
|
||||
@AfterPermissionGranted(GALLERY_REQUEST)
|
||||
public void openGallery(String imgType) {
|
||||
public void openGallery() {
|
||||
if (hasGalleryPermission()) {
|
||||
// Have permission, do the thing!
|
||||
Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||
|
@ -460,10 +512,22 @@ public class ObservationTwoActivity extends AppCompatActivity implements EasyPer
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRationaleAccepted(int requestCode) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRationaleDenied(int requestCode) {
|
||||
|
||||
}
|
||||
}
|
|
@ -44,8 +44,8 @@ public class PermitOneActivity extends AppCompatActivity {
|
|||
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
/*Intent intent = new Intent(PermitOneActivity.this, ObservationThreeActivity.class);
|
||||
startActivity(intent);*/
|
||||
Intent intent = new Intent(PermitOneActivity.this, PermitTwoActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.os.Environment;
|
|||
import android.provider.MediaStore;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
|
@ -25,10 +26,11 @@ import androidx.core.content.FileProvider;
|
|||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.utopiaindustries.hseobservationsapp.R;
|
||||
import com.utopiaindustries.hseobservationsapp.adapters.PaperWorkImageAdapter;
|
||||
import com.utopiaindustries.hseobservationsapp.adapters.PTWImageAdapter;
|
||||
import com.utopiaindustries.hseobservationsapp.models.DocumentTypeImageModel;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
@ -48,13 +50,14 @@ public class PermitTwoActivity extends AppCompatActivity implements EasyPermissi
|
|||
EasyPermissions.RationaleCallbacks{
|
||||
|
||||
private CheckBox checkboxCompany, checkboxContractor;
|
||||
RecyclerView paperRecyclerView;
|
||||
PaperWorkImageAdapter imagePaperAdapter;
|
||||
RecyclerView ptwRecyclerView;
|
||||
PTWImageAdapter imagePaperAdapter;
|
||||
String paperFilePath = "no_pic";
|
||||
ArrayList<DocumentTypeImageModel> PaperImageList = new ArrayList<>();
|
||||
String docTypeId = "";
|
||||
String docTypeTitle = "";
|
||||
private static final int CAMERA_REQUEST_PAPER = 101;
|
||||
ImageView imgUpload, imgBack;
|
||||
|
||||
// Activity Result Launcher for Paper Camera
|
||||
private final ActivityResultLauncher<Intent> paperCameraLauncher =
|
||||
|
@ -71,7 +74,7 @@ public class PermitTwoActivity extends AppCompatActivity implements EasyPermissi
|
|||
|
||||
bitmapToByteArrayAsync(
|
||||
originalBitmap,
|
||||
200, // Target size in KB
|
||||
100, // Target size in KB
|
||||
imageBytes -> {
|
||||
this.runOnUiThread(() -> {
|
||||
|
||||
|
@ -136,13 +139,33 @@ public class PermitTwoActivity extends AppCompatActivity implements EasyPermissi
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
imgUpload.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openPaperCamera();
|
||||
}
|
||||
});
|
||||
|
||||
imgBack.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initializeLayouts() {
|
||||
checkboxCompany = findViewById(R.id.checkbox_company);
|
||||
checkboxContractor = findViewById(R.id.checkbox_contractor);
|
||||
imgUpload = findViewById(R.id.img_upload);
|
||||
imgBack = findViewById(R.id.img_back);
|
||||
|
||||
paperRecyclerView = findViewById(R.id.paperRecyclerView);
|
||||
ptwRecyclerView = findViewById(R.id.ptwRecyclerView);
|
||||
|
||||
imagePaperAdapter = new PTWImageAdapter(PaperImageList, this, "");
|
||||
ptwRecyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
|
||||
ptwRecyclerView.setAdapter(imagePaperAdapter);
|
||||
|
||||
}
|
||||
|
||||
|
@ -153,7 +176,7 @@ public class PermitTwoActivity extends AppCompatActivity implements EasyPermissi
|
|||
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
File photoFile = null;
|
||||
try {
|
||||
photoFile = createImageFile("Paper");
|
||||
photoFile = createImageFile();
|
||||
} catch (IOException ex) {
|
||||
// Error occurred while creating the File
|
||||
}
|
||||
|
@ -284,7 +307,7 @@ public class PermitTwoActivity extends AppCompatActivity implements EasyPermissi
|
|||
return bitmap;
|
||||
}
|
||||
|
||||
private File createImageFile(String pathType) throws IOException {
|
||||
private File createImageFile() throws IOException {
|
||||
// Create an image file name
|
||||
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
|
||||
String imageFileName = "JPEG_" + timeStamp + "_";
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
package com.utopiaindustries.hseobservationsapp.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.widget.TextView;
|
||||
|
||||
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.helper.Helper;
|
||||
import com.utopiaindustries.hseobservationsapp.helper.Preference;
|
||||
|
||||
public class SplashActivity extends AppCompatActivity {
|
||||
|
||||
private final int TIMER = 1200;
|
||||
boolean isLoggedIn = false;
|
||||
TextView txtVersion;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EdgeToEdge.enable(this);
|
||||
setContentView(R.layout.activity_splash);
|
||||
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;
|
||||
});
|
||||
|
||||
txtVersion = findViewById(R.id.txt_version);
|
||||
txtVersion.setText(getResources().getString(R.string.app_version));
|
||||
|
||||
isLoggedIn = Preference.getMyBooleanPref(Helper.project_file, "isLoggedIn", getApplicationContext());
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
|
||||
if (isLoggedIn) {
|
||||
Intent myIntent = new Intent(SplashActivity.this, DashboardActivity.class);
|
||||
startActivity(myIntent);
|
||||
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
|
||||
finish();
|
||||
} else {
|
||||
Intent myIntent = new Intent(SplashActivity.this, LoginActivity.class);
|
||||
startActivity(myIntent);
|
||||
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}, TIMER);
|
||||
}
|
||||
}
|
|
@ -29,13 +29,13 @@ import com.utopiaindustries.hseobservationsapp.utils.FullScreenImageDialog;
|
|||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class PaperWorkImageAdapter extends RecyclerView.Adapter<PaperWorkImageAdapter.ImageViewHolder> {
|
||||
public class PTWImageAdapter extends RecyclerView.Adapter<PTWImageAdapter.ImageViewHolder> {
|
||||
|
||||
List<DocumentTypeImageModel> imageList;
|
||||
private Context context;
|
||||
String classType;
|
||||
|
||||
public PaperWorkImageAdapter(List<DocumentTypeImageModel> imageList, Context context, String classType) {
|
||||
public PTWImageAdapter(List<DocumentTypeImageModel> imageList, Context context, String classType) {
|
||||
this.imageList = imageList;
|
||||
this.context = context;
|
||||
this.classType = classType;
|
||||
|
@ -73,7 +73,7 @@ public class PaperWorkImageAdapter extends RecyclerView.Adapter<PaperWorkImageAd
|
|||
.apply(new RequestOptions().centerCrop())
|
||||
.into(holder.imageView);
|
||||
|
||||
if (classType.equalsIgnoreCase("Review")) {
|
||||
/*if (classType.equalsIgnoreCase("Review")) {
|
||||
holder.btnDelete.setVisibility(View.GONE);
|
||||
}
|
||||
else {
|
||||
|
@ -85,7 +85,7 @@ public class PaperWorkImageAdapter extends RecyclerView.Adapter<PaperWorkImageAd
|
|||
notifyItemRemoved(position);
|
||||
notifyItemRangeChanged(position, imageList.size());
|
||||
Toast.makeText(context, "Image deleted", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
});*/
|
||||
|
||||
holder.imageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
|
@ -29,6 +29,8 @@ import com.utopiaindustries.hseobservationsapp.activities.ProgressiveActivityFor
|
|||
import com.utopiaindustries.hseobservationsapp.activities.WeeklyActivityForms.WeeklyFormOne;
|
||||
import com.utopiaindustries.hseobservationsapp.adapters.FormTypeAdapter;
|
||||
import com.utopiaindustries.hseobservationsapp.adapters.ShiftAdapter;
|
||||
import com.utopiaindustries.hseobservationsapp.helper.Helper;
|
||||
import com.utopiaindustries.hseobservationsapp.helper.Preference;
|
||||
import com.utopiaindustries.hseobservationsapp.models.FormType;
|
||||
import com.utopiaindustries.hseobservationsapp.models.Shift;
|
||||
|
||||
|
@ -52,7 +54,9 @@ public class HomeFragment extends Fragment {
|
|||
private FormTypeAdapter formTypeAdapter;
|
||||
private ArrayList<FormType> formArrayList = new ArrayList<>();
|
||||
|
||||
int selectedOption;
|
||||
int selectedOption = 0;
|
||||
String userName = "";
|
||||
String shiftName = "";
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
|
@ -62,11 +66,11 @@ public class HomeFragment extends Fragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_home , container, false );
|
||||
View view = inflater.inflate(R.layout.fragment_home, container, false);
|
||||
|
||||
initializeLayout(view);
|
||||
|
||||
txtUserName.setText("Supervisor Name");
|
||||
txtUserName.setText(String.format("Supervisor Name: %s", userName));
|
||||
|
||||
imgCalendar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -79,7 +83,8 @@ public class HomeFragment extends Fragment {
|
|||
@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();
|
||||
//Toast.makeText(getActivity(), "Item clicked: " + shiftArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||
shiftName = shiftArrayList.get(position).getTitle();
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -88,7 +93,7 @@ public class HomeFragment extends Fragment {
|
|||
@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();
|
||||
// Toast.makeText(getActivity(), "Item clicked: " + formArrayList.get(position).getTitle(), Toast.LENGTH_SHORT).show();
|
||||
selectedOption = formArrayList.get(position).getId();
|
||||
|
||||
}
|
||||
|
@ -97,6 +102,7 @@ public class HomeFragment extends Fragment {
|
|||
btnNext.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// if (isValidate()) {
|
||||
switch (selectedOption) {
|
||||
case 1:
|
||||
startActivity(new Intent(getActivity(), ObservationOneActivity.class));
|
||||
|
@ -120,9 +126,11 @@ public class HomeFragment extends Fragment {
|
|||
startActivity(new Intent(getActivity(), OtherHseActivity.class));
|
||||
break;
|
||||
default:
|
||||
Toast.makeText(getActivity(), "No option selected", Toast.LENGTH_SHORT).show();
|
||||
startActivity(new Intent(getActivity(), ObservationOneActivity.class));
|
||||
// Toast.makeText(getActivity(), "No option selected", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -143,6 +151,8 @@ public class HomeFragment extends Fragment {
|
|||
shiftTextview = view.findViewById(R.id.shift_textview);
|
||||
formTextview = view.findViewById(R.id.form_textview);
|
||||
|
||||
userName = Preference.getMyStringPref(Helper.project_file, Helper.logInUser, getActivity());
|
||||
|
||||
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)"));
|
||||
|
@ -180,4 +190,30 @@ public class HomeFragment extends Fragment {
|
|||
);
|
||||
datePickerDialog.show();
|
||||
}
|
||||
|
||||
public boolean isValidate() {
|
||||
boolean returnValue = true;
|
||||
String message = "";
|
||||
|
||||
if (selectedOption == 0) {
|
||||
message = "Please select form type.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (shiftName.isEmpty()) {
|
||||
message = "Please select shift.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (txtDate.getText().toString().isEmpty()) {
|
||||
message = "Please select date.";
|
||||
returnValue = false;
|
||||
}
|
||||
|
||||
if (!returnValue) {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
|
@ -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="M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM18,20L6,20L6,4h7v5h5v11zM8,15.01l1.41,1.41L11,14.84L11,19h2v-4.16l1.59,1.59L16,15.01 12.01,11z"/>
|
||||
|
||||
</vector>
|
|
@ -53,6 +53,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:padding="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
<?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.ObservationNearMissActivity">
|
||||
|
||||
|
||||
<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="Observation Near Miss Form"
|
||||
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" />
|
||||
|
||||
<LinearLayout
|
||||
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:orientation="vertical"
|
||||
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="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/observation_near_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_near_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/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"/>
|
||||
</LinearLayout>
|
||||
|
||||
<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="Submit"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -22,7 +22,7 @@
|
|||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Form Type"
|
||||
android:text="Observation Form"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_15sdp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||
|
@ -61,7 +61,7 @@
|
|||
android:layout_marginTop="25dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Observation Class "
|
||||
android:text="Observation Class *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
@ -95,7 +95,7 @@
|
|||
android:layout_marginTop="50dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Observation Sub Class "
|
||||
android:text="Observation Sub Class *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:padding="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
@ -61,7 +62,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Location "
|
||||
android:text="Location *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
@ -92,7 +93,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Sub Location "
|
||||
android:text="Sub Location *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
@ -123,7 +124,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="PTW Type "
|
||||
android:text="PTW Type *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
@ -186,7 +187,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Working Team "
|
||||
android:text="Working Team *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Working Party "
|
||||
android:text="Working Party *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
@ -88,10 +88,16 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ptw_heading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
|
@ -100,8 +106,19 @@
|
|||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_upload"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toRightOf="@+id/ptw_heading"
|
||||
android:src="@drawable/img_upload" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/paperRecyclerView"
|
||||
android:id="@+id/ptwRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
|
@ -122,7 +139,7 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="Description"
|
||||
android:text="Description *"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/_13sdp"
|
||||
android:textStyle="bold"
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
<?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.SplashActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="180dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/hse" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/wave_4_" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="end"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_16sdp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="Health, Safety and Environment"
|
||||
android:textColor="@color/theme_color"
|
||||
android:textSize="@dimen/_30sdp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/imageView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -59,6 +59,7 @@
|
|||
android:src="@drawable/icon_calendar" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/txt_date"
|
||||
|
@ -134,16 +135,17 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/rounded_btn_login"
|
||||
android:text="Next"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</FrameLayout>
|
|
@ -3,6 +3,8 @@
|
|||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
<string name="app_version">Version 1.0</string>
|
||||
|
||||
<string name="select_shift">Select Shift</string>
|
||||
<string name="select_form">Select Form</string>
|
||||
|
||||
|
|
Loading…
Reference in New Issue