Some validations are added

New logo added
master
saad.siddiq 2025-06-10 16:35:56 +05:00
parent b0d2fae79e
commit ab19987540
10 changed files with 19 additions and 14 deletions

View File

@ -25,7 +25,7 @@
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@drawable/hse"
android:icon="@drawable/hse_login"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"

View File

@ -2,6 +2,7 @@ package com.utopiaindustries.hseobservationsapp.activities.InjuryRecordForms;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AutoCompleteTextView;
@ -45,8 +46,8 @@ public class InjuryFormTwo extends AppCompatActivity {
ImageView imgBack;
private AutoCompleteTextView kpiTextview, incidentTypeTextview,
injuryTypeTextview, personalIllnessTextview, bodyPartTextview, riskTypeTextview ;
String kpi = "";
String incidentType = "";
private String kpi = "";
private String incidentType = "";
private ShiftAdapter shiftAdapter;
private KpiAdapter kpiAdapter;
@ -301,12 +302,12 @@ public class InjuryFormTwo extends AppCompatActivity {
boolean returnValue = true;
String message = "";
if (incidentType.isEmpty()) {
if (incidentType == null || incidentType.isEmpty()) {
message = "Please select incident type.";
returnValue = false;
}
if (kpi.isEmpty()) {
if (kpi == null || kpi.isEmpty()) {
message = "Please select KPI.";
returnValue = false;
}

View File

@ -263,7 +263,7 @@ public class ObservationTwoActivity extends AppCompatActivity {
}
if (riskLevel.isEmpty()) {
message = "Please select Risk level description.";
message = "Please select Risk level.";
returnValue = false;
}

View File

@ -222,12 +222,17 @@ public class PermitOneActivity extends AppCompatActivity {
boolean returnValue = true;
String message = "";
if (workingParty.isEmpty()) {
if (workingParty == null || workingParty.isEmpty()) {
message = "Please select Working Party.";
returnValue = false;
}
if (ptwType.isEmpty()) {
if (workingTeam == null || workingTeam.isEmpty()) {
message = "Please select working Team.";
returnValue = false;
}
if (ptwType == null || ptwType.isEmpty()) {
message = "Please select ptw Type.";
returnValue = false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -251,7 +251,7 @@
android:layout_marginTop="10dp"
android:gravity="left"
android:padding="5dp"
android:text="Risk Type "
android:text="Risk Level "
android:textColor="@color/black"
android:textSize="@dimen/_13sdp"
android:textStyle="bold" />

View File

@ -14,7 +14,6 @@
android:layout_marginStart="1dp"
android:layout_marginTop="60dp"
android:layout_marginEnd="1dp"
android:background="@color/grey_100"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
@ -23,9 +22,9 @@
<ImageView
android:layout_width="150dp"
android:layout_height="100dp"
android:layout_height="150dp"
android:layout_marginBottom="20dp"
android:src="@drawable/icon_hse" />
android:src="@drawable/hse_login" />
<TextView
android:layout_width="match_parent"

View File

@ -11,12 +11,12 @@
<ImageView
android:id="@+id/imageView"
android:layout_width="300dp"
android:layout_height="180dp"
android:layout_height="250dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/hse" />
app:srcCompat="@drawable/hse_login" />
<ImageView
android:id="@+id/imageView3"