Compare commits
	
		
			9 Commits
		
	
	
		
			master
			...
			features/p
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 63a0812e52 | |||
| b5ada09064 | |||
| 11c7d56a1a | |||
| 6072c4bb1a | |||
| f27734409c | |||
| 6a277e4dde | |||
| da72cfdcfb | |||
| ffa34bd808 | |||
| c80dc745a0 | 
@ -18,7 +18,7 @@
 | 
				
			|||||||
                                <PersistentState>
 | 
					                                <PersistentState>
 | 
				
			||||||
                                  <option name="values">
 | 
					                                  <option name="values">
 | 
				
			||||||
                                    <map>
 | 
					                                    <map>
 | 
				
			||||||
                                      <entry key="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/icons/material/materialicons/person_outline/baseline_person_outline_24.xml" />
 | 
					                                      <entry key="url" value="file:/$USER_HOME$/AppData/Local/Android/Sdk/icons/material/materialicons/menu_open/baseline_menu_open_24.xml" />
 | 
				
			||||||
                                    </map>
 | 
					                                    </map>
 | 
				
			||||||
                                  </option>
 | 
					                                  </option>
 | 
				
			||||||
                                </PersistentState>
 | 
					                                </PersistentState>
 | 
				
			||||||
@ -28,8 +28,8 @@
 | 
				
			|||||||
                        </option>
 | 
					                        </option>
 | 
				
			||||||
                        <option name="values">
 | 
					                        <option name="values">
 | 
				
			||||||
                          <map>
 | 
					                          <map>
 | 
				
			||||||
                            <entry key="color" value="4262d3" />
 | 
					                            <entry key="color" value="0e0f11" />
 | 
				
			||||||
                            <entry key="outputName" value="user" />
 | 
					                            <entry key="outputName" value="down_arrow" />
 | 
				
			||||||
                            <entry key="sourceFile" value="D:\projects\luna-migrated_with_31\examples\example_bestshot\example" />
 | 
					                            <entry key="sourceFile" value="D:\projects\luna-migrated_with_31\examples\example_bestshot\example" />
 | 
				
			||||||
                          </map>
 | 
					                          </map>
 | 
				
			||||||
                        </option>
 | 
					                        </option>
 | 
				
			||||||
 | 
				
			|||||||
@ -172,8 +172,7 @@ dependencies {
 | 
				
			|||||||
    implementation 'com.trello:rxlifecycle-components:1.0'
 | 
					    implementation 'com.trello:rxlifecycle-components:1.0'
 | 
				
			||||||
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
 | 
					    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
 | 
				
			||||||
    implementation 'com.google.android.material:material:1.0.0'
 | 
					    implementation 'com.google.android.material:material:1.0.0'
 | 
				
			||||||
    implementation 'com.github.f0ris.sweetalert:library:1.5.1'
 | 
					    implementation 'com.google.android.gms:play-services-location:18.0.0'
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -182,6 +181,10 @@ dependencies {
 | 
				
			|||||||
    implementation 'io.github.inflationx:calligraphy3:3.1.1'
 | 
					    implementation 'io.github.inflationx:calligraphy3:3.1.1'
 | 
				
			||||||
    implementation 'io.github.inflationx:viewpump:2.0.3'
 | 
					    implementation 'io.github.inflationx:viewpump:2.0.3'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    implementation 'com.android.volley:volley:1.2.1'
 | 
				
			||||||
 | 
					    implementation 'com.github.f0ris.sweetalert:library:1.6.2'
 | 
				
			||||||
 | 
					    /*implementation 'com.github.f0ris.sweetalert:library:1.5.1'*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//    implementation('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
 | 
					//    implementation('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
 | 
				
			||||||
//        transitive = true;
 | 
					//        transitive = true;
 | 
				
			||||||
//    }
 | 
					//    }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<manifest xmlns:tools="http://schemas.android.com/tools"
 | 
					<manifest xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
    xmlns:android="http://schemas.android.com/apk/res/android">
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 | 
					    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 | 
				
			||||||
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 | 
					    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 | 
				
			||||||
@ -12,23 +11,44 @@
 | 
				
			|||||||
    <uses-permission android:name="android.permission.CAMERA" />
 | 
					    <uses-permission android:name="android.permission.CAMERA" />
 | 
				
			||||||
    <uses-permission android:name="android.permission.FLASHLIGHT" />
 | 
					    <uses-permission android:name="android.permission.FLASHLIGHT" />
 | 
				
			||||||
    <uses-permission android:name="android.permission.VIBRATE" />
 | 
					    <uses-permission android:name="android.permission.VIBRATE" />
 | 
				
			||||||
 | 
					    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
 | 
				
			||||||
 | 
					    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <uses-feature android:name="android.hardware.camera" />
 | 
					    <uses-feature android:name="android.hardware.camera" />
 | 
				
			||||||
    <uses-feature android:name="android.hardware.camera.autofocus" />
 | 
					    <uses-feature android:name="android.hardware.camera.autofocus" />
 | 
				
			||||||
    <uses-feature android:name="android.hardware.camera.flash" />
 | 
					    <uses-feature android:name="android.hardware.camera.flash" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <application
 | 
					    <application
 | 
				
			||||||
        android:name=".App"
 | 
					        android:name=".App"
 | 
				
			||||||
        android:allowBackup="false"
 | 
					        android:allowBackup="false"
 | 
				
			||||||
        android:icon="@mipmap/ic_launcher"
 | 
					        android:icon="@drawable/ese"
 | 
				
			||||||
        android:label="@string/app_name"
 | 
					        android:label="Attendance"
 | 
				
			||||||
        android:supportsRtl="true"
 | 
					        android:supportsRtl="true"
 | 
				
			||||||
        android:theme="@style/AppTheme"
 | 
					        android:theme="@style/AppTheme"
 | 
				
			||||||
        tools:replace="android:icon,android:allowBackup">
 | 
					        android:usesCleartextTraffic="true">
 | 
				
			||||||
        <activity
 | 
					        <activity
 | 
				
			||||||
            android:name=".views.EmployeeActivity"
 | 
					            android:name=".ApprovalListActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".ReportDetailsActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".RegisterFromCheckActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".CheckInNewActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".LeaveRequestDetailsActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".LeaveRequestActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".ReportActivity"
 | 
				
			||||||
 | 
					            android:exported="false" />
 | 
				
			||||||
 | 
					        <activity
 | 
				
			||||||
 | 
					            android:name=".PermissionRequestActivity"
 | 
				
			||||||
            android:exported="false" />
 | 
					            android:exported="false" />
 | 
				
			||||||
        <activity
 | 
					        <activity
 | 
				
			||||||
            android:name=".register.SavePhotoActivity"
 | 
					            android:name=".register.SavePhotoActivity"
 | 
				
			||||||
@ -75,7 +95,6 @@
 | 
				
			|||||||
        <activity
 | 
					        <activity
 | 
				
			||||||
            android:name=".authentication.AuthSuccessActivity"
 | 
					            android:name=".authentication.AuthSuccessActivity"
 | 
				
			||||||
            android:screenOrientation="portrait" />
 | 
					            android:screenOrientation="portrait" />
 | 
				
			||||||
        <service android:name="ru.Service.MyLocationService"/>
 | 
					 | 
				
			||||||
    </application>
 | 
					    </application>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</manifest>
 | 
					</manifest>
 | 
				
			||||||
@ -1,357 +0,0 @@
 | 
				
			|||||||
package ru.Service;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import android.app.AlertDialog;
 | 
					 | 
				
			||||||
import android.app.Notification;
 | 
					 | 
				
			||||||
import android.app.NotificationChannel;
 | 
					 | 
				
			||||||
import android.app.NotificationManager;
 | 
					 | 
				
			||||||
import android.app.PendingIntent;
 | 
					 | 
				
			||||||
import android.app.ProgressDialog;
 | 
					 | 
				
			||||||
import android.app.Service;
 | 
					 | 
				
			||||||
import android.content.Context;
 | 
					 | 
				
			||||||
import android.content.DialogInterface;
 | 
					 | 
				
			||||||
import android.content.Intent;
 | 
					 | 
				
			||||||
import android.content.pm.PackageManager;
 | 
					 | 
				
			||||||
import android.location.Location;
 | 
					 | 
				
			||||||
import android.location.LocationManager;
 | 
					 | 
				
			||||||
import android.os.Build;
 | 
					 | 
				
			||||||
import android.os.Handler;
 | 
					 | 
				
			||||||
import android.os.IBinder;
 | 
					 | 
				
			||||||
import android.provider.Settings;
 | 
					 | 
				
			||||||
import android.widget.Toast;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import androidx.annotation.Nullable;
 | 
					 | 
				
			||||||
import androidx.core.app.ActivityCompat;
 | 
					 | 
				
			||||||
import androidx.core.app.NotificationCompat;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import ru.visionlab.femdemo.CheckInActivity;
 | 
					 | 
				
			||||||
import ru.visionlab.femdemo.R;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class MyLocationService extends Service {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    LocationManager locationManager;
 | 
					 | 
				
			||||||
    private static final int REQUEST_LOCATION = 1;
 | 
					 | 
				
			||||||
    String latitude, longitude;
 | 
					 | 
				
			||||||
    ProgressDialog progressDialog;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Handler handler = new Handler();
 | 
					 | 
				
			||||||
    Runnable runnable;
 | 
					 | 
				
			||||||
    int delay = 10000;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // execution of service will start
 | 
					 | 
				
			||||||
    // on calling this method
 | 
					 | 
				
			||||||
    public int onStartCommand(Intent intent, int flags, int startId) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        System.out.println("Inside my location service");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
 | 
					 | 
				
			||||||
        //addNotification();
 | 
					 | 
				
			||||||
        trackGPS();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // returns the status
 | 
					 | 
				
			||||||
        // of the program
 | 
					 | 
				
			||||||
        return START_STICKY;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void trackGPS() {
 | 
					 | 
				
			||||||
        handler.postDelayed(runnable = new Runnable() {
 | 
					 | 
				
			||||||
            public void run() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                System.out.println("Inside handler");
 | 
					 | 
				
			||||||
                            /*Intent intent = new Intent(MainActivity.this,MyLocationService.class);
 | 
					 | 
				
			||||||
                            startService(intent);*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                /*if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
 | 
					 | 
				
			||||||
                    OnGPS();
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    getLocation();
 | 
					 | 
				
			||||||
                }*/
 | 
					 | 
				
			||||||
                locationNotification();
 | 
					 | 
				
			||||||
                Toast.makeText(getApplicationContext(),"You are currently near location",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }, delay);
 | 
					 | 
				
			||||||
        handler.postDelayed(runnable, delay);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // execution of the service will
 | 
					 | 
				
			||||||
    // stop on calling this method
 | 
					 | 
				
			||||||
    public void onDestroy() {
 | 
					 | 
				
			||||||
        handler.removeCallbacks(runnable);
 | 
					 | 
				
			||||||
        super.onDestroy();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private void addNotification() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        System.out.println("Inside addNotification");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        NotificationManager mNotificationManager;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        NotificationCompat.Builder mBuilder =
 | 
					 | 
				
			||||||
                new NotificationCompat.Builder(getApplicationContext(), "notify_001");
 | 
					 | 
				
			||||||
        Intent ii = new Intent(getApplicationContext(), CheckInActivity.class);
 | 
					 | 
				
			||||||
        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, ii,  PendingIntent.FLAG_IMMUTABLE);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        NotificationCompat.BigTextStyle bigText = new NotificationCompat.BigTextStyle();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        bigText.setBigContentTitle("Service started ");
 | 
					 | 
				
			||||||
        bigText.setSummaryText("Location getting tracked ");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mBuilder.setContentIntent(pendingIntent);
 | 
					 | 
				
			||||||
        mBuilder.setSmallIcon(R.mipmap.ic_launcher);
 | 
					 | 
				
			||||||
        mBuilder.setContentTitle("Service started");
 | 
					 | 
				
			||||||
        mBuilder.setContentText("Location getting tracked");
 | 
					 | 
				
			||||||
        mBuilder.setPriority(Notification.PRIORITY_MAX);
 | 
					 | 
				
			||||||
        mBuilder.setStyle(bigText);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mNotificationManager =
 | 
					 | 
				
			||||||
                (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// === Removed some obsoletes
 | 
					 | 
				
			||||||
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            String channelId = "Your_channel_id";
 | 
					 | 
				
			||||||
            NotificationChannel channel = new NotificationChannel(
 | 
					 | 
				
			||||||
                    channelId,
 | 
					 | 
				
			||||||
                    "Channel human readable title",
 | 
					 | 
				
			||||||
                    NotificationManager.IMPORTANCE_HIGH);
 | 
					 | 
				
			||||||
            mNotificationManager.createNotificationChannel(channel);
 | 
					 | 
				
			||||||
            mBuilder.setChannelId(channelId);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mNotificationManager.notify(0, mBuilder.build());
 | 
					 | 
				
			||||||
        System.out.println("Inside add notific");
 | 
					 | 
				
			||||||
        /*NotificationCompat.Builder builder =
 | 
					 | 
				
			||||||
                new NotificationCompat.Builder(this)
 | 
					 | 
				
			||||||
                        .setSmallIcon(R.drawable.ic_launcher_background)
 | 
					 | 
				
			||||||
                        .setContentTitle("Notifications Example")
 | 
					 | 
				
			||||||
                        .setContentText("This is a test notification")
 | 
					 | 
				
			||||||
                        .setPriority(NotificationCompat.PRIORITY_DEFAULT);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        Intent notificationIntent = new Intent(this, MainActivity.class);
 | 
					 | 
				
			||||||
        PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent,
 | 
					 | 
				
			||||||
                PendingIntent.FLAG_IMMUTABLE);
 | 
					 | 
				
			||||||
        builder.setContentIntent(contentIntent);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // Add as notification
 | 
					 | 
				
			||||||
        NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
 | 
					 | 
				
			||||||
        manager.notify(0, builder.build());*/
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void locationNotification() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        System.out.println("Inside addNotification");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        NotificationManager mNotificationManager;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        NotificationCompat.Builder mBuilder =
 | 
					 | 
				
			||||||
                new NotificationCompat.Builder(getApplicationContext(), "notify_001");
 | 
					 | 
				
			||||||
        Intent ii = new Intent(getApplicationContext(), CheckInActivity.class);
 | 
					 | 
				
			||||||
        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, ii,  PendingIntent.FLAG_IMMUTABLE);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        NotificationCompat.BigTextStyle bigText = new NotificationCompat.BigTextStyle();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        bigText.setBigContentTitle("Location notification");
 | 
					 | 
				
			||||||
        bigText.setSummaryText("Entered location perimeter");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mBuilder.setContentIntent(pendingIntent);
 | 
					 | 
				
			||||||
        mBuilder.setSmallIcon(R.mipmap.ic_launcher);
 | 
					 | 
				
			||||||
        mBuilder.setContentTitle("Location notification");
 | 
					 | 
				
			||||||
        mBuilder.setContentText("Entered location perimeter");
 | 
					 | 
				
			||||||
        mBuilder.setPriority(Notification.PRIORITY_MAX);
 | 
					 | 
				
			||||||
        mBuilder.setStyle(bigText);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mNotificationManager =
 | 
					 | 
				
			||||||
                (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// === Removed some obsoletes
 | 
					 | 
				
			||||||
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            String channelId = "Your_channel_id";
 | 
					 | 
				
			||||||
            NotificationChannel channel = new NotificationChannel(
 | 
					 | 
				
			||||||
                    channelId,
 | 
					 | 
				
			||||||
                    "Channel human readable title",
 | 
					 | 
				
			||||||
                    NotificationManager.IMPORTANCE_HIGH);
 | 
					 | 
				
			||||||
            mNotificationManager.createNotificationChannel(channel);
 | 
					 | 
				
			||||||
            mBuilder.setChannelId(channelId);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        mNotificationManager.notify(0, mBuilder.build());
 | 
					 | 
				
			||||||
        System.out.println("Inside location notification");
 | 
					 | 
				
			||||||
        /*NotificationCompat.Builder builder =
 | 
					 | 
				
			||||||
                new NotificationCompat.Builder(this)
 | 
					 | 
				
			||||||
                        .setSmallIcon(R.drawable.ic_launcher_background)
 | 
					 | 
				
			||||||
                        .setContentTitle("Notifications Example")
 | 
					 | 
				
			||||||
                        .setContentText("This is a test notification")
 | 
					 | 
				
			||||||
                        .setPriority(NotificationCompat.PRIORITY_DEFAULT);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        Intent notificationIntent = new Intent(this, MainActivity.class);
 | 
					 | 
				
			||||||
        PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent,
 | 
					 | 
				
			||||||
                PendingIntent.FLAG_IMMUTABLE);
 | 
					 | 
				
			||||||
        builder.setContentIntent(contentIntent);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // Add as notification
 | 
					 | 
				
			||||||
        NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
 | 
					 | 
				
			||||||
        manager.notify(0, builder.build());*/
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void getLocation() {
 | 
					 | 
				
			||||||
        //Check Permissions again
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
 | 
					 | 
				
			||||||
            // TODO: Consider calling
 | 
					 | 
				
			||||||
            //    ActivityCompat#requestPermissions
 | 
					 | 
				
			||||||
            // here to request the missing permissions, and then overriding
 | 
					 | 
				
			||||||
            //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
 | 
					 | 
				
			||||||
            //                                          int[] grantResults)
 | 
					 | 
				
			||||||
            // to handle the case where the user grants the permission. See the documentation
 | 
					 | 
				
			||||||
            // for ActivityCompat#requestPermissions for more details.
 | 
					 | 
				
			||||||
            return;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        Location LocationGps = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
 | 
					 | 
				
			||||||
        Location LocationNetwork=locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
 | 
					 | 
				
			||||||
        Location LocationPassive=locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (LocationGps !=null)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            double lat=LocationGps.getLatitude();
 | 
					 | 
				
			||||||
            double longi=LocationGps.getLongitude();
 | 
					 | 
				
			||||||
            double newLat = 22.5747;
 | 
					 | 
				
			||||||
            double newLong = 88.4338;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            /*double newLat = 22.5796;
 | 
					 | 
				
			||||||
            double newLong = 88.4383;*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            float[] results = new float[1];
 | 
					 | 
				
			||||||
            Location.distanceBetween(lat,longi,newLat,newLong,results);
 | 
					 | 
				
			||||||
            float distance = results[0];
 | 
					 | 
				
			||||||
            Toast.makeText(this,String.valueOf(distance)+" metres from location",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
            if(distance > 400){
 | 
					 | 
				
			||||||
                Toast.makeText(this,"You are outside location range",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                System.out.println("You are outside location range");
 | 
					 | 
				
			||||||
                System.out.println("Position 1 ");
 | 
					 | 
				
			||||||
                //moreThanFour();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else{
 | 
					 | 
				
			||||||
                Toast.makeText(this,"You are inside location range",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                locationNotification();
 | 
					 | 
				
			||||||
                System.out.println("You are inside location range");
 | 
					 | 
				
			||||||
                System.out.println("Position 2 ");
 | 
					 | 
				
			||||||
                //lessThanFour();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
            longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
            longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            System.out.println("Inside getLocation");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else if (LocationNetwork !=null)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            System.out.println("Position 3 ");
 | 
					 | 
				
			||||||
            double lat=LocationNetwork.getLatitude();
 | 
					 | 
				
			||||||
            double longi=LocationNetwork.getLongitude();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            double newLat = 22.5747;
 | 
					 | 
				
			||||||
            double newLong = 88.4338;
 | 
					 | 
				
			||||||
            /*double newLat = 22.5135;
 | 
					 | 
				
			||||||
            double newLong = 88.4029;*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            float[] results = new float[1];
 | 
					 | 
				
			||||||
            Location.distanceBetween(lat,longi,newLat,newLong,results);
 | 
					 | 
				
			||||||
            float distance = results[0];
 | 
					 | 
				
			||||||
            Toast.makeText(this,String.valueOf(distance)+" metres from location",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
            if(distance > 400){
 | 
					 | 
				
			||||||
                Toast.makeText(this,"You are outside location range",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                System.out.println("You are outside location range");
 | 
					 | 
				
			||||||
                //moreThanFour();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else{
 | 
					 | 
				
			||||||
                Toast.makeText(this,"You are inside location range",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                System.out.println("You are inside location range");
 | 
					 | 
				
			||||||
                //lessThanFour();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
            longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
            longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else if (LocationPassive !=null)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            double lat=LocationPassive.getLatitude();
 | 
					 | 
				
			||||||
            double longi=LocationPassive.getLongitude();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
            longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            // Toast.makeText(this, "Can't Get Your Location", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            double lat=LocationNetwork.getLatitude();
 | 
					 | 
				
			||||||
            double longi=LocationNetwork.getLongitude();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            double newLat = 22.5747;
 | 
					 | 
				
			||||||
            double newLong = 88.4338;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            float[] results = new float[1];
 | 
					 | 
				
			||||||
            Location.distanceBetween(lat,longi,newLat,newLong,results);
 | 
					 | 
				
			||||||
            float distance = results[0];
 | 
					 | 
				
			||||||
            Toast.makeText(this,String.valueOf(distance)+" metres from location",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
            if(distance > 400){
 | 
					 | 
				
			||||||
                Toast.makeText(this,"You are outside location range",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                System.out.println("You are outside location range");
 | 
					 | 
				
			||||||
                //moreThanFour();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else{
 | 
					 | 
				
			||||||
                Toast.makeText(this,"You are inside location range",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                System.out.println("You are inside location range");
 | 
					 | 
				
			||||||
                //lessThanFour();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        //Thats All Run Your App
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void OnGPS() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        final AlertDialog.Builder builder= new AlertDialog.Builder(this);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        builder.setMessage("Enable GPS").setCancelable(false).setPositiveButton("YES", new DialogInterface.OnClickListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onClick(DialogInterface dialog, int which) {
 | 
					 | 
				
			||||||
                startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }).setNegativeButton("NO", new DialogInterface.OnClickListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onClick(DialogInterface dialog, int which) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                dialog.cancel();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        final AlertDialog alertDialog=builder.create();
 | 
					 | 
				
			||||||
        alertDialog.show();
 | 
					 | 
				
			||||||
        System.out.println("Inside OnGPS");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    @Nullable
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    public IBinder onBind(Intent intent) {
 | 
					 | 
				
			||||||
        return null;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,6 +0,0 @@
 | 
				
			|||||||
package ru.visionlab.constant;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class LatLong {
 | 
					 | 
				
			||||||
    public static final double newLat= 22.5118;
 | 
					 | 
				
			||||||
    public static final double newLong= 88.4001;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -2,6 +2,5 @@ package ru.visionlab.constant;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public class Url {
 | 
					public class Url {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static final String Base_url= "https://reqres.in/api/";
 | 
					    public static final String Base_url= "http://huaiglobal.com/api/";
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,6 @@ package ru.visionlab.femdemo;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import android.app.Application;
 | 
					import android.app.Application;
 | 
				
			||||||
import android.os.StrictMode;
 | 
					import android.os.StrictMode;
 | 
				
			||||||
import android.widget.Toast;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
//import com.crashlytics.android.Crashlytics;
 | 
					//import com.crashlytics.android.Crashlytics;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -90,5 +89,7 @@ public class App extends Application {
 | 
				
			|||||||
        void inject(AuthSuccessActivity activity);
 | 
					        void inject(AuthSuccessActivity activity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        void inject(ServerSettingsActivity activity);
 | 
					        void inject(ServerSettingsActivity activity);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        void inject(RegisterFromCheckActivity registerFromCheckActivity);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,158 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.AdapterView;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.ListAdapter;
 | 
				
			||||||
 | 
					import android.widget.ListView;
 | 
				
			||||||
 | 
					import android.widget.SimpleAdapter;
 | 
				
			||||||
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ApprovalListActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageButton back;
 | 
				
			||||||
 | 
					    TextView RequestIDVal,EmployeeIDVal,EmployeeNameVal,LDateVal,LTimeOutVal,LTimeInVal,NoOfHrsVal,LeaveTypeVal,ApproverIDVal,ApproverNameVal,ReasonVal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String RequestID,EmployeeID,EmployeeName,LDate,LTimeOut,LTimeIn,NoOfHrs,LeaveType,ApproverID,ApproverName,Reason;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ListView lv;
 | 
				
			||||||
 | 
					    ArrayList<HashMap<String,String>> arrayList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        //setContentView(R.layout.activity_approval_list);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_approval_new_list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                onBackPressed();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        arrayList=new ArrayList<>();
 | 
				
			||||||
 | 
					        lv = findViewById(R.id.listview);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        PermissionApprovalList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*RequestIDVal = findViewById(R.id.RequestIDVal);
 | 
				
			||||||
 | 
					        EmployeeIDVal = findViewById(R.id.EmployeeIDVal);
 | 
				
			||||||
 | 
					        EmployeeNameVal = findViewById(R.id.EmployeeNameVal);
 | 
				
			||||||
 | 
					        LDateVal = findViewById(R.id.LDateVal);
 | 
				
			||||||
 | 
					        LTimeOutVal = findViewById(R.id.LTimeOutVal);
 | 
				
			||||||
 | 
					        LTimeInVal = findViewById(R.id.LTimeInVal);
 | 
				
			||||||
 | 
					        NoOfHrsVal = findViewById(R.id.NoOfHrsVal);
 | 
				
			||||||
 | 
					        LeaveTypeVal = findViewById(R.id.LeaveTypeVal);
 | 
				
			||||||
 | 
					        ApproverIDVal = findViewById(R.id.ApproverIDVal);
 | 
				
			||||||
 | 
					        ApproverNameVal = findViewById(R.id.ApproverNameVal);
 | 
				
			||||||
 | 
					        ReasonVal = findViewById(R.id.ReasonVal);
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void PermissionApprovalList(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(ApprovalListActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/PermissionApprovallist?ApproverID=27256";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    JSONArray jsonArray=new JSONArray(response);
 | 
				
			||||||
 | 
					                    for(int i = 0;i<jsonArray.length();i++){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    JSONObject jb1=jsonArray.getJSONObject(0);
 | 
				
			||||||
 | 
					                     RequestID = jb1.getString("RequestID");
 | 
				
			||||||
 | 
					                     EmployeeID = jb1.getString("EmployeeID");
 | 
				
			||||||
 | 
					                     EmployeeName = jb1.getString("EmployeeName");
 | 
				
			||||||
 | 
					                     LDate = jb1.getString("LDate");
 | 
				
			||||||
 | 
					                     LTimeOut = jb1.getString("LTimeOut");
 | 
				
			||||||
 | 
					                     LTimeIn = jb1.getString("LTimeIn");
 | 
				
			||||||
 | 
					                     NoOfHrs = jb1.getString("NoOfHrs");
 | 
				
			||||||
 | 
					                     LeaveType = jb1.getString("LeaveType");
 | 
				
			||||||
 | 
					                     ApproverID = jb1.getString("ApproverID");
 | 
				
			||||||
 | 
					                     ApproverName = jb1.getString("ApproverName");
 | 
				
			||||||
 | 
					                     Reason = jb1.getString("Reason");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        HashMap<String,String> data = new HashMap<>();
 | 
				
			||||||
 | 
					                        data.put("EmployeeName",EmployeeName);
 | 
				
			||||||
 | 
					                        data.put("EmployeeID",EmployeeID);
 | 
				
			||||||
 | 
					                        data.put("LeaveType",LeaveType);
 | 
				
			||||||
 | 
					                        data.put("ApproverName",ApproverName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        arrayList.add(data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        ListAdapter adapter = new SimpleAdapter(ApprovalListActivity.this,arrayList,R.layout.listview_layout
 | 
				
			||||||
 | 
					                                ,new String[]{"EmployeeName","EmployeeID","LeaveType","ApproverName"},new int[]{R.id.EmployeeNameVal,R.id.EmployeeIDVal,R.id.LeaveTypeVal,R.id.ApproverNameVal});
 | 
				
			||||||
 | 
					                        lv.setAdapter(adapter);
 | 
				
			||||||
 | 
					                        lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
 | 
				
			||||||
 | 
					                            @Override
 | 
				
			||||||
 | 
					                            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
 | 
				
			||||||
 | 
					                                Intent intent = new Intent(ApprovalListActivity.this,LeaveRequestDetailsActivity.class);
 | 
				
			||||||
 | 
					                                startActivity(intent);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    /*RequestIDVal.setText(RequestID);
 | 
				
			||||||
 | 
					                    EmployeeIDVal.setText(EmployeeID);
 | 
				
			||||||
 | 
					                    EmployeeNameVal.setText(EmployeeName);
 | 
				
			||||||
 | 
					                    LDateVal.setText(LDate);
 | 
				
			||||||
 | 
					                    LTimeOutVal.setText(LTimeOut);
 | 
				
			||||||
 | 
					                    LTimeInVal.setText(LTimeIn);
 | 
				
			||||||
 | 
					                    NoOfHrsVal.setText(NoOfHrs);
 | 
				
			||||||
 | 
					                    LeaveTypeVal.setText(LeaveType);
 | 
				
			||||||
 | 
					                    ApproverIDVal.setText(ApproverID);
 | 
				
			||||||
 | 
					                    ApproverNameVal.setText(ApproverName);
 | 
				
			||||||
 | 
					                    ReasonVal.setText(Reason);
 | 
				
			||||||
 | 
					*/                  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(ApprovalListActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(ApprovalListActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,211 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					import androidx.core.app.ActivityCompat;
 | 
				
			||||||
 | 
					import androidx.core.content.ContextCompat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.content.pm.PackageManager;
 | 
				
			||||||
 | 
					import android.location.Location;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.util.Log;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.pedant.SweetAlert.SweetAlertDialog;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.register.RegisterActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class CheckInNewActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    TextView btnCheckIn,btnCheckOut;
 | 
				
			||||||
 | 
					    private static final int LOCATION_PERMISSION_REQUEST_CODE = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String targetLat1="",targetlat2="",targetLon1="",targetLon2="";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_check_in_new);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*new SweetAlertDialog(CheckInNewActivity.this, SweetAlertDialog.SUCCESS_TYPE)
 | 
				
			||||||
 | 
					                .setTitleText("You have successfully checked out.")
 | 
				
			||||||
 | 
					                .setConfirmText("Face recognition")
 | 
				
			||||||
 | 
					                .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
 | 
				
			||||||
 | 
					                    @Override
 | 
				
			||||||
 | 
					                    public void onClick(SweetAlertDialog sDialog) {
 | 
				
			||||||
 | 
					                        sDialog.dismissWithAnimation();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					                .setContentText("Thank you.").show();*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        btnCheckIn = findViewById(R.id.btnCheckIn);
 | 
				
			||||||
 | 
					        btnCheckIn.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                System.out.println("Clicked check in button");
 | 
				
			||||||
 | 
					                //requestLocationUpdates();
 | 
				
			||||||
 | 
					                if (ContextCompat.checkSelfPermission(CheckInNewActivity.this, android.Manifest.permission.ACCESS_FINE_LOCATION)
 | 
				
			||||||
 | 
					                        == PackageManager.PERMISSION_GRANTED) {
 | 
				
			||||||
 | 
					                    // Permission granted, so request location updates
 | 
				
			||||||
 | 
					                    //requestLocationUpdates();
 | 
				
			||||||
 | 
					                    targetLocationListFromCheckIn();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    // Permission not granted, request it
 | 
				
			||||||
 | 
					                    ActivityCompat.requestPermissions(CheckInNewActivity.this,
 | 
				
			||||||
 | 
					                            new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},
 | 
				
			||||||
 | 
					                            LOCATION_PERMISSION_REQUEST_CODE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void targetLocationListFromCheckIn(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(CheckInNewActivity.this, "Checking location", "Please wait while checking", false, false);
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/EmployeeLocation?employeeid=29034";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Log.d("data-=>",response);
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONObject jsonObject=new JSONObject(response);
 | 
				
			||||||
 | 
					                    JSONArray jsonArray=jsonObject.getJSONArray("_lstEmployee_Location");
 | 
				
			||||||
 | 
					                    /*for(int i=0;i<jsonArray.length();i++){
 | 
				
			||||||
 | 
					                        JSONObject jb1=jsonArray.getJSONObject(i);
 | 
				
			||||||
 | 
					                        targetLat1=jb1.getString("Latitude");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }*/
 | 
				
			||||||
 | 
					                    JSONObject jb1=jsonArray.getJSONObject(0);
 | 
				
			||||||
 | 
					                    targetLat1= jb1.getString("Latitude");
 | 
				
			||||||
 | 
					                    targetLon1 = jb1.getString("Longitude");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    JSONObject jb2=jsonArray.getJSONObject(1);
 | 
				
			||||||
 | 
					                    targetlat2 = jb2.getString("Latitude");
 | 
				
			||||||
 | 
					                    targetLon2 = jb2.getString("Longitude");
 | 
				
			||||||
 | 
					                    Log.d("Lov",targetLat1 + " " + targetlat2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    Location target = new Location("");
 | 
				
			||||||
 | 
					                    target.setLatitude(Double.parseDouble(targetLat1));
 | 
				
			||||||
 | 
					                    target.setLongitude(Double.parseDouble(targetLon1));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    Location current = new Location("");
 | 
				
			||||||
 | 
					                    current.setLatitude(Double.parseDouble(targetlat2));
 | 
				
			||||||
 | 
					                    current.setLongitude(Double.parseDouble(targetLon2));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    float distance  = current.distanceTo(target);
 | 
				
			||||||
 | 
					                    System.out.println("Distance: "+distance);
 | 
				
			||||||
 | 
					                    if(distance<500){
 | 
				
			||||||
 | 
					                        Toast.makeText(CheckInNewActivity.this, "You are out of range!Please get back to location", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    else{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        Toast.makeText(CheckInNewActivity.this, "Attendance ready to be captured", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                        checkIn();
 | 
				
			||||||
 | 
					                        /*Intent intent = new Intent(CheckInActivity.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                        intent.putExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					                        startActivity(intent);*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                Toast.makeText(CheckInNewActivity.this, "Data added to API", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(CheckInNewActivity.this, "Fail to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(CheckInNewActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void checkIn(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(CheckInNewActivity.this, "Checking in", "Please wait while checking", false, false);
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/CheckIn";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Log.d("data-=>",response);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Toast.makeText(CheckInNewActivity.this, "Attendance captured", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                Intent intent = new Intent(CheckInNewActivity.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					                intent.putExtra("FromNewCheck",true);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(CheckInNewActivity.this, "Fail to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                params.put("employeeid", "101");
 | 
				
			||||||
 | 
					                params.put("location", "loca1");
 | 
				
			||||||
 | 
					                params.put("latitude", "10.235");
 | 
				
			||||||
 | 
					                params.put("longitude", "55.666");
 | 
				
			||||||
 | 
					                params.put("checkintime", "10/07/2023 12:10:05");
 | 
				
			||||||
 | 
					                params.put("locStateDevice", "1");
 | 
				
			||||||
 | 
					                params.put("locStateApp", "1");
 | 
				
			||||||
 | 
					                params.put("batteryPercent", "1");
 | 
				
			||||||
 | 
					                params.put("cellInfo", "1");
 | 
				
			||||||
 | 
					                params.put("accuracy", "1");
 | 
				
			||||||
 | 
					                params.put("locTS", "1");
 | 
				
			||||||
 | 
					                params.put("spoofingEnb", "0");
 | 
				
			||||||
 | 
					                params.put("providerNetTime", "10/07/2023 12:10:05");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(CheckInNewActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,47 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.LinearLayout;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class LeaveRequestActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					    LinearLayout lin1,lin2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageButton back;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_leave_request);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                onBackPressed();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lin1 = findViewById(R.id.lin1);
 | 
				
			||||||
 | 
					        lin1.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                Intent intent = new Intent(LeaveRequestActivity.this, LeaveRequestDetailsActivity.class);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        lin2 = findViewById(R.id.lin2);
 | 
				
			||||||
 | 
					        lin2.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                Intent intent = new Intent(LeaveRequestActivity.this, LeaveRequestDetailsActivity.class);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,121 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.Button;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.ImageView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.R;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class LeaveRequestDetailsActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Button btnapprove,btnreject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageButton back;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_leave_request_details);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                onBackPressed();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        btnapprove = findViewById(R.id.btnapprove);
 | 
				
			||||||
 | 
					        btnapprove.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                PermissionApprovalAction();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        btnreject = findViewById(R.id.btnreject);
 | 
				
			||||||
 | 
					        btnreject.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                PermissionApprovalAction();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void PermissionApprovalAction(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(LeaveRequestDetailsActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/PermissionApprovalAction";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONObject jsonObject = new JSONObject(response);
 | 
				
			||||||
 | 
					                    String _statusMessage3 = jsonObject.getString("_statusMessage");
 | 
				
			||||||
 | 
					                    System.out.println("_statusMessage "+_statusMessage3);
 | 
				
			||||||
 | 
					                    if(_statusMessage3.equals("Saved Successfully")){
 | 
				
			||||||
 | 
					                        Toast.makeText(LeaveRequestDetailsActivity.this, "Current Status :A", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(LeaveRequestDetailsActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                params.put("permissionID", "27507");
 | 
				
			||||||
 | 
					                params.put("eleavetype", "27256");
 | 
				
			||||||
 | 
					                params.put("actionby", "asaif");
 | 
				
			||||||
 | 
					                params.put("remark", "Testing Approve");
 | 
				
			||||||
 | 
					                params.put("actionflag", "A");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(LeaveRequestDetailsActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class PermissionModel {
 | 
				
			||||||
 | 
					    public String getPermission_code() {
 | 
				
			||||||
 | 
					        return Permission_code;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setPermission_code(String permission_code) {
 | 
				
			||||||
 | 
					        Permission_code = permission_code;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String Permission_NameEN,Permission_code;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getPermission_NameEN() {
 | 
				
			||||||
 | 
					        return Permission_NameEN;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setPermission_NameEN(String permission_NameEN) {
 | 
				
			||||||
 | 
					        Permission_NameEN = permission_NameEN;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @Override    public String toString() {
 | 
				
			||||||
 | 
					        return this.getPermission_NameEN(); // What to display in the Spinner list.
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,455 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.app.TimePickerDialog;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.os.PersistableBundle;
 | 
				
			||||||
 | 
					import android.util.Log;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.AdapterView;
 | 
				
			||||||
 | 
					import android.widget.ArrayAdapter;
 | 
				
			||||||
 | 
					import android.widget.Button;
 | 
				
			||||||
 | 
					import android.widget.EditText;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.LinearLayout;
 | 
				
			||||||
 | 
					import android.widget.RelativeLayout;
 | 
				
			||||||
 | 
					import android.widget.Spinner;
 | 
				
			||||||
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.TimePicker;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.Calendar;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.R;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.login.LoginActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class PermissionRequestActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageButton back;
 | 
				
			||||||
 | 
					    Button btnSubmit,btn_private;
 | 
				
			||||||
 | 
					    String _statusMessage;
 | 
				
			||||||
 | 
					    EditText edtRemarks;
 | 
				
			||||||
 | 
					    String remarks="";
 | 
				
			||||||
 | 
					    LinearLayout timePickerFrom,timePickerTo;
 | 
				
			||||||
 | 
					    private int mDay, mHour, mMinute;
 | 
				
			||||||
 | 
					    TextView textTimeFrom,textTimeTo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    LinearLayout linearLayout1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Spinner spinner;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String permission_type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ArrayList<PermissionModel> permission_type_list=new ArrayList<>();
 | 
				
			||||||
 | 
					    ArrayList<String> spinner_array=new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // code for Niladri
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    RelativeLayout private_date,official_from_date,official_to_date;
 | 
				
			||||||
 | 
					     String permission_code;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_permission_request);
 | 
				
			||||||
 | 
					        linearLayout1 = findViewById(R.id.linearLayout1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private_date=findViewById(R.id.private_date);
 | 
				
			||||||
 | 
					        official_from_date=findViewById(R.id.official_from_date);
 | 
				
			||||||
 | 
					        official_to_date=findViewById(R.id.official_to_date);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        IsELeaveApprover();
 | 
				
			||||||
 | 
					        //PermissionInsert();
 | 
				
			||||||
 | 
					        PermissionApprovalList();
 | 
				
			||||||
 | 
					        PermissionTypes();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        spinner = findViewById(R.id.spinner);
 | 
				
			||||||
 | 
					//        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.spinner_items, android.R.layout.simple_spinner_item);
 | 
				
			||||||
 | 
					//        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
 | 
				
			||||||
 | 
					//        spinner.setAdapter(adapter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {
 | 
				
			||||||
 | 
					                // Handle the selected item here
 | 
				
			||||||
 | 
					                PermissionModel permissionModel=(PermissionModel) parentView.getSelectedItem();
 | 
				
			||||||
 | 
					                Log.d("code",permissionModel.Permission_code);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // Do something with the selected item
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (permissionModel.Permission_code.toUpperCase().equals("O"))
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    official_from_date.setVisibility(View.VISIBLE);
 | 
				
			||||||
 | 
					                    official_to_date.setVisibility(View.VISIBLE);
 | 
				
			||||||
 | 
					                    private_date.setVisibility(View.GONE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					               else
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    official_from_date.setVisibility(View.GONE);
 | 
				
			||||||
 | 
					                    official_to_date.setVisibility(View.GONE);
 | 
				
			||||||
 | 
					                    private_date.setVisibility(View.VISIBLE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onNothingSelected(AdapterView<?> parentView) {
 | 
				
			||||||
 | 
					                // Handle the case where nothing is selected (if needed)
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private_date.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View v) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                /*Intent intent = new Intent(PermissionRequestActivity.this, CheckInActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("backToCheck",true);
 | 
				
			||||||
 | 
					                startActivity(intent);*/
 | 
				
			||||||
 | 
					                onBackPressed();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        btn_private = findViewById(R.id.btn_private);
 | 
				
			||||||
 | 
					        btn_private.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                Intent intent = new Intent(PermissionRequestActivity.this, LeaveRequestActivity.class);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        btnSubmit = findViewById(R.id.btnSubmit);
 | 
				
			||||||
 | 
					        btnSubmit.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                getPermission();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        edtRemarks = findViewById(R.id.edtRemarks);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        timePickerFrom = findViewById(R.id.timePickerFrom);
 | 
				
			||||||
 | 
					        textTimeFrom = findViewById(R.id.textTimeFrom);
 | 
				
			||||||
 | 
					        timePickerFrom.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                final Calendar c = Calendar.getInstance();
 | 
				
			||||||
 | 
					                mHour = c.get(Calendar.HOUR_OF_DAY);
 | 
				
			||||||
 | 
					                mMinute = c.get(Calendar.MINUTE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // Launch Time Picker Dialog
 | 
				
			||||||
 | 
					                TimePickerDialog timePickerDialog = new TimePickerDialog(PermissionRequestActivity.this,
 | 
				
			||||||
 | 
					                        new android.app.TimePickerDialog.OnTimeSetListener() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            @Override
 | 
				
			||||||
 | 
					                            public void onTimeSet(TimePicker view, int hourOfDay,
 | 
				
			||||||
 | 
					                                                  int minute) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                textTimeFrom.setText(hourOfDay + ":" + minute);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }, mHour, mMinute, false);
 | 
				
			||||||
 | 
					                timePickerDialog.show();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        timePickerTo = findViewById(R.id.timePickerTo);
 | 
				
			||||||
 | 
					        textTimeTo = findViewById(R.id.textTimeTo);
 | 
				
			||||||
 | 
					        timePickerTo.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                final Calendar c = Calendar.getInstance();
 | 
				
			||||||
 | 
					                mHour = c.get(Calendar.HOUR_OF_DAY);
 | 
				
			||||||
 | 
					                mMinute = c.get(Calendar.MINUTE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // Launch Time Picker Dialog
 | 
				
			||||||
 | 
					                TimePickerDialog timePickerDialog = new TimePickerDialog(PermissionRequestActivity.this,
 | 
				
			||||||
 | 
					                        new android.app.TimePickerDialog.OnTimeSetListener() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            @Override
 | 
				
			||||||
 | 
					                            public void onTimeSet(TimePicker view, int hourOfDay,
 | 
				
			||||||
 | 
					                                                  int minute) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                textTimeTo.setText(hourOfDay + ":" + minute);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }, mHour, mMinute, false);
 | 
				
			||||||
 | 
					                timePickerDialog.show();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void getPermission(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					        remarks = edtRemarks.getText().toString();
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/PermissionInsert";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					                JSONObject jsonObject= null;
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    jsonObject = new JSONObject(response);
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    _statusMessage = jsonObject.getString("_statusMessage");
 | 
				
			||||||
 | 
					                    System.out.println("Status message: "+_statusMessage);
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, _statusMessage, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                params.put("employeeid", "101");
 | 
				
			||||||
 | 
					                params.put("eleavetype", "P");
 | 
				
			||||||
 | 
					                params.put("datedaytype", "Today");
 | 
				
			||||||
 | 
					                params.put("fromtime", "13:22");
 | 
				
			||||||
 | 
					                params.put("totime", "15:22");
 | 
				
			||||||
 | 
					                params.put("reason", remarks);
 | 
				
			||||||
 | 
					                params.put("attachment", "");
 | 
				
			||||||
 | 
					                params.put("userid", "a");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(PermissionRequestActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    public void IsELeaveApprover(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/IsELeaveApprover?employeeid=29034";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONArray jsonArray=new JSONArray(response);
 | 
				
			||||||
 | 
					                    JSONObject jb1=jsonArray.getJSONObject(0);
 | 
				
			||||||
 | 
					                    boolean _approverstatus=jb1.getBoolean("_approverstatus");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if(!_approverstatus){
 | 
				
			||||||
 | 
					                        linearLayout1.setVisibility(View.GONE);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    System.out.println("_approverstatus " + _approverstatus);
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(PermissionRequestActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void PermissionInsert(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/PermissionInsert";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONObject jsonObject = new JSONObject(response);
 | 
				
			||||||
 | 
					                    String _statusMessage = jsonObject.getString("_statusMessage");
 | 
				
			||||||
 | 
					                    System.out.println("_statusMessage "+_statusMessage);
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                params.put("employeeid", "101");
 | 
				
			||||||
 | 
					                params.put("eleavetype", "P");
 | 
				
			||||||
 | 
					                params.put("datedaytype", "Today");
 | 
				
			||||||
 | 
					                params.put("fromtime", "13:22");
 | 
				
			||||||
 | 
					                params.put("totime", "15:22");
 | 
				
			||||||
 | 
					                params.put("reason", "Meeting");
 | 
				
			||||||
 | 
					                params.put("attachment", "");
 | 
				
			||||||
 | 
					                params.put("userid", "a");
 | 
				
			||||||
 | 
					                params.put("startdate", "demouser1");
 | 
				
			||||||
 | 
					                params.put("enddate", "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(PermissionRequestActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    public void PermissionApprovalList(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/PermissionApprovallist?ApproverID=27256";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, "Response successful1", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(PermissionRequestActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    public void PermissionTypes(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(PermissionRequestActivity.this, "Fetching information", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/PermissionTypes";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//                Toast.makeText(PermissionRequestActivity.this, "Response successful2", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONArray jsonArray=new JSONArray(response);
 | 
				
			||||||
 | 
					                    for(int i=0;i<jsonArray.length();i++)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        JSONObject jb1=jsonArray.getJSONObject(i);
 | 
				
			||||||
 | 
					                        permission_code=jb1.getString("Permission_code");
 | 
				
			||||||
 | 
					                        permission_type=jb1.getString("Permission_NameEN");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//                        spinner_array.add(permission_type);
 | 
				
			||||||
 | 
					//                        spinner_array.add
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        PermissionModel permissionModel=new PermissionModel();
 | 
				
			||||||
 | 
					                        permissionModel.setPermission_NameEN(permission_type);
 | 
				
			||||||
 | 
					                        permissionModel.setPermission_code(permission_code);
 | 
				
			||||||
 | 
					                        permission_type_list.add(permissionModel);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    ArrayAdapter spinnerArrayAdapter = new ArrayAdapter
 | 
				
			||||||
 | 
					                            (getApplicationContext(), android.R.layout.simple_spinner_item,
 | 
				
			||||||
 | 
					                                    permission_type_list); //selected item will look like a spinner set from XML
 | 
				
			||||||
 | 
					                    spinnerArrayAdapter.setDropDownViewResource(android.R.layout
 | 
				
			||||||
 | 
					                            .simple_spinner_dropdown_item);
 | 
				
			||||||
 | 
					                    spinner.setAdapter(spinnerArrayAdapter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(PermissionRequestActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(PermissionRequestActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,565 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.Manifest;
 | 
				
			||||||
 | 
					import android.annotation.SuppressLint;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.graphics.Bitmap;
 | 
				
			||||||
 | 
					import android.media.MediaScannerConnection;
 | 
				
			||||||
 | 
					import android.net.Uri;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.os.Environment;
 | 
				
			||||||
 | 
					import android.os.Handler;
 | 
				
			||||||
 | 
					import android.provider.MediaStore;
 | 
				
			||||||
 | 
					import android.util.Base64;
 | 
				
			||||||
 | 
					import android.util.Log;
 | 
				
			||||||
 | 
					import android.view.MenuItem;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.Button;
 | 
				
			||||||
 | 
					import android.widget.EditText;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.ImageView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.annotation.Nullable;
 | 
				
			||||||
 | 
					import androidx.appcompat.app.ActionBar;
 | 
				
			||||||
 | 
					import androidx.appcompat.widget.Toolbar;
 | 
				
			||||||
 | 
					import androidx.fragment.app.Fragment;
 | 
				
			||||||
 | 
					import androidx.fragment.app.FragmentManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.tbruyelle.rxpermissions.RxPermissions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.ByteArrayOutputStream;
 | 
				
			||||||
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.FileOutputStream;
 | 
				
			||||||
 | 
					import java.net.SocketException;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.inject.Inject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import butterknife.BindView;
 | 
				
			||||||
 | 
					import cn.pedant.SweetAlert.SweetAlertDialog;
 | 
				
			||||||
 | 
					import ru.PreferenceManager.PreferenceManager;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.CheckInActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.Config;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.App;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.BuildConfig;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.LocationHelper;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.R;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.Storage;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.Utils;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.RegisterApiImplLuna2;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.RegisterApiImplLocal;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.RegisterApiInterface;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VLApi;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VerifyApiImplLuna2;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VerifyApiImplLunaLocal;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VerifyApiInterface;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.authentication.AuthSuccessActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.authentication.AuthenticationActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.authentication.FaceNotRecognizedFragment;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.base.PhotoFragment;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.base.ToolbarActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.login.LoginActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.login.LoginActivityNew;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.models.SearchResult;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.models.SearchResultPerson;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.register.FaceNotFoundFragment;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.register.RegisterFragment;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.register.RegistrationModel;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.register.SavePhotoFragment;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.settings.VLPreferences;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class RegisterFromCheckActivity extends ToolbarActivity implements RegisterFragment.Listener, PhotoFragment.Listener,
 | 
				
			||||||
 | 
					        SavePhotoFragment.Listener, FaceNotFoundFragment.Listener, RegisterApiInterface.Listener, VerifyApiInterface.Listener, FaceNotRecognizedFragment.Listener{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static final String REGISTER_FRAGMENT = "REGISTER FRAGMENT";
 | 
				
			||||||
 | 
					    public static final String PHOTO_FRAGMENT = "PHOTO_FRAGMENT";
 | 
				
			||||||
 | 
					    public static final String SAVE_PHOTO_FRAGMENT = "SAVE PHOTO FRAGMENT";
 | 
				
			||||||
 | 
					    public static final String FACE_NOT_FOUND_FRAGMENT = "FACE NOT FOUND FRAGMENT";
 | 
				
			||||||
 | 
					    public static final String SAVE_PHOTO_NAME = "PhotomakerAndroidDemo Registration Photo";
 | 
				
			||||||
 | 
					    private Thread thread;
 | 
				
			||||||
 | 
					    EditText compId,username,otp;
 | 
				
			||||||
 | 
					    String company_ID="",user="",OTP="";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Inject
 | 
				
			||||||
 | 
					    VLPreferences preferences;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Inject
 | 
				
			||||||
 | 
					    VLApi api;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Inject
 | 
				
			||||||
 | 
					    LocationHelper locationHelper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Inject
 | 
				
			||||||
 | 
					    PhotoProcessor photoProcessor;
 | 
				
			||||||
 | 
					    @Nullable
 | 
				
			||||||
 | 
					    @BindView(R.id.toolbar)
 | 
				
			||||||
 | 
					    Toolbar toolbar;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Bitmap bitmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    RegistrationModel registrationModel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageButton back_img;
 | 
				
			||||||
 | 
					    Button verifynproceed;
 | 
				
			||||||
 | 
					    ImageView photo;
 | 
				
			||||||
 | 
					    private static final int pic_id = 123;
 | 
				
			||||||
 | 
					    PreferenceManager preferenceManager;
 | 
				
			||||||
 | 
					    Bitmap photo2=null;
 | 
				
			||||||
 | 
					    Button save,retry;
 | 
				
			||||||
 | 
					    String encodedImage="";
 | 
				
			||||||
 | 
					    boolean fromLoginPage,FromNewCheck;
 | 
				
			||||||
 | 
					    private PhotoFragment fragment;
 | 
				
			||||||
 | 
					    String login;
 | 
				
			||||||
 | 
					    private long verifEndTime;
 | 
				
			||||||
 | 
					    private long verifStartTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private int faceFailCount;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private boolean goingSomewhere = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @SuppressLint("MissingInflatedId")
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        ((App) getApplication()).getComponent().inject(this);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_register);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //ButterKnife.bind(this);
 | 
				
			||||||
 | 
					        setToolbar();
 | 
				
			||||||
 | 
					        Intent intent = getIntent();
 | 
				
			||||||
 | 
					        fromLoginPage = intent.getBooleanExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					        System.out.println("Value of FromLoginPage "+fromLoginPage);
 | 
				
			||||||
 | 
					        if(fromLoginPage){
 | 
				
			||||||
 | 
					            showPhotoScreen();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else {
 | 
				
			||||||
 | 
					            showRegisterScreen();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        FromNewCheck = intent.getBooleanExtra("FromLoginPage",false);
 | 
				
			||||||
 | 
					        System.out.println("Value of FromNewCheck "+FromNewCheck);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*back_img.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });*/
 | 
				
			||||||
 | 
					        // compId = findViewById(R.id.compId);
 | 
				
			||||||
 | 
					//        username = findViewById(R.id.username);
 | 
				
			||||||
 | 
					        // otp = findViewById(R.id.otp);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //  company_ID = compId.getText().toString().trim();
 | 
				
			||||||
 | 
					//        user = username.getText().toString().trim();
 | 
				
			||||||
 | 
					        // OTP = otp.getText().toString().trim();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*verifynproceed = findViewById(R.id.verifynproceed);
 | 
				
			||||||
 | 
					        verifynproceed.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                if(company_ID.equals("002") *//*&& user.equals("34") *//* && OTP.equals("444")){
 | 
				
			||||||
 | 
					                    Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
 | 
				
			||||||
 | 
					                    startActivity(intent);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        preferenceManager=PreferenceManager.getInstance(this);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
 | 
				
			||||||
 | 
					        super.onActivityResult(requestCode, resultCode, data);
 | 
				
			||||||
 | 
					        // Match the request 'pic id with requestCode
 | 
				
			||||||
 | 
					        if (requestCode == pic_id) {
 | 
				
			||||||
 | 
					            // BitMap is data structure of image file which store the image in memory
 | 
				
			||||||
 | 
					            photo2 = (Bitmap) data.getExtras().get("data");
 | 
				
			||||||
 | 
					            // Set the image in imageview for display
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if(photo2.equals("") || photo2==null){
 | 
				
			||||||
 | 
					                photo.setBackgroundResource(R.drawable.user1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else {
 | 
				
			||||||
 | 
					                photo.setImageDrawable(null);
 | 
				
			||||||
 | 
					                photo.setImageBitmap(photo2);
 | 
				
			||||||
 | 
					                System.out.println("imageview "+ photo.getDrawable());
 | 
				
			||||||
 | 
					                System.out.println("imageview photo2 "+ photo2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Toast.makeText(this, "Image set", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onDestroy()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        photoProcessor.release();
 | 
				
			||||||
 | 
					        super.onDestroy();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showRegisterScreen() {
 | 
				
			||||||
 | 
					        final RegisterFragment fragment = RegisterFragment.newInstance();
 | 
				
			||||||
 | 
					        fragment.setListener(this);
 | 
				
			||||||
 | 
					        getSupportFragmentManager()
 | 
				
			||||||
 | 
					                .beginTransaction()
 | 
				
			||||||
 | 
					                .replace(R.id.container, fragment, PHOTO_FRAGMENT)
 | 
				
			||||||
 | 
					                .addToBackStack(fragment.toString())
 | 
				
			||||||
 | 
					                .commit();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void setToolbar() {
 | 
				
			||||||
 | 
					        setSupportActionBar(toolbar);
 | 
				
			||||||
 | 
					        final ActionBar actionBar = getSupportActionBar();
 | 
				
			||||||
 | 
					        if (actionBar != null) {
 | 
				
			||||||
 | 
					            actionBar.setDisplayHomeAsUpEnabled(true);
 | 
				
			||||||
 | 
					            actionBar.setDisplayShowHomeEnabled(true);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onBackPressed() {
 | 
				
			||||||
 | 
					        Log.i("STATUS","STACK COUNT "+getSupportFragmentManager().getBackStackEntryCount());
 | 
				
			||||||
 | 
					        preferences.setStartTime(String.valueOf(System.currentTimeMillis()));
 | 
				
			||||||
 | 
					        if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
 | 
				
			||||||
 | 
					            getSupportFragmentManager().popBackStack();
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            super.onBackPressed();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onSignUpClick(RegistrationModel registrationModel) {
 | 
				
			||||||
 | 
					        if((!BuildConfig.IS_OFFLINE_VERSION) && preferences.getLuna2()) {
 | 
				
			||||||
 | 
					            thread = new Thread(() -> {
 | 
				
			||||||
 | 
					                Storage.getInstance().updateDatabase(preferences.getLuna2Server(), preferences.getEncodedUserData(), api, preferences.getServerChanged());
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            thread.start();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        this.registrationModel = registrationModel;
 | 
				
			||||||
 | 
					        Utils.hideKeyboard(this, getCurrentFocus());
 | 
				
			||||||
 | 
					        new Handler().post(this::showPhotoScreen);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showPhotoScreen() {
 | 
				
			||||||
 | 
					        fragment = PhotoFragment.newInstance();
 | 
				
			||||||
 | 
					        fragment.setPhotoProcessor(photoProcessor);
 | 
				
			||||||
 | 
					        fragment.setListener(this);
 | 
				
			||||||
 | 
					        fragment.enableLivenessCheck(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        preferences.setStartTime(String.valueOf(System.currentTimeMillis()));
 | 
				
			||||||
 | 
					        preferences.setNeedPortrait(false);
 | 
				
			||||||
 | 
					        System.out.println("Inside photo screen method");
 | 
				
			||||||
 | 
					        getSupportFragmentManager()
 | 
				
			||||||
 | 
					                .beginTransaction()
 | 
				
			||||||
 | 
					                .replace(R.id.container, fragment, PHOTO_FRAGMENT)
 | 
				
			||||||
 | 
					                .addToBackStack(fragment.toString())
 | 
				
			||||||
 | 
					                .commit();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showPhotoReadyScreen(Bitmap bitmap) {
 | 
				
			||||||
 | 
					        final SavePhotoFragment fragment = SavePhotoFragment.newInstance();
 | 
				
			||||||
 | 
					        fragment.setPhoto(bitmap);
 | 
				
			||||||
 | 
					        fragment.setListener(this);
 | 
				
			||||||
 | 
					        getSupportFragmentManager()
 | 
				
			||||||
 | 
					                .beginTransaction()
 | 
				
			||||||
 | 
					                .replace(R.id.container, fragment, SAVE_PHOTO_FRAGMENT)
 | 
				
			||||||
 | 
					                .addToBackStack(fragment.toString())
 | 
				
			||||||
 | 
					                .commit();
 | 
				
			||||||
 | 
					        System.out.println("Inside save photo screen method");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onBestFrameReady(Bitmap bitmap) {
 | 
				
			||||||
 | 
					        this.bitmap = bitmap;
 | 
				
			||||||
 | 
					        if(fromLoginPage){
 | 
				
			||||||
 | 
					            verifyPhoto(bitmap);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        showPhotoReadyScreen(bitmap);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void verifyPhoto(Bitmap bitmap){
 | 
				
			||||||
 | 
					        fragment.showWaitState();
 | 
				
			||||||
 | 
					        login=preferences.getUsername();
 | 
				
			||||||
 | 
					        System.out.println("Value of login while verification " + login);
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            if (thread != null)
 | 
				
			||||||
 | 
					                thread.join();
 | 
				
			||||||
 | 
					        }catch (InterruptedException e) {
 | 
				
			||||||
 | 
					            e.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        VerifyApiInterface verifyApi;
 | 
				
			||||||
 | 
					        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					            verifyApi = new VerifyApiImplLunaLocal(this, photoProcessor, login, this);
 | 
				
			||||||
 | 
					        } else { //if (preferences.getLuna2()) {
 | 
				
			||||||
 | 
					            Log.i("LUNA2 ", preferences.getLuna2Server());
 | 
				
			||||||
 | 
					            verifyApi = new VerifyApiImplLuna2(this, preferences.getLuna2Server(), login, api, this, bitmap, preferences.getEncodedUserData());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        verifStartTime = System.nanoTime();
 | 
				
			||||||
 | 
					        verifyApi.verifyPerson();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onTimeout(FaceNotFoundFragment.Reason reason) {
 | 
				
			||||||
 | 
					        final FaceNotFoundFragment fragment = FaceNotFoundFragment.newInstance();
 | 
				
			||||||
 | 
					        fragment.setReason(reason);
 | 
				
			||||||
 | 
					        fragment.setListener(this);
 | 
				
			||||||
 | 
					        getSupportFragmentManager()
 | 
				
			||||||
 | 
					                .beginTransaction()
 | 
				
			||||||
 | 
					                .replace(R.id.container, fragment, FACE_NOT_FOUND_FRAGMENT)
 | 
				
			||||||
 | 
					                .addToBackStack(fragment.toString())
 | 
				
			||||||
 | 
					                .commit();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onNeedCameraPermission() {
 | 
				
			||||||
 | 
					        goToAppDetails(R.string.permission_need_for_register);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onInteractionWaitingOpenedEyes() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onTimeout(){}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onLivenessResult(int livenessState, int blinkState, int livenessType){}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onRetryClick() {
 | 
				
			||||||
 | 
					        onBackPressed();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean onOptionsItemSelected(MenuItem menuItem) {
 | 
				
			||||||
 | 
					        if (menuItem.getItemId() == android.R.id.home) {
 | 
				
			||||||
 | 
					            if (getSupportFragmentManager().findFragmentByTag(SAVE_PHOTO_FRAGMENT) != null) {
 | 
				
			||||||
 | 
					                getSupportFragmentManager().popBackStack();
 | 
				
			||||||
 | 
					                getSupportFragmentManager().popBackStack();
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return super.onOptionsItemSelected(menuItem);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onSaveClick() {
 | 
				
			||||||
 | 
					        registerPerson();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void registerPerson() {
 | 
				
			||||||
 | 
					        RegisterApiInterface registerApi;
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            if (thread != null) {
 | 
				
			||||||
 | 
					                thread.join();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }catch (InterruptedException e){
 | 
				
			||||||
 | 
					            e.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					            registerApi = new RegisterApiImplLocal(this, registrationModel, photoProcessor, this, bitmap);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            registerApi = new RegisterApiImplLuna2(this, preferences.getLuna2Server(), registrationModel, api, locationHelper, this, bitmap, preferences.getEncodedUserData());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        registerApi.registerPerson();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void SaveBitmapToGallery(Bitmap finalBitmap) {
 | 
				
			||||||
 | 
					        String root = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        File myDir = new File(root + "/saved_images");
 | 
				
			||||||
 | 
					        myDir.mkdirs();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        File file = null;
 | 
				
			||||||
 | 
					        int num = 0;
 | 
				
			||||||
 | 
					        // find next name
 | 
				
			||||||
 | 
					        do {
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                file = new File (myDir, new String(SAVE_PHOTO_NAME + num + ".jpg"));
 | 
				
			||||||
 | 
					            } catch (Exception e) {
 | 
				
			||||||
 | 
					                e.printStackTrace();
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            ++num;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        while(file.exists());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            FileOutputStream out = new FileOutputStream(file);
 | 
				
			||||||
 | 
					            finalBitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
 | 
				
			||||||
 | 
					            out.flush();
 | 
				
			||||||
 | 
					            out.close();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        } catch (Exception e) {
 | 
				
			||||||
 | 
					            e.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Tell the media scanner about the new file so that it is
 | 
				
			||||||
 | 
					        // immediately available to the user.
 | 
				
			||||||
 | 
					        MediaScannerConnection.scanFile(this, new String[] { file.toString() }, null,
 | 
				
			||||||
 | 
					                new MediaScannerConnection.OnScanCompletedListener() {
 | 
				
			||||||
 | 
					                    public void onScanCompleted(String path, Uri uri) {
 | 
				
			||||||
 | 
					                        Log.i("ExternalStorage", "Scanned " + path + ":");
 | 
				
			||||||
 | 
					                        Log.i("ExternalStorage", "-> uri=" + uri);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					        System.out.println("Inside saving image method");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onRegistrationFail(Throwable throwable) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(throwable instanceof RegisterApiImplLuna2.InternetConnectionException){
 | 
				
			||||||
 | 
					            Toast.makeText(this,getResources().getString(R.string.bad_internet_conneciton), Toast.LENGTH_LONG).show();
 | 
				
			||||||
 | 
					        }else if(throwable instanceof RegisterApiImplLuna2.SocketTimeOutException ||
 | 
				
			||||||
 | 
					                throwable instanceof SocketException) {
 | 
				
			||||||
 | 
					            Toast.makeText(this,getResources().getString(R.string.TimeOut), Toast.LENGTH_LONG).show();
 | 
				
			||||||
 | 
					        }else if(throwable instanceof RegisterApiImplLuna2.WrongAccDataException){
 | 
				
			||||||
 | 
					            Toast.makeText(this,getResources().getString(R.string.bad_acc_data), Toast.LENGTH_LONG).show();
 | 
				
			||||||
 | 
					        }else if(throwable instanceof RegisterApiImplLuna2.WrongServAddrException ||
 | 
				
			||||||
 | 
					                throwable instanceof IllegalArgumentException){
 | 
				
			||||||
 | 
					            Toast.makeText(this,getResources().getString(R.string.bad_server_address), Toast.LENGTH_LONG).show();
 | 
				
			||||||
 | 
					        }else if(throwable instanceof retrofit2.adapter.rxjava.HttpException ){
 | 
				
			||||||
 | 
					            Toast.makeText(this,throwable.getMessage(), Toast.LENGTH_LONG).show();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if(throwable instanceof RegisterApiImplLocal.DescriptorNotExtractedException) {
 | 
				
			||||||
 | 
					            Toast.makeText(this,throwable.getMessage(), Toast.LENGTH_LONG).show();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(preferences.getLuna2()){
 | 
				
			||||||
 | 
					            Storage.getInstance().clearConnectionFlags();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (getSupportFragmentManager().findFragmentByTag(SAVE_PHOTO_FRAGMENT) != null) {
 | 
				
			||||||
 | 
					            getSupportFragmentManager().popBackStack();
 | 
				
			||||||
 | 
					            getSupportFragmentManager().popBackStack();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onRegistrationSuccess() {
 | 
				
			||||||
 | 
					        preferences.setServerChanged(false);
 | 
				
			||||||
 | 
					        if (preferences.getSavePhoto()) {
 | 
				
			||||||
 | 
					            RxPermissions.getInstance(this)
 | 
				
			||||||
 | 
					                    .request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
 | 
				
			||||||
 | 
					                    .subscribe(granted -> {
 | 
				
			||||||
 | 
					                        if (granted) {
 | 
				
			||||||
 | 
					                            SaveBitmapToGallery(bitmap);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            Toast.makeText(this, R.string.photo_saved_to_gallery, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                        } else {
 | 
				
			||||||
 | 
					                            Toast.makeText(this, R.string.permission_need_for_write_external, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        // finish on any case
 | 
				
			||||||
 | 
					                        finishRegistration();
 | 
				
			||||||
 | 
					                    });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            finishRegistration();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void finishRegistration()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        preferences.setUsername(registrationModel.login);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // preferences.setPin(registrationModel.password);
 | 
				
			||||||
 | 
					        Intent intent = new Intent(RegisterFromCheckActivity.this, LoginActivityNew.class);
 | 
				
			||||||
 | 
					        startActivity(intent);
 | 
				
			||||||
 | 
					        finish();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onVerificationSuccess(SearchResult searchResult) {
 | 
				
			||||||
 | 
					        verifEndTime = System.nanoTime();
 | 
				
			||||||
 | 
					        preferences.setServerChanged(false);
 | 
				
			||||||
 | 
					        final List<SearchResultPerson> persons = searchResult.getPersons();
 | 
				
			||||||
 | 
					        if (persons != null && !persons.isEmpty()) {
 | 
				
			||||||
 | 
					            final SearchResultPerson person = persons.get(0);
 | 
				
			||||||
 | 
					            if (person.similarity > Config.MIN_SIMILARITY) {
 | 
				
			||||||
 | 
					                onFaceAuthSuccess();
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                onFaceAuthFail(AuthenticationActivity.AuthFailReason.SIMILARITY);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            onFaceAuthFail(AuthenticationActivity.AuthFailReason.SIMILARITY);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onVerificationFail(Throwable throwable) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void onFaceAuthSuccess() {
 | 
				
			||||||
 | 
					        showSuccess();
 | 
				
			||||||
 | 
					        /*if (preferences.getFingerAuth()) {
 | 
				
			||||||
 | 
					            onFingerClick(finger);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            showSuccess();
 | 
				
			||||||
 | 
					        }*/
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    private void showSuccess() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        final Intent intent = new Intent(RegisterFromCheckActivity.this, CheckInActivity.class);
 | 
				
			||||||
 | 
					        intent.putExtra(AuthSuccessActivity.LOGIN, login);
 | 
				
			||||||
 | 
					        intent.putExtra("FromRegisterCheck", true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					            intent.putExtra(AuthSuccessActivity.TIME, (int) (((double) (verifEndTime - verifStartTime)) / 1e6));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        finish();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void onFaceAuthFail(AuthenticationActivity.AuthFailReason reason) {
 | 
				
			||||||
 | 
					        if (faceFailCount < 4) {
 | 
				
			||||||
 | 
					            final FaceNotRecognizedFragment fragment = FaceNotRecognizedFragment.newInstance();
 | 
				
			||||||
 | 
					            fragment.setListener(this);
 | 
				
			||||||
 | 
					            if (reason == AuthenticationActivity.AuthFailReason.SIMILARITY && BuildConfig.IS_OFFLINE_VERSION)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                fragment.setVerificationTime((int)((double)(verifEndTime - verifStartTime) / 1e6));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            fragment.setFailReason(reason);
 | 
				
			||||||
 | 
					            showFragment(fragment);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            showFail();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showFail() {
 | 
				
			||||||
 | 
					        Toast.makeText(this, R.string.access_denied, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					        finish();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showFragment(Fragment fragment) {
 | 
				
			||||||
 | 
					        final FragmentManager fragmentManager = getSupportFragmentManager();
 | 
				
			||||||
 | 
					        if (fragmentManager.findFragmentByTag(fragment.toString()) == null) {
 | 
				
			||||||
 | 
					            if (!goingSomewhere) {
 | 
				
			||||||
 | 
					                goingSomewhere = true;
 | 
				
			||||||
 | 
					                fragmentManager
 | 
				
			||||||
 | 
					                        .beginTransaction()
 | 
				
			||||||
 | 
					                        .replace(R.id.container, fragment, fragment.toString())
 | 
				
			||||||
 | 
					                        .commit();
 | 
				
			||||||
 | 
					                goingSomewhere = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,203 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.DatePickerDialog;
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.Button;
 | 
				
			||||||
 | 
					import android.widget.DatePicker;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.LinearLayout;
 | 
				
			||||||
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Calendar;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ReportActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Button btnReport;
 | 
				
			||||||
 | 
					    ImageButton back;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    LinearLayout fromDate,toDate;
 | 
				
			||||||
 | 
					    TextView textFromDate,textToDate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    int yearFrom,monthOfYearFrom,dayOfmonthFrom;
 | 
				
			||||||
 | 
					    int yearTo,monthOfYearTo,dayOfmonthTo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String valuefromApi="";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String passingDateFrom,passingDateTo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_report);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        btnReport = findViewById(R.id.btnReport);
 | 
				
			||||||
 | 
					        btnReport.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Intent intent = new Intent(ReportActivity.this, ReportDetailsActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("passingDateFrom",passingDateFrom);
 | 
				
			||||||
 | 
					                intent.putExtra("passingDateTo",passingDateTo);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					                //getReport();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                /*Intent intent = new Intent(ReportActivity.this, CheckInActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("backToCheck",true);
 | 
				
			||||||
 | 
					                startActivity(intent);*/
 | 
				
			||||||
 | 
					                onBackPressed();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        fromDate = findViewById(R.id.fromDate);
 | 
				
			||||||
 | 
					        textFromDate = findViewById(R.id.textFromDate);
 | 
				
			||||||
 | 
					        fromDate.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                final Calendar c = Calendar.getInstance();
 | 
				
			||||||
 | 
					                int year = c.get(Calendar.YEAR);
 | 
				
			||||||
 | 
					                int month = c.get(Calendar.MONTH);
 | 
				
			||||||
 | 
					                int day = c.get(Calendar.DAY_OF_MONTH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                DatePickerDialog datePickerDialog = new DatePickerDialog(
 | 
				
			||||||
 | 
					                        // on below line we are passing context.
 | 
				
			||||||
 | 
					                        ReportActivity.this,
 | 
				
			||||||
 | 
					                        new DatePickerDialog.OnDateSetListener() {
 | 
				
			||||||
 | 
					                            @Override
 | 
				
			||||||
 | 
					                            public void onDateSet(DatePicker view, int year,
 | 
				
			||||||
 | 
					                                                  int monthOfYear, int dayOfMonth) {
 | 
				
			||||||
 | 
					                                // on below line we are setting date to our text view.
 | 
				
			||||||
 | 
					                                textFromDate.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                yearFrom = year;
 | 
				
			||||||
 | 
					                                dayOfmonthFrom = dayOfMonth;
 | 
				
			||||||
 | 
					                                monthOfYearFrom = monthOfYear;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                System.out.println("Date from values: " + dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                passingDateFrom = dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom;
 | 
				
			||||||
 | 
					                                System.out.println("passingDateFrom " + passingDateFrom);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        },
 | 
				
			||||||
 | 
					                        // on below line we are passing year,
 | 
				
			||||||
 | 
					                        // month and day for selected date in our date picker.
 | 
				
			||||||
 | 
					                        year, month, day);
 | 
				
			||||||
 | 
					                // at last we are calling show to
 | 
				
			||||||
 | 
					                // display our date picker dialog.
 | 
				
			||||||
 | 
					                datePickerDialog.show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        toDate = findViewById(R.id.toDate);
 | 
				
			||||||
 | 
					        textToDate = findViewById(R.id.textToDate);
 | 
				
			||||||
 | 
					        toDate.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                final Calendar c = Calendar.getInstance();
 | 
				
			||||||
 | 
					                int year = c.get(Calendar.YEAR);
 | 
				
			||||||
 | 
					                int month = c.get(Calendar.MONTH);
 | 
				
			||||||
 | 
					                int day = c.get(Calendar.DAY_OF_MONTH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                DatePickerDialog datePickerDialog = new DatePickerDialog(
 | 
				
			||||||
 | 
					                        // on below line we are passing context.
 | 
				
			||||||
 | 
					                        ReportActivity.this,
 | 
				
			||||||
 | 
					                        new DatePickerDialog.OnDateSetListener() {
 | 
				
			||||||
 | 
					                            @Override
 | 
				
			||||||
 | 
					                            public void onDateSet(DatePicker view, int year,
 | 
				
			||||||
 | 
					                                                  int monthOfYear, int dayOfMonth) {
 | 
				
			||||||
 | 
					                                // on below line we are setting date to our text view.
 | 
				
			||||||
 | 
					                                textToDate.setText(dayOfMonth + "/" + (monthOfYear + 1) + "/" + year);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                yearTo = year;
 | 
				
			||||||
 | 
					                                dayOfmonthTo = dayOfMonth;
 | 
				
			||||||
 | 
					                                monthOfYearTo = monthOfYear;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                System.out.println("Date from values: " + dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                passingDateTo = dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo;
 | 
				
			||||||
 | 
					                                System.out.println("passingDateTo " + passingDateTo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        },
 | 
				
			||||||
 | 
					                        // on below line we are passing year,
 | 
				
			||||||
 | 
					                        // month and day for selected date in our date picker.
 | 
				
			||||||
 | 
					                        year, month, day);
 | 
				
			||||||
 | 
					                // at last we are calling show to
 | 
				
			||||||
 | 
					                // display our date picker dialog.
 | 
				
			||||||
 | 
					                datePickerDialog.show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void getReport(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(ReportActivity.this, "Authenticating", "Please wait ", false, false);
 | 
				
			||||||
 | 
					        //String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport";
 | 
				
			||||||
 | 
					       //String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+"101"+"&fromdate="+"06/06/2023"+"&todate="+"06/07/2023";
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+"101"+"&fromdate="+dayOfmonthFrom + "/" + (monthOfYearFrom + 1) + "/" + yearFrom+"&todate="+dayOfmonthTo + "/" + (monthOfYearTo + 1) + "/" + yearTo;
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONObject jsonObject=new JSONObject(response);
 | 
				
			||||||
 | 
					                    JSONObject jb1=jsonObject.getJSONObject("statusModel");
 | 
				
			||||||
 | 
					                    valuefromApi = jb1.getString("_statusMessage");
 | 
				
			||||||
 | 
					                    System.out.println("Report status from api " + valuefromApi);
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                Toast.makeText(ReportActivity.this, valuefromApi, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(ReportActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                /*params.put("employeeid", "101");
 | 
				
			||||||
 | 
					                params.put("fromdate", "06/06/2023");
 | 
				
			||||||
 | 
					                params.put("todate", "06/07/2023");*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(ReportActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,122 @@
 | 
				
			|||||||
 | 
					package ru.visionlab.femdemo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					import android.view.View;
 | 
				
			||||||
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.ImageView;
 | 
				
			||||||
 | 
					import android.widget.TextView;
 | 
				
			||||||
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONArray;
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class ReportDetailsActivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String passingDateFrom,passingDateTo;
 | 
				
			||||||
 | 
					    TextView empIdVal,pdateVal,Check_InVal,Check_OutVal,statusVal;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageView back;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
 | 
					        super.onCreate(savedInstanceState);
 | 
				
			||||||
 | 
					        setContentView(R.layout.activity_report_details);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        empIdVal = findViewById(R.id.empIdVal);
 | 
				
			||||||
 | 
					        pdateVal = findViewById(R.id.pdateVal);
 | 
				
			||||||
 | 
					        Check_InVal = findViewById(R.id.Check_InVal);
 | 
				
			||||||
 | 
					        Check_OutVal = findViewById(R.id.Check_OutVal);
 | 
				
			||||||
 | 
					        statusVal = findViewById(R.id.statusVal);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					                Intent intent = new Intent(ReportDetailsActivity.this, ReportActivity.class);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Intent intent = getIntent();
 | 
				
			||||||
 | 
					        passingDateFrom = intent.getStringExtra("passingDateFrom");
 | 
				
			||||||
 | 
					        passingDateTo = intent.getStringExtra("passingDateTo");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        System.out.println("passingDateFrom " + passingDateFrom + " " + passingDateTo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        getReport();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void getReport(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(ReportDetailsActivity.this, "Authenticating", "Please wait ", false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/AttendanceReport?employeeid="+"101"+"&fromdate="+passingDateFrom+"&todate="+passingDateTo;
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.GET, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					                    JSONObject jsonObject=new JSONObject(response);
 | 
				
			||||||
 | 
					                    JSONArray jsonArray=jsonObject.getJSONArray("_lstAttendanceData");
 | 
				
			||||||
 | 
					                    JSONObject jb1=jsonArray.getJSONObject(0);
 | 
				
			||||||
 | 
					                    String EmployeeID = jb1.getString("EmployeeID");
 | 
				
			||||||
 | 
					                    String pdate = jb1.getString("pdate");
 | 
				
			||||||
 | 
					                    String Check_In = jb1.getString("Check_In");
 | 
				
			||||||
 | 
					                    String Check_Out = jb1.getString("Check_Out");
 | 
				
			||||||
 | 
					                    String status = jb1.getString("status");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    empIdVal.setText(EmployeeID);
 | 
				
			||||||
 | 
					                    pdateVal.setText(pdate);
 | 
				
			||||||
 | 
					                    Check_InVal.setText(Check_In);
 | 
				
			||||||
 | 
					                    Check_OutVal.setText(Check_Out);
 | 
				
			||||||
 | 
					                    statusVal.setText(status);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    System.out.println("data from api " + EmployeeID + " " + pdate+" "+Check_In+" "+Check_Out+" "+status);
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Toast.makeText(ReportDetailsActivity.this, "Successfull" , Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					                Toast.makeText(ReportDetailsActivity.this, "Failed to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                /*params.put("employeeid", "101");
 | 
				
			||||||
 | 
					                params.put("fromdate", "06/06/2023");
 | 
				
			||||||
 | 
					                params.put("todate", "06/07/2023");*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        Volley.newRequestQueue(ReportDetailsActivity.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -2,12 +2,16 @@ package ru.visionlab.femdemo;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import androidx.appcompat.app.AppCompatActivity;
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.content.Context;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.content.SharedPreferences;
 | 
				
			||||||
import android.os.Bundle;
 | 
					import android.os.Bundle;
 | 
				
			||||||
import android.os.Handler;
 | 
					import android.os.Handler;
 | 
				
			||||||
import android.view.WindowManager;
 | 
					import android.view.WindowManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.pedant.SweetAlert.SweetAlertDialog;
 | 
				
			||||||
import ru.visionlab.femdemo.login.LoginActivity;
 | 
					import ru.visionlab.femdemo.login.LoginActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.login.LoginActivityNew;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class Splashactivity extends AppCompatActivity {
 | 
					public class Splashactivity extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -23,15 +27,28 @@ public class Splashactivity extends AppCompatActivity {
 | 
				
			|||||||
            public void run() {
 | 
					            public void run() {
 | 
				
			||||||
                // on below line we are
 | 
					                // on below line we are
 | 
				
			||||||
                // creating a new intent
 | 
					                // creating a new intent
 | 
				
			||||||
                Intent i = new Intent(Splashactivity.this, LoginActivity.class);
 | 
					                SharedPreferences sharedPreferences = getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
 | 
				
			||||||
 | 
					                boolean loggedBefore = sharedPreferences.getBoolean("loggedBefore",false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                System.out.println("Value of loggedBefore "+ loggedBefore);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if(loggedBefore){
 | 
				
			||||||
 | 
					                    Intent i = new Intent(Splashactivity.this, LoginActivity.class);
 | 
				
			||||||
 | 
					                    startActivity(i);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    Intent i = new Intent(Splashactivity.this, LoginActivity.class);                    // on below line we are
 | 
				
			||||||
 | 
					                    // starting a new activity.
 | 
				
			||||||
 | 
					                    startActivity(i);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    // on the below line we are finishing
 | 
				
			||||||
 | 
					                    // our current activity.
 | 
				
			||||||
 | 
					                    finish();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // on below line we are
 | 
					 | 
				
			||||||
                // starting a new activity.
 | 
					 | 
				
			||||||
                startActivity(i);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // on the below line we are finishing
 | 
					 | 
				
			||||||
                // our current activity.
 | 
					 | 
				
			||||||
                finish();
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }, 2000);
 | 
					        }, 2000);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -88,8 +88,10 @@ public class Storage {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void addToStorageLunaLocal(String login, String Descriptor) {
 | 
					    public void addToStorageLunaLocal(String login, String Descriptor) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        System.out.println("making sure this metyhos " + login +" "+ Descriptor);
 | 
				
			||||||
        if (!LunaLocalData.containsKey(login)){
 | 
					        if (!LunaLocalData.containsKey(login)){
 | 
				
			||||||
            Log.i(TAG, "Pushed new person!: login"+login+"DESCR"+LunaLocalData.get(login));
 | 
					            Log.i(TAG, "Pushed new person!: login "+login+" DESCR "+Descriptor);
 | 
				
			||||||
            LunaLocalData.put(login,Descriptor);
 | 
					            LunaLocalData.put(login,Descriptor);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else{
 | 
					        else{
 | 
				
			||||||
@ -102,10 +104,10 @@ public class Storage {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public String getDescriptorLocal(String Login){
 | 
					    public String getDescriptorLocal(String Login){
 | 
				
			||||||
        if(LunaLocalData.containsKey(Login)){
 | 
					        if(LunaLocalData.containsKey(Login)){
 | 
				
			||||||
            Log.i(TAG,"Returned descriptor is"+LunaLocalData.get(Login));
 | 
					            Log.i(TAG,"Returned descriptor is "+LunaLocalData.get(Login));
 | 
				
			||||||
            return LunaLocalData.get(Login);
 | 
					            return LunaLocalData.get(Login);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        Log.i(TAG,"NO SUCH LOGIN!!!");
 | 
					        Log.i(TAG,"NO SUCH LOGIN!!!"+Login);
 | 
				
			||||||
        return  null;
 | 
					        return  null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -258,9 +260,11 @@ public class Storage {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public void updateOfflineData(){
 | 
					    public void updateOfflineData(){
 | 
				
			||||||
        SharedPreferences sharedpref = context.getSharedPreferences("Offline",Context.MODE_PRIVATE);
 | 
					        SharedPreferences sharedpref = context.getSharedPreferences("Offline",Context.MODE_PRIVATE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try{
 | 
					        try{
 | 
				
			||||||
            if(sharedpref != null){
 | 
					            if(sharedpref != null){
 | 
				
			||||||
                String jsonString = sharedpref.getString("My_map",(new JSONObject()).toString());
 | 
					                String jsonString = sharedpref.getString("My_map",(new JSONObject()).toString());
 | 
				
			||||||
 | 
					                Log.i(TAG,"Inside updateOfflineData "+jsonString);
 | 
				
			||||||
                JSONObject jsonObject = new JSONObject(jsonString);
 | 
					                JSONObject jsonObject = new JSONObject(jsonString);
 | 
				
			||||||
                Iterator<String> keyStr = jsonObject.keys();
 | 
					                Iterator<String> keyStr = jsonObject.keys();
 | 
				
			||||||
                while(keyStr.hasNext()){
 | 
					                while(keyStr.hasNext()){
 | 
				
			||||||
 | 
				
			|||||||
@ -6,18 +6,22 @@ import retrofit2.Call;
 | 
				
			|||||||
import retrofit2.http.Body;
 | 
					import retrofit2.http.Body;
 | 
				
			||||||
import retrofit2.http.FieldMap;
 | 
					import retrofit2.http.FieldMap;
 | 
				
			||||||
import retrofit2.http.FormUrlEncoded;
 | 
					import retrofit2.http.FormUrlEncoded;
 | 
				
			||||||
 | 
					import retrofit2.http.Headers;
 | 
				
			||||||
import retrofit2.http.POST;
 | 
					import retrofit2.http.POST;
 | 
				
			||||||
import ru.visionlab.femdemo.models.RegistrationNew;
 | 
					import ru.visionlab.femdemo.models.RegistrationNew;
 | 
				
			||||||
import ru.visionlab.femdemo.models.Users;
 | 
					import ru.visionlab.femdemo.models.Users;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public interface JsonPlaceHolderApi {
 | 
					public interface JsonPlaceHolderApi {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @FormUrlEncoded
 | 
					   // @FormUrlEncoded
 | 
				
			||||||
    @POST("services/app/Employee/RegisterEmployee")
 | 
					    @POST("services/app/Employee/RegisterEmployee")
 | 
				
			||||||
    //Call<RegistrationNew> createpost(@Body RegistrationNew registrationNew);
 | 
					    Call<RegistrationNew> createpost(@Body RegistrationNew registrationNew);
 | 
				
			||||||
    Call<RegistrationNew> createpost(@FieldMap Map<String,String> fields);
 | 
					    //Call<RegistrationNew> createpost(@FieldMap Map<String,String> fields);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @FormUrlEncoded
 | 
					    //@FormUrlEncoded
 | 
				
			||||||
    @POST("posts")
 | 
					    @Headers("Content-Type:application/json")
 | 
				
			||||||
    Call<Users> login(@FieldMap Map<String,String> fields);
 | 
					    @POST("TokenAuth/LogIn")
 | 
				
			||||||
 | 
					    //Call<Users> login(@Body Map<String,String> fields);
 | 
				
			||||||
 | 
					    Call<Users> login(@Body Users users);
 | 
				
			||||||
 | 
					    //Call<Users> login(@FieldMap Map<String,String> fields);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,13 @@
 | 
				
			|||||||
package ru.visionlab.femdemo.api;
 | 
					package ru.visionlab.femdemo.api;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import android.content.Context;
 | 
					import android.content.Context;
 | 
				
			||||||
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.content.SharedPreferences;
 | 
				
			||||||
import android.graphics.Bitmap;
 | 
					import android.graphics.Bitmap;
 | 
				
			||||||
import android.util.Base64;
 | 
					import android.util.Base64;
 | 
				
			||||||
import android.util.Log;
 | 
					import android.util.Log;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.pedant.SweetAlert.SweetAlertDialog;
 | 
				
			||||||
import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
					import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
				
			||||||
import ru.visionlab.femdemo.Storage;
 | 
					import ru.visionlab.femdemo.Storage;
 | 
				
			||||||
import ru.visionlab.femdemo.register.RegistrationModel;
 | 
					import ru.visionlab.femdemo.register.RegistrationModel;
 | 
				
			||||||
@ -41,17 +44,36 @@ public class RegisterApiImplLocal implements RegisterApiInterface {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void registerPerson() {
 | 
					    public void registerPerson() {
 | 
				
			||||||
        Log.i(TAG,"Login is"+registrationModel.login);
 | 
					        Log.i("Route", "registerPerson registerapiimplocal");
 | 
				
			||||||
       // photoProcessor.calcFaceDescriptorFromBestFrame();
 | 
					        //Log.i(TAG,"Login is"+registrationModel.login);
 | 
				
			||||||
        byte[] bestFrameDescriptorByteArray = photoProcessor.getFaceDescriptorByteArray();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (bestFrameDescriptorByteArray == null || bestFrameDescriptorByteArray.length == 0) {
 | 
					        if(registrationModel == null){
 | 
				
			||||||
            onFail(new DescriptorNotExtractedException("FAILED to register: could not extract descriptor "));
 | 
					            new SweetAlertDialog(context, SweetAlertDialog.WARNING_TYPE)
 | 
				
			||||||
 | 
					                    .setTitleText("Face not recognised")
 | 
				
			||||||
 | 
					                    .setConfirmText("Back to login")
 | 
				
			||||||
 | 
					                    .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
 | 
				
			||||||
 | 
					                        @Override
 | 
				
			||||||
 | 
					                        public void onClick(SweetAlertDialog sDialog) {
 | 
				
			||||||
 | 
					                            sDialog.dismissWithAnimation();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    })
 | 
				
			||||||
 | 
					                    .setContentText("OK").show();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else{
 | 
					        else{
 | 
				
			||||||
            String descriptorEncrypted = Base64.encodeToString(bestFrameDescriptorByteArray, Base64.DEFAULT);
 | 
					            // photoProcessor.calcFaceDescriptorFromBestFrame();
 | 
				
			||||||
            onSuccess(descriptorEncrypted);
 | 
					            byte[] bestFrameDescriptorByteArray = photoProcessor.getFaceDescriptorByteArray();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (bestFrameDescriptorByteArray == null || bestFrameDescriptorByteArray.length == 0) {
 | 
				
			||||||
 | 
					                onFail(new DescriptorNotExtractedException("FAILED to register: could not extract descriptor "));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else{
 | 
				
			||||||
 | 
					                String descriptorEncrypted = Base64.encodeToString(bestFrameDescriptorByteArray, Base64.DEFAULT);
 | 
				
			||||||
 | 
					                onSuccess(descriptorEncrypted);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void onFail(Throwable throwable) {
 | 
					    private void onFail(Throwable throwable) {
 | 
				
			||||||
@ -59,8 +81,16 @@ public class RegisterApiImplLocal implements RegisterApiInterface {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void onSuccess(String descriptor) {
 | 
					    private void onSuccess(String descriptor) {
 | 
				
			||||||
 | 
					        Log.i("Route", "onSuccess");
 | 
				
			||||||
        Log.i(TAG,"Desctiptor has been saved : descr = "+descriptor);
 | 
					        Log.i(TAG,"Desctiptor has been saved : descr = "+descriptor);
 | 
				
			||||||
 | 
					        System.out.println("Value of login after registration " + registrationModel.login);
 | 
				
			||||||
 | 
					        SharedPreferences sharedPreferences = context.getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
 | 
				
			||||||
 | 
					        SharedPreferences.Editor editor = sharedPreferences.edit();
 | 
				
			||||||
 | 
					        editor.putString("login",registrationModel.login);
 | 
				
			||||||
 | 
					        editor.putString("Descriptor",descriptor);
 | 
				
			||||||
 | 
					        editor.commit();
 | 
				
			||||||
        Storage.getInstance().addToStorageLunaLocal(registrationModel.login, descriptor);
 | 
					        Storage.getInstance().addToStorageLunaLocal(registrationModel.login, descriptor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        listener.onRegistrationSuccess();
 | 
					        listener.onRegistrationSuccess();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -37,6 +37,7 @@ import butterknife.ButterKnife;
 | 
				
			|||||||
import butterknife.OnClick;
 | 
					import butterknife.OnClick;
 | 
				
			||||||
import retrofit2.adapter.rxjava.HttpException;
 | 
					import retrofit2.adapter.rxjava.HttpException;
 | 
				
			||||||
import ru.visionlab.femdemo.App;
 | 
					import ru.visionlab.femdemo.App;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.CheckInActivity;
 | 
				
			||||||
import ru.visionlab.femdemo.Config;
 | 
					import ru.visionlab.femdemo.Config;
 | 
				
			||||||
import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
					import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
				
			||||||
import ru.visionlab.femdemo.BuildConfig;
 | 
					import ru.visionlab.femdemo.BuildConfig;
 | 
				
			||||||
@ -397,10 +398,12 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void onFaceAuthSuccess() {
 | 
					    private void onFaceAuthSuccess() {
 | 
				
			||||||
 | 
					        System.out.println("Success after face recognition");
 | 
				
			||||||
        if (preferences.getFingerAuth()) {
 | 
					        if (preferences.getFingerAuth()) {
 | 
				
			||||||
            onFingerClick(finger);
 | 
					            onFingerClick(finger);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            showSuccess();
 | 
					            showSuccess();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -274,7 +274,7 @@ public class PhotoFragment extends BaseFragment implements Camera.PreviewCallbac
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onError() {
 | 
					            public void onError() {
 | 
				
			||||||
                System.out.println("On photo success2");
 | 
					                System.out.println("On photo failure");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -76,6 +76,8 @@ public class NetworkModule {
 | 
				
			|||||||
        // Install the all-trusting trust manager
 | 
					        // Install the all-trusting trust manager
 | 
				
			||||||
        final SSLContext sslContext;
 | 
					        final SSLContext sslContext;
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            sslContext = SSLContext.getInstance("SSL");
 | 
					            sslContext = SSLContext.getInstance("SSL");
 | 
				
			||||||
            sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
 | 
					            sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
 | 
				
			||||||
            // Create an ssl socket factory with our all-trusting manager
 | 
					            // Create an ssl socket factory with our all-trusting manager
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,9 @@ package ru.visionlab.femdemo.login;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import android.Manifest;
 | 
					import android.Manifest;
 | 
				
			||||||
import android.app.Activity;
 | 
					import android.app.Activity;
 | 
				
			||||||
 | 
					import android.content.Context;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.content.SharedPreferences;
 | 
				
			||||||
import android.hardware.Camera;
 | 
					import android.hardware.Camera;
 | 
				
			||||||
import android.os.Bundle;
 | 
					import android.os.Bundle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -75,11 +77,10 @@ public class LoginActivity extends BaseActivity {
 | 
				
			|||||||
    LinearLayout register;
 | 
					    LinearLayout register;
 | 
				
			||||||
    String user = "";
 | 
					    String user = "";
 | 
				
			||||||
    Button login_new;
 | 
					    Button login_new;
 | 
				
			||||||
    Button reg_new;
 | 
					   // Button reg_new;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    LinearLayoutCompat lay_licence_verify;
 | 
					    LinearLayoutCompat lay_licence_verify;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private long pressedTime;
 | 
					    TextView reg_new;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void onCreate(@Nullable Bundle savedInstanceState) {
 | 
					    protected void onCreate(@Nullable Bundle savedInstanceState) {
 | 
				
			||||||
@ -92,6 +93,12 @@ public class LoginActivity extends BaseActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        lay_licence_verify = findViewById(R.id.lay_licence_verify);
 | 
					        lay_licence_verify = findViewById(R.id.lay_licence_verify);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        SharedPreferences sharedPreferences = getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
 | 
				
			||||||
 | 
					        String login = sharedPreferences.getString("login","");
 | 
				
			||||||
 | 
					        String Descriptor = sharedPreferences.getString("Descriptor","");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        System.out.println("Value of login and Descriptor " + login+" "+Descriptor );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        login_new = findViewById(R.id.login_new);
 | 
					        login_new = findViewById(R.id.login_new);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        login_new.setOnClickListener(new View.OnClickListener() {
 | 
					        login_new.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
@ -121,7 +128,10 @@ public class LoginActivity extends BaseActivity {
 | 
				
			|||||||
                .observeOn(AndroidSchedulers.mainThread())
 | 
					                .observeOn(AndroidSchedulers.mainThread())
 | 
				
			||||||
                .subscribe(status -> {
 | 
					                .subscribe(status -> {
 | 
				
			||||||
                            preferences.setFirstRun(false);
 | 
					                            preferences.setFirstRun(false);
 | 
				
			||||||
 | 
					                            System.out.println("Value of status "+ status);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            sdkResult = status;
 | 
					                            sdkResult = status;
 | 
				
			||||||
 | 
					                            System.out.println("Value of sdkResult "+ sdkResult);
 | 
				
			||||||
                            showSDKStatus();
 | 
					                            showSDKStatus();
 | 
				
			||||||
                            finishSplashScreen();
 | 
					                            finishSplashScreen();
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
@ -160,6 +170,7 @@ public class LoginActivity extends BaseActivity {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void showSDKStatus() {
 | 
					    private void showSDKStatus() {
 | 
				
			||||||
 | 
					        System.out.println("Inside sdk status " + sdkResult);
 | 
				
			||||||
        switch (sdkResult) {
 | 
					        switch (sdkResult) {
 | 
				
			||||||
            case -1: {
 | 
					            case -1: {
 | 
				
			||||||
                Toast.makeText(this, "Failed to unzip resources!", Toast.LENGTH_SHORT).show();
 | 
					                Toast.makeText(this, "Failed to unzip resources!", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
@ -167,7 +178,7 @@ public class LoginActivity extends BaseActivity {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            case 0: {
 | 
					            case 0: {
 | 
				
			||||||
                Log.d(TAG, "Face engine were succesfully created " + getFilesDir() + "/vl/data");
 | 
					                Log.d(TAG, "Face engine were succesfully created " + getFilesDir() + "/vl/data");
 | 
				
			||||||
                lay_licence_verify.setVisibility(View.VISIBLE);
 | 
					
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            case 1: {
 | 
					            case 1: {
 | 
				
			||||||
@ -467,12 +478,6 @@ public class LoginActivity extends BaseActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onBackPressed () {
 | 
					    public void onBackPressed () {
 | 
				
			||||||
        if (pressedTime + 2000 > System.currentTimeMillis()) {
 | 
					
 | 
				
			||||||
            super.onBackPressed();
 | 
					 | 
				
			||||||
            finish();
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            Toast.makeText(getBaseContext(), "Press back again to exit", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        pressedTime = System.currentTimeMillis();
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,16 +1,43 @@
 | 
				
			|||||||
package ru.visionlab.femdemo.login;
 | 
					package ru.visionlab.femdemo.login;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import androidx.appcompat.app.AppCompatActivity;
 | 
					import androidx.appcompat.app.AppCompatActivity;
 | 
				
			||||||
 | 
					import androidx.core.app.ActivityCompat;
 | 
				
			||||||
 | 
					import androidx.core.content.ContextCompat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.app.AlertDialog;
 | 
				
			||||||
 | 
					import android.app.ProgressDialog;
 | 
				
			||||||
 | 
					import android.content.Context;
 | 
				
			||||||
 | 
					import android.content.DialogInterface;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.content.SharedPreferences;
 | 
				
			||||||
 | 
					import android.content.pm.PackageManager;
 | 
				
			||||||
 | 
					import android.location.Location;
 | 
				
			||||||
import android.os.Bundle;
 | 
					import android.os.Bundle;
 | 
				
			||||||
import android.util.Log;
 | 
					import android.util.Log;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.widget.Button;
 | 
					import android.widget.Button;
 | 
				
			||||||
import android.widget.EditText;
 | 
					import android.widget.EditText;
 | 
				
			||||||
import android.widget.ImageButton;
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.ImageView;
 | 
				
			||||||
import android.widget.Toast;
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.AuthFailureError;
 | 
				
			||||||
 | 
					import com.android.volley.NetworkResponse;
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.RequestQueue;
 | 
				
			||||||
 | 
					import com.android.volley.ServerError;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.HttpHeaderParser;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.JsonObjectRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					import com.google.android.gms.location.FusedLocationProviderClient;
 | 
				
			||||||
 | 
					import com.google.android.gms.tasks.OnSuccessListener;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.json.JSONException;
 | 
				
			||||||
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.UnsupportedEncodingException;
 | 
				
			||||||
import java.util.HashMap;
 | 
					import java.util.HashMap;
 | 
				
			||||||
import java.util.Map;
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -22,15 +49,20 @@ import retrofit2.converter.gson.GsonConverterFactory;
 | 
				
			|||||||
import ru.visionlab.constant.Url;
 | 
					import ru.visionlab.constant.Url;
 | 
				
			||||||
import ru.visionlab.femdemo.CheckInActivity;
 | 
					import ru.visionlab.femdemo.CheckInActivity;
 | 
				
			||||||
import ru.visionlab.femdemo.R;
 | 
					import ru.visionlab.femdemo.R;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.Storage;
 | 
				
			||||||
import ru.visionlab.femdemo.api.CallApiService;
 | 
					import ru.visionlab.femdemo.api.CallApiService;
 | 
				
			||||||
import ru.visionlab.femdemo.api.JsonPlaceHolderApi;
 | 
					import ru.visionlab.femdemo.api.JsonPlaceHolderApi;
 | 
				
			||||||
import ru.visionlab.femdemo.authentication.AuthenticationActivity;
 | 
					import ru.visionlab.femdemo.authentication.AuthenticationActivity;
 | 
				
			||||||
import ru.visionlab.femdemo.models.RegistrationNew;
 | 
					import ru.visionlab.femdemo.models.RegistrationNew;
 | 
				
			||||||
import ru.visionlab.femdemo.models.Users;
 | 
					import ru.visionlab.femdemo.models.Users;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.register.RegisterActivity;
 | 
				
			||||||
import ru.visionlab.femdemo.register.RegisterActivityNew;
 | 
					import ru.visionlab.femdemo.register.RegisterActivityNew;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class LoginActivityNew extends AppCompatActivity {
 | 
					public class LoginActivityNew extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static final String MyPREFERENCES = "MyPrefs" ;
 | 
				
			||||||
 | 
					    public static final String ID = "id";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Button btnSignin;
 | 
					    Button btnSignin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ImageButton back;
 | 
					    ImageButton back;
 | 
				
			||||||
@ -44,6 +76,13 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    String tenancyName ="";
 | 
					    String tenancyName ="";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static final int LOCATION_PERMISSION_REQUEST_CODE = 1;
 | 
				
			||||||
 | 
					    private FusedLocationProviderClient fusedLocationClient;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ImageView faceImage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    SharedPreferences sharedpreferences;
 | 
				
			||||||
 | 
					    String empIdShared="";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
@ -52,6 +91,22 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        edt_empId = findViewById(R.id.edt_empId);
 | 
					        edt_empId = findViewById(R.id.edt_empId);
 | 
				
			||||||
        edt_pass = findViewById(R.id.edt_pass);
 | 
					        edt_pass = findViewById(R.id.edt_pass);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        SharedPreferences shared = getSharedPreferences("MyPrefs", MODE_PRIVATE);
 | 
				
			||||||
 | 
					        String login = shared.getString("login", "");
 | 
				
			||||||
 | 
					        String Descriptor = shared.getString("Descriptor", "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        System.out.println("value of login and Descriptor in login new " + login + " " + Descriptor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(Descriptor != null){
 | 
				
			||||||
 | 
					            Storage.getInstance().addToStorageLunaLocal(login,Descriptor);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(login == null || login.equals("")){
 | 
				
			||||||
 | 
					            Toast.makeText(LoginActivityNew.this,"Please register before logging in ",Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
                                                                                                                                                                                    createRetrofit();
 | 
					                                                                                                                                                                                    createRetrofit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        empId = edt_empId.getText().toString().trim();
 | 
					        empId = edt_empId.getText().toString().trim();
 | 
				
			||||||
@ -62,20 +117,56 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        btnSignin = findViewById(R.id.btnSignin);
 | 
					        btnSignin = findViewById(R.id.btnSignin);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btnSignin.setOnClickListener(new View.OnClickListener() {
 | 
					        if(!login.equals("")){
 | 
				
			||||||
 | 
					            btnSignin.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onClick(View view) {
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                /*if (ContextCompat.checkSelfPermission(LoginActivityNew.this, android.Manifest.permission.ACCESS_FINE_LOCATION)
 | 
				
			||||||
 | 
					                        == PackageManager.PERMISSION_GRANTED) {
 | 
				
			||||||
 | 
					                    // Permission granted, so request location updates
 | 
				
			||||||
 | 
					                    requestLocationUpdates();
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    // Permission not granted, request it
 | 
				
			||||||
 | 
					                    ActivityCompat.requestPermissions(LoginActivityNew.this,
 | 
				
			||||||
 | 
					                            new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},
 | 
				
			||||||
 | 
					                            LOCATION_PERMISSION_REQUEST_CODE);
 | 
				
			||||||
 | 
					                }*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                isAllFieldsChecked = CheckAllFields();
 | 
					                isAllFieldsChecked = CheckAllFields();
 | 
				
			||||||
                if(isAllFieldsChecked) {
 | 
					                if(isAllFieldsChecked) {
 | 
				
			||||||
                   // login();
 | 
					                    // login();
 | 
				
			||||||
                    //Intent intent = new Intent(LoginActivityNew.this, AuthenticationActivity.class);
 | 
					                    System.out.println("After login activity new ");
 | 
				
			||||||
                    Intent intent = new Intent(LoginActivityNew.this, CheckInActivity.class);
 | 
					                    /*Intent intent = new Intent(LoginActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
                    startActivity(intent);
 | 
					                    intent.putExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					                    startActivity(intent);*/
 | 
				
			||||||
 | 
					                    //login();
 | 
				
			||||||
 | 
					                    //loginVolley();
 | 
				
			||||||
 | 
					                    loginVolleyNil();
 | 
				
			||||||
 | 
					                    //loginRetro();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else{
 | 
				
			||||||
 | 
					            Toast.makeText(LoginActivityNew.this,"Please register before logging in ",Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        faceImage = findViewById(R.id.faceImage);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(!login.equals("")){
 | 
				
			||||||
 | 
					            faceImage.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					                @Override
 | 
				
			||||||
 | 
					                public void onClick(View view) {
 | 
				
			||||||
 | 
					                    Intent intent = new Intent(LoginActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                    intent.putExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					                    startActivity(intent);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        back = findViewById(R.id.back);
 | 
					        back = findViewById(R.id.back);
 | 
				
			||||||
        back.setOnClickListener(new View.OnClickListener() {
 | 
					        back.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
@ -98,6 +189,89 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
        jsonPlaceHolderApi=retrofit.create(JsonPlaceHolderApi.class);
 | 
					        jsonPlaceHolderApi=retrofit.create(JsonPlaceHolderApi.class);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void requestLocationUpdates() {
 | 
				
			||||||
 | 
					        if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
 | 
				
			||||||
 | 
					            // TODO: Consider calling
 | 
				
			||||||
 | 
					            //    ActivityCompat#requestPermissions
 | 
				
			||||||
 | 
					            // here to request the missing permissions, and then overriding
 | 
				
			||||||
 | 
					            //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
 | 
				
			||||||
 | 
					            //                                          int[] grantResults)
 | 
				
			||||||
 | 
					            // to handle the case where the user grants the permission. See the documentation
 | 
				
			||||||
 | 
					            // for ActivityCompat#requestPermissions for more details.
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        fusedLocationClient = new FusedLocationProviderClient(getApplicationContext());
 | 
				
			||||||
 | 
					        fusedLocationClient.getLastLocation()
 | 
				
			||||||
 | 
					                .addOnSuccessListener(this, new OnSuccessListener<Location>() {
 | 
				
			||||||
 | 
					                    @Override
 | 
				
			||||||
 | 
					                    public void onSuccess(Location location) {
 | 
				
			||||||
 | 
					                        if (location != null) {
 | 
				
			||||||
 | 
					                            double latitude = location.getLatitude();
 | 
				
			||||||
 | 
					                            double longitude = location.getLongitude();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            // Do something with the latitude and longitude
 | 
				
			||||||
 | 
					                            String message = "Latitude: " + latitude + "\nLongitude: " + longitude;
 | 
				
			||||||
 | 
					                            System.out.println("My current location: "+ message);
 | 
				
			||||||
 | 
					                            Toast.makeText(LoginActivityNew.this, message, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                            Location target = new Location("");
 | 
				
			||||||
 | 
					                            target.setLatitude(latitude);
 | 
				
			||||||
 | 
					                            target.setLongitude(longitude);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            Location current = new Location("");
 | 
				
			||||||
 | 
					                            current.setLatitude(20.5109958);
 | 
				
			||||||
 | 
					                            current.setLongitude(88.4009709);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            float distance  = current.distanceTo(target);
 | 
				
			||||||
 | 
					                            System.out.println("Distance: "+distance);
 | 
				
			||||||
 | 
					                            if(distance<500){
 | 
				
			||||||
 | 
					                                showFailedDialog();
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                            else{
 | 
				
			||||||
 | 
					                                showSuccessDialog();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                // Toast.makeText(CheckInActivity.this, "Attendance ready to be captured", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        } else {
 | 
				
			||||||
 | 
					                            Toast.makeText(LoginActivityNew.this, "Location not available", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showSuccessDialog() {
 | 
				
			||||||
 | 
					        AlertDialog.Builder builder = new AlertDialog.Builder(this);
 | 
				
			||||||
 | 
					        builder.setTitle("Success");
 | 
				
			||||||
 | 
					        builder.setMessage("Attendance ready to be captured.");
 | 
				
			||||||
 | 
					        builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(DialogInterface dialog, int which) {
 | 
				
			||||||
 | 
					                Intent intent = new Intent(LoginActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					               // dialog.dismiss(); // Close the dialog.
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        AlertDialog dialog = builder.create();
 | 
				
			||||||
 | 
					        dialog.show();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    private void showFailedDialog() {
 | 
				
			||||||
 | 
					        AlertDialog.Builder builder = new AlertDialog.Builder(this);
 | 
				
			||||||
 | 
					        builder.setTitle("Failed");
 | 
				
			||||||
 | 
					        builder.setMessage("You are out of range!Please get back to location");
 | 
				
			||||||
 | 
					        builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(DialogInterface dialog, int which) {
 | 
				
			||||||
 | 
					                // Perform any necessary action when the user clicks the "OK" button.
 | 
				
			||||||
 | 
					                dialog.dismiss(); // Close the dialog.
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        AlertDialog dialog = builder.create();
 | 
				
			||||||
 | 
					        dialog.show();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private boolean CheckAllFields() {
 | 
					    private boolean CheckAllFields() {
 | 
				
			||||||
        if (edt_empId.length() == 0) {
 | 
					        if (edt_empId.length() == 0) {
 | 
				
			||||||
@ -117,11 +291,26 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
        Map<String,String> fields=new HashMap<>();
 | 
					        Map<String,String> fields=new HashMap<>();
 | 
				
			||||||
        fields.put("employeeId",edt_empId.getText().toString());
 | 
					        fields.put("employeeId",edt_empId.getText().toString());
 | 
				
			||||||
        fields.put("password",edt_pass.getText().toString());
 | 
					        fields.put("password",edt_pass.getText().toString());
 | 
				
			||||||
        fields.put("tenancyName","facebio");
 | 
					        fields.put("tenancyName","Testing");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /*Users users = new Users(empId,pass,tenancyName);*/
 | 
					        /*Users users = new Users(empId,pass,tenancyName);*/
 | 
				
			||||||
        CallApiService.getClient().login(fields);
 | 
					        /*CallApiService.getClient().login(fields);
 | 
				
			||||||
        Call<Users> call=jsonPlaceHolderApi.login(fields);
 | 
					        Call<Users> call=jsonPlaceHolderApi.login(fields);*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Retrofit retrofit = new Retrofit.Builder()
 | 
				
			||||||
 | 
					                .baseUrl("http://huaiglobal.com/api/")
 | 
				
			||||||
 | 
					                // as we are sending data in json format so
 | 
				
			||||||
 | 
					                // we have to add Gson converter factory
 | 
				
			||||||
 | 
					                .addConverterFactory(GsonConverterFactory.create())
 | 
				
			||||||
 | 
					                // at last we are building our retrofit builder.
 | 
				
			||||||
 | 
					                .build();
 | 
				
			||||||
 | 
					        // below line is to create an instance for our retrofit api class.
 | 
				
			||||||
 | 
					        jsonPlaceHolderApi = retrofit.create(JsonPlaceHolderApi.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Users users = new Users(edt_empId.getText().toString(),edt_pass.getText().toString(),"Testing");
 | 
				
			||||||
 | 
					        System.out.println("Login credentials: " + edt_empId.getText().toString() + " "+ edt_pass.getText().toString() + " "+"Testing");
 | 
				
			||||||
 | 
					        Call<Users> call = jsonPlaceHolderApi.login(users);
 | 
				
			||||||
 | 
					        //Call<Users> call = jsonPlaceHolderApi.login(fields);
 | 
				
			||||||
        call.enqueue(new Callback<Users>() {
 | 
					        call.enqueue(new Callback<Users>() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onResponse(Call<Users> call, Response<Users> response) {
 | 
					            public void onResponse(Call<Users> call, Response<Users> response) {
 | 
				
			||||||
@ -136,6 +325,7 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                else{
 | 
					                else{
 | 
				
			||||||
                    Toast.makeText(LoginActivityNew.this, "Error "+String.valueOf(response.code()), Toast.LENGTH_SHORT).show();
 | 
					                    Toast.makeText(LoginActivityNew.this, "Error "+String.valueOf(response.code()), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                    System.out.println("Error: " + response.message());
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -147,4 +337,198 @@ public class LoginActivityNew extends AppCompatActivity {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    public void loginRetro(){
 | 
				
			||||||
 | 
					        Map<String,String> fields=new HashMap<>();
 | 
				
			||||||
 | 
					        fields.put("username","demouser1");
 | 
				
			||||||
 | 
					        fields.put("password","123");
 | 
				
			||||||
 | 
					        fields.put("imei","string");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*Users users = new Users(empId,pass,tenancyName);*/
 | 
				
			||||||
 | 
					        /*CallApiService.getClient().login(fields);
 | 
				
			||||||
 | 
					        Call<Users> call=jsonPlaceHolderApi.login(fields);*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Retrofit retrofit = new Retrofit.Builder()
 | 
				
			||||||
 | 
					                .baseUrl("http://43.242.212.92:7001/api/lgt/Login")
 | 
				
			||||||
 | 
					                // as we are sending data in json format so
 | 
				
			||||||
 | 
					                // we have to add Gson converter factory
 | 
				
			||||||
 | 
					                .addConverterFactory(GsonConverterFactory.create())
 | 
				
			||||||
 | 
					                // at last we are building our retrofit builder.
 | 
				
			||||||
 | 
					                .build();
 | 
				
			||||||
 | 
					        // below line is to create an instance for our retrofit api class.
 | 
				
			||||||
 | 
					        jsonPlaceHolderApi = retrofit.create(JsonPlaceHolderApi.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Users users = new Users("demouser1","123","string");
 | 
				
			||||||
 | 
					        System.out.println("Login credentials: " + edt_empId.getText().toString() + " "+ edt_pass.getText().toString() + " "+"Testing");
 | 
				
			||||||
 | 
					        Call<Users> call = jsonPlaceHolderApi.login(users);
 | 
				
			||||||
 | 
					        //Call<Users> call = jsonPlaceHolderApi.login(fields);
 | 
				
			||||||
 | 
					        call.enqueue(new Callback<Users>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(Call<Users> call, Response<Users> response) {
 | 
				
			||||||
 | 
					                if(response.isSuccessful())
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    response.code();
 | 
				
			||||||
 | 
					                    Log.e("login response code=", String.valueOf(response.code()));
 | 
				
			||||||
 | 
					                    Toast.makeText(LoginActivityNew.this, "Logging in ", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else{
 | 
				
			||||||
 | 
					                    Toast.makeText(LoginActivityNew.this, "Error "+String.valueOf(response.code()), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                    System.out.println("Error: " + response.message());
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onFailure(Call<Users> call, Throwable t) {
 | 
				
			||||||
 | 
					                Toast.makeText(LoginActivityNew.this, ""+t.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                Log.e("error=",t.getMessage().toString());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    public void loginVolley(){
 | 
				
			||||||
 | 
					        String url = "http://huaiglobal.com/api/TokenAuth/LogIn"; // Replace with your API endpoint URL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        RequestQueue queue = Volley.newRequestQueue(LoginActivityNew.this);
 | 
				
			||||||
 | 
					        StringRequest request = new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // on below line we are displaying a success toast message.
 | 
				
			||||||
 | 
					                Toast.makeText(LoginActivityNew.this, "Data added to API", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					                // method to handle errors.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                NetworkResponse response = error.networkResponse;
 | 
				
			||||||
 | 
					                if (error instanceof ServerError && response != null) {
 | 
				
			||||||
 | 
					                    try {
 | 
				
			||||||
 | 
					                        String res = new String(response.data,
 | 
				
			||||||
 | 
					                                HttpHeaderParser.parseCharset(response.headers, "utf-8"));
 | 
				
			||||||
 | 
					                        // Now you can use any deserializer to make sense of data
 | 
				
			||||||
 | 
					                        JSONObject obj = new JSONObject(res);
 | 
				
			||||||
 | 
					                        System.out.println("Error message: "+ obj);
 | 
				
			||||||
 | 
					                    } catch (UnsupportedEncodingException e1) {
 | 
				
			||||||
 | 
					                        // Couldn't properly decode data to string
 | 
				
			||||||
 | 
					                        e1.printStackTrace();
 | 
				
			||||||
 | 
					                    } catch (JSONException e2) {
 | 
				
			||||||
 | 
					                        // returned data is not JSONObject?
 | 
				
			||||||
 | 
					                        e2.printStackTrace();
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Toast.makeText(LoginActivityNew.this, "Fail to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }) {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                // below line we are creating a map for
 | 
				
			||||||
 | 
					                // storing our values in key and value pair.
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // on below line we are passing our key
 | 
				
			||||||
 | 
					                // and value pair to our parameters.
 | 
				
			||||||
 | 
					                params.put("userNameOrEmailAddress", edt_empId.getText().toString());
 | 
				
			||||||
 | 
					                params.put("password", edt_pass.getText().toString());
 | 
				
			||||||
 | 
					                params.put("tenancyName", "Testing");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // at last we are
 | 
				
			||||||
 | 
					                // returning our params.
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public Map<String, String> getHeaders() throws AuthFailureError {
 | 
				
			||||||
 | 
					                HashMap<String, String> headers = new HashMap<String, String>();
 | 
				
			||||||
 | 
					                headers.put("Content-Type", "application/json; charset=utf-8");
 | 
				
			||||||
 | 
					                return headers;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            /*@Override
 | 
				
			||||||
 | 
					            public Map<String, String> getHeaders() throws AuthFailureError {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					                params.put("Authorization", "bearer "+"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjUiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9lbWFpbGFkZHJlc3MiOiJkYXNzYW5kaXBAc2VudGllbnRnZWVrcy5jb20iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdFR1lVNFRBU1BUS05BREIzVEtHM0ZQNzdFQ1AzVjNBIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiI0Iiwic3ViIjoiNSIsImp0aSI6IjYwOTFhMTgwLTkzMWItNGYwMS05ZWVjLTM3OTNkYmExMjkxYiIsImlhdCI6MTY5Mzg5OTk1NCwidG9rZW5fdmFsaWRpdHlfa2V5IjoiMzM3ZjAzMmEtN2I3NS00MTkzLWFhY2QtYjA3OWEyYjYxMjI0IiwidXNlcl9pZGVudGlmaWVyIjoiNUA0IiwidG9rZW5fdHlwZSI6IjAiLCJyZWZyZXNoX3Rva2VuX3ZhbGlkaXR5X2tleSI6Ijg1MTlmMjU3LWE3NmEtNDViOS05MDQ0LTU4ZTk0ZThhZTEwZSIsIm5iZiI6MTY5Mzg5OTk1NCwiZXhwIjoxNjkzOTg2MzU0LCJpc3MiOiJtdWx0aSIsImF1ZCI6Im11bHRpIn0.ImuWLPg85b7fN1nWzr1Es1L9j6xm7DrK4L_UxApzkqM");
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }*/
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        queue.add(request);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void loginVolleyNil(){
 | 
				
			||||||
 | 
					        final ProgressDialog loading = ProgressDialog.show(LoginActivityNew.this, "Authenticating", "Please wait while logging", false, false);
 | 
				
			||||||
 | 
					        String url= "http://43.242.212.92:7001/api/lgt/Login";
 | 
				
			||||||
 | 
					        StringRequest stringRequest=new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Log.d("data-=>",response);
 | 
				
			||||||
 | 
					                String _employeeid = response.toString();
 | 
				
			||||||
 | 
					                System.out.println("Value of _employeeid " +_employeeid );
 | 
				
			||||||
 | 
					                /*try {
 | 
				
			||||||
 | 
					                    JSONObject jsonObject=new JSONObject(response);
 | 
				
			||||||
 | 
					                    empIdShared = jsonObject.getString("_employeeid");
 | 
				
			||||||
 | 
					                    SharedPreferences.Editor editor = sharedpreferences.edit();
 | 
				
			||||||
 | 
					                    editor.putString(ID, empIdShared);
 | 
				
			||||||
 | 
					                    editor.commit();
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    throw new RuntimeException(e);
 | 
				
			||||||
 | 
					                }*/
 | 
				
			||||||
 | 
					                loading.dismiss();
 | 
				
			||||||
 | 
					                Toast.makeText(LoginActivityNew.this, "Data added to API", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                Intent intent = new Intent(LoginActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        /*JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new com.android.volley.Response.Listener<JSONObject>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(JSONObject response) {
 | 
				
			||||||
 | 
					                // inside the on response method.
 | 
				
			||||||
 | 
					                // we are hiding our progress bar.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                try {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    String _employeeid = response.getString("_employeeid");
 | 
				
			||||||
 | 
					                    String _employeename = response.getString("_employeename");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } catch (JSONException e) {
 | 
				
			||||||
 | 
					                    // if we do not extract data from json object properly.
 | 
				
			||||||
 | 
					                    // below line of code is use to handle json exception
 | 
				
			||||||
 | 
					                    e.printStackTrace();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }*/
 | 
				
			||||||
 | 
					    }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					        @Override
 | 
				
			||||||
 | 
					        public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					//                    Log.d("error-=>",error.getMessage());
 | 
				
			||||||
 | 
					            Toast.makeText(LoginActivityNew.this, "Fail to get response = " + error.getMessage(), Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					            System.out.println("Error message: "+ error.getMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        @Override
 | 
				
			||||||
 | 
					        protected Map<String, String> getParams() throws AuthFailureError {
 | 
				
			||||||
 | 
					        HashMap<String,String>map=new HashMap<>();
 | 
				
			||||||
 | 
					        map.put("username","demouser1");
 | 
				
			||||||
 | 
					        map.put("password","123");
 | 
				
			||||||
 | 
					        map.put("imei","string");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return map;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					                    Volley.newRequestQueue(LoginActivityNew.this).add(stringRequest);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -2,7 +2,9 @@ package ru.visionlab.femdemo.register;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import android.Manifest;
 | 
					import android.Manifest;
 | 
				
			||||||
import android.annotation.SuppressLint;
 | 
					import android.annotation.SuppressLint;
 | 
				
			||||||
 | 
					import android.content.Context;
 | 
				
			||||||
import android.content.Intent;
 | 
					import android.content.Intent;
 | 
				
			||||||
 | 
					import android.content.SharedPreferences;
 | 
				
			||||||
import android.graphics.Bitmap;
 | 
					import android.graphics.Bitmap;
 | 
				
			||||||
import android.media.MediaScannerConnection;
 | 
					import android.media.MediaScannerConnection;
 | 
				
			||||||
import android.net.Uri;
 | 
					import android.net.Uri;
 | 
				
			||||||
@ -23,6 +25,8 @@ import android.widget.Toast;
 | 
				
			|||||||
import androidx.annotation.Nullable;
 | 
					import androidx.annotation.Nullable;
 | 
				
			||||||
import androidx.appcompat.app.ActionBar;
 | 
					import androidx.appcompat.app.ActionBar;
 | 
				
			||||||
import androidx.appcompat.widget.Toolbar;
 | 
					import androidx.appcompat.widget.Toolbar;
 | 
				
			||||||
 | 
					import androidx.fragment.app.Fragment;
 | 
				
			||||||
 | 
					import androidx.fragment.app.FragmentManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.tbruyelle.rxpermissions.RxPermissions;
 | 
					import com.tbruyelle.rxpermissions.RxPermissions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -30,11 +34,15 @@ import java.io.ByteArrayOutputStream;
 | 
				
			|||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
import java.io.FileOutputStream;
 | 
					import java.io.FileOutputStream;
 | 
				
			||||||
import java.net.SocketException;
 | 
					import java.net.SocketException;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.inject.Inject;
 | 
					import javax.inject.Inject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import butterknife.BindView;
 | 
					import butterknife.BindView;
 | 
				
			||||||
 | 
					import cn.pedant.SweetAlert.SweetAlertDialog;
 | 
				
			||||||
import ru.PreferenceManager.PreferenceManager;
 | 
					import ru.PreferenceManager.PreferenceManager;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.CheckInActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.Config;
 | 
				
			||||||
import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
					import ru.visionlab.femdemo.Core.PhotoProcessor;
 | 
				
			||||||
import ru.visionlab.femdemo.App;
 | 
					import ru.visionlab.femdemo.App;
 | 
				
			||||||
import ru.visionlab.femdemo.BuildConfig;
 | 
					import ru.visionlab.femdemo.BuildConfig;
 | 
				
			||||||
@ -46,14 +54,22 @@ import ru.visionlab.femdemo.api.RegisterApiImplLuna2;
 | 
				
			|||||||
import ru.visionlab.femdemo.api.RegisterApiImplLocal;
 | 
					import ru.visionlab.femdemo.api.RegisterApiImplLocal;
 | 
				
			||||||
import ru.visionlab.femdemo.api.RegisterApiInterface;
 | 
					import ru.visionlab.femdemo.api.RegisterApiInterface;
 | 
				
			||||||
import ru.visionlab.femdemo.api.VLApi;
 | 
					import ru.visionlab.femdemo.api.VLApi;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VerifyApiImplLuna2;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VerifyApiImplLunaLocal;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.api.VerifyApiInterface;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.authentication.AuthSuccessActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.authentication.AuthenticationActivity;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.authentication.FaceNotRecognizedFragment;
 | 
				
			||||||
import ru.visionlab.femdemo.base.PhotoFragment;
 | 
					import ru.visionlab.femdemo.base.PhotoFragment;
 | 
				
			||||||
import ru.visionlab.femdemo.base.ToolbarActivity;
 | 
					import ru.visionlab.femdemo.base.ToolbarActivity;
 | 
				
			||||||
import ru.visionlab.femdemo.login.LoginActivity;
 | 
					import ru.visionlab.femdemo.login.LoginActivity;
 | 
				
			||||||
import ru.visionlab.femdemo.login.LoginActivityNew;
 | 
					import ru.visionlab.femdemo.login.LoginActivityNew;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.models.SearchResult;
 | 
				
			||||||
 | 
					import ru.visionlab.femdemo.models.SearchResultPerson;
 | 
				
			||||||
import ru.visionlab.femdemo.settings.VLPreferences;
 | 
					import ru.visionlab.femdemo.settings.VLPreferences;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class RegisterActivity extends ToolbarActivity implements RegisterFragment.Listener, PhotoFragment.Listener,
 | 
					public class RegisterActivity extends ToolbarActivity implements RegisterFragment.Listener, PhotoFragment.Listener,
 | 
				
			||||||
        SavePhotoFragment.Listener, FaceNotFoundFragment.Listener, RegisterApiInterface.Listener{
 | 
					        SavePhotoFragment.Listener, FaceNotFoundFragment.Listener, RegisterApiInterface.Listener,VerifyApiInterface.Listener,FaceNotRecognizedFragment.Listener{
 | 
				
			||||||
    public static final String REGISTER_FRAGMENT = "REGISTER FRAGMENT";
 | 
					    public static final String REGISTER_FRAGMENT = "REGISTER FRAGMENT";
 | 
				
			||||||
    public static final String PHOTO_FRAGMENT = "PHOTO_FRAGMENT";
 | 
					    public static final String PHOTO_FRAGMENT = "PHOTO_FRAGMENT";
 | 
				
			||||||
    public static final String SAVE_PHOTO_FRAGMENT = "SAVE PHOTO FRAGMENT";
 | 
					    public static final String SAVE_PHOTO_FRAGMENT = "SAVE PHOTO FRAGMENT";
 | 
				
			||||||
@ -91,6 +107,17 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
    Bitmap photo2=null;
 | 
					    Bitmap photo2=null;
 | 
				
			||||||
    Button save,retry;
 | 
					    Button save,retry;
 | 
				
			||||||
    String encodedImage="";
 | 
					    String encodedImage="";
 | 
				
			||||||
 | 
					    boolean fromLoginPage,FromNewCheck,checkinButton;
 | 
				
			||||||
 | 
					    private PhotoFragment fragment;
 | 
				
			||||||
 | 
					    String login;
 | 
				
			||||||
 | 
					    private long verifEndTime;
 | 
				
			||||||
 | 
					    private long verifStartTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private int faceFailCount;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private boolean goingSomewhere = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String valueFromApiCheckIn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -103,7 +130,26 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //ButterKnife.bind(this);
 | 
					        //ButterKnife.bind(this);
 | 
				
			||||||
        setToolbar();
 | 
					        setToolbar();
 | 
				
			||||||
        showRegisterScreen();
 | 
					
 | 
				
			||||||
 | 
					        SharedPreferences sharedPreferences = getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
 | 
				
			||||||
 | 
					        String login = sharedPreferences.getString("login","");
 | 
				
			||||||
 | 
					        String Descriptor = sharedPreferences.getString("Descriptor","");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        System.out.println("Value of login and Descriptor " + preferences.getUsername()+" ");
 | 
				
			||||||
 | 
					        Intent intent = getIntent();
 | 
				
			||||||
 | 
					        fromLoginPage = intent.getBooleanExtra("FromLoginPage",true);
 | 
				
			||||||
 | 
					        checkinButton = intent.getBooleanExtra("checkinButton",false);
 | 
				
			||||||
 | 
					        valueFromApiCheckIn = intent.getStringExtra("valueFromApiCheckIn");
 | 
				
			||||||
 | 
					        System.out.println("Value of FromLoginPage "+fromLoginPage + checkinButton + " "+ valueFromApiCheckIn);
 | 
				
			||||||
 | 
					        if(fromLoginPage){
 | 
				
			||||||
 | 
					            showPhotoScreen();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else {
 | 
				
			||||||
 | 
					            showRegisterScreen();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        FromNewCheck = intent.getBooleanExtra("FromLoginPage",false);
 | 
				
			||||||
 | 
					        System.out.println("Value of FromNewCheck "+FromNewCheck);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /*back_img.setOnClickListener(new View.OnClickListener() {
 | 
					        /*back_img.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
@ -219,6 +265,7 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void showRegisterScreen() {
 | 
					    private void showRegisterScreen() {
 | 
				
			||||||
 | 
					        Log.i("Route", "showRegisterScreen");
 | 
				
			||||||
        final RegisterFragment fragment = RegisterFragment.newInstance();
 | 
					        final RegisterFragment fragment = RegisterFragment.newInstance();
 | 
				
			||||||
        fragment.setListener(this);
 | 
					        fragment.setListener(this);
 | 
				
			||||||
        getSupportFragmentManager()
 | 
					        getSupportFragmentManager()
 | 
				
			||||||
@ -250,9 +297,12 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onSignUpClick(RegistrationModel registrationModel) {
 | 
					    public void onSignUpClick(RegistrationModel registrationModel) {
 | 
				
			||||||
 | 
					        Log.i("Route", "onSignUpClick");
 | 
				
			||||||
        if((!BuildConfig.IS_OFFLINE_VERSION) && preferences.getLuna2()) {
 | 
					        if((!BuildConfig.IS_OFFLINE_VERSION) && preferences.getLuna2()) {
 | 
				
			||||||
            thread = new Thread(() -> {
 | 
					            thread = new Thread(() -> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Storage.getInstance().updateDatabase(preferences.getLuna2Server(), preferences.getEncodedUserData(), api, preferences.getServerChanged());
 | 
					                Storage.getInstance().updateDatabase(preferences.getLuna2Server(), preferences.getEncodedUserData(), api, preferences.getServerChanged());
 | 
				
			||||||
 | 
					                Log.i("Route", "updateDatabase");
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            thread.start();
 | 
					            thread.start();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -262,14 +312,15 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void showPhotoScreen() {
 | 
					    private void showPhotoScreen() {
 | 
				
			||||||
        final PhotoFragment fragment = PhotoFragment.newInstance();
 | 
					        Log.i("Route", "showPhotoScreen");
 | 
				
			||||||
 | 
					        fragment = PhotoFragment.newInstance();
 | 
				
			||||||
        fragment.setPhotoProcessor(photoProcessor);
 | 
					        fragment.setPhotoProcessor(photoProcessor);
 | 
				
			||||||
        fragment.setListener(this);
 | 
					        fragment.setListener(this);
 | 
				
			||||||
        fragment.enableLivenessCheck(false);
 | 
					        fragment.enableLivenessCheck(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        preferences.setStartTime(String.valueOf(System.currentTimeMillis()));
 | 
					        preferences.setStartTime(String.valueOf(System.currentTimeMillis()));
 | 
				
			||||||
        preferences.setNeedPortrait(false);
 | 
					        preferences.setNeedPortrait(false);
 | 
				
			||||||
        System.out.println("Inside photo screen");
 | 
					        System.out.println("Inside photo screen method");
 | 
				
			||||||
        getSupportFragmentManager()
 | 
					        getSupportFragmentManager()
 | 
				
			||||||
                .beginTransaction()
 | 
					                .beginTransaction()
 | 
				
			||||||
                .replace(R.id.container, fragment, PHOTO_FRAGMENT)
 | 
					                .replace(R.id.container, fragment, PHOTO_FRAGMENT)
 | 
				
			||||||
@ -278,6 +329,7 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void showPhotoReadyScreen(Bitmap bitmap) {
 | 
					    private void showPhotoReadyScreen(Bitmap bitmap) {
 | 
				
			||||||
 | 
					        Log.i("Route", "showPhotoReadyScreen");
 | 
				
			||||||
        final SavePhotoFragment fragment = SavePhotoFragment.newInstance();
 | 
					        final SavePhotoFragment fragment = SavePhotoFragment.newInstance();
 | 
				
			||||||
        fragment.setPhoto(bitmap);
 | 
					        fragment.setPhoto(bitmap);
 | 
				
			||||||
        fragment.setListener(this);
 | 
					        fragment.setListener(this);
 | 
				
			||||||
@ -286,14 +338,43 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
                .replace(R.id.container, fragment, SAVE_PHOTO_FRAGMENT)
 | 
					                .replace(R.id.container, fragment, SAVE_PHOTO_FRAGMENT)
 | 
				
			||||||
                .addToBackStack(fragment.toString())
 | 
					                .addToBackStack(fragment.toString())
 | 
				
			||||||
                .commit();
 | 
					                .commit();
 | 
				
			||||||
 | 
					        System.out.println("Inside save photo screen method");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onBestFrameReady(Bitmap bitmap) {
 | 
					    public void onBestFrameReady(Bitmap bitmap) {
 | 
				
			||||||
 | 
					        Log.i("Route", "onBestFrameReady");
 | 
				
			||||||
        this.bitmap = bitmap;
 | 
					        this.bitmap = bitmap;
 | 
				
			||||||
 | 
					        if(fromLoginPage){
 | 
				
			||||||
 | 
					            verifyPhoto(bitmap);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        showPhotoReadyScreen(bitmap);
 | 
					        showPhotoReadyScreen(bitmap);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void verifyPhoto(Bitmap bitmap){
 | 
				
			||||||
 | 
					        Log.i("Route", "verifyPhoto fromLoginPage");
 | 
				
			||||||
 | 
					        fragment.showWaitState();
 | 
				
			||||||
 | 
					        login=preferences.getUsername();
 | 
				
			||||||
 | 
					        System.out.println("Value of login while verification " + login);
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            if (thread != null)
 | 
				
			||||||
 | 
					                thread.join();
 | 
				
			||||||
 | 
					        }catch (InterruptedException e) {
 | 
				
			||||||
 | 
					            e.printStackTrace();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        VerifyApiInterface verifyApi;
 | 
				
			||||||
 | 
					        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					            Log.i("Route", "VerifyApiInterface");
 | 
				
			||||||
 | 
					            verifyApi = new VerifyApiImplLunaLocal(this, photoProcessor, login, this);
 | 
				
			||||||
 | 
					        } else { //if (preferences.getLuna2()) {
 | 
				
			||||||
 | 
					            Log.i("LUNA2 ", preferences.getLuna2Server());
 | 
				
			||||||
 | 
					            verifyApi = new VerifyApiImplLuna2(this, preferences.getLuna2Server(), login, api, this, bitmap, preferences.getEncodedUserData());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        verifStartTime = System.nanoTime();
 | 
				
			||||||
 | 
					        verifyApi.verifyPerson();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onTimeout(FaceNotFoundFragment.Reason reason) {
 | 
					    public void onTimeout(FaceNotFoundFragment.Reason reason) {
 | 
				
			||||||
        final FaceNotFoundFragment fragment = FaceNotFoundFragment.newInstance();
 | 
					        final FaceNotFoundFragment fragment = FaceNotFoundFragment.newInstance();
 | 
				
			||||||
@ -343,6 +424,7 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void registerPerson() {
 | 
					    private void registerPerson() {
 | 
				
			||||||
 | 
					        Log.i("Route", "registerPerson");
 | 
				
			||||||
        RegisterApiInterface registerApi;
 | 
					        RegisterApiInterface registerApi;
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            if (thread != null) {
 | 
					            if (thread != null) {
 | 
				
			||||||
@ -354,6 +436,7 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
					        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
            registerApi = new RegisterApiImplLocal(this, registrationModel, photoProcessor, this, bitmap);
 | 
					            registerApi = new RegisterApiImplLocal(this, registrationModel, photoProcessor, this, bitmap);
 | 
				
			||||||
 | 
					            Log.i("Route", "registerPerson registerApi");
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            registerApi = new RegisterApiImplLuna2(this, preferences.getLuna2Server(), registrationModel, api, locationHelper, this, bitmap, preferences.getEncodedUserData());
 | 
					            registerApi = new RegisterApiImplLuna2(this, preferences.getLuna2Server(), registrationModel, api, locationHelper, this, bitmap, preferences.getEncodedUserData());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -467,4 +550,128 @@ public class RegisterActivity extends ToolbarActivity implements RegisterFragmen
 | 
				
			|||||||
        startActivity(intent);
 | 
					        startActivity(intent);
 | 
				
			||||||
        finish();
 | 
					        finish();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onVerificationSuccess(SearchResult searchResult) {
 | 
				
			||||||
 | 
					        verifEndTime = System.nanoTime();
 | 
				
			||||||
 | 
					        preferences.setServerChanged(false);
 | 
				
			||||||
 | 
					        final List<SearchResultPerson> persons = searchResult.getPersons();
 | 
				
			||||||
 | 
					        if (persons != null && !persons.isEmpty()) {
 | 
				
			||||||
 | 
					            final SearchResultPerson person = persons.get(0);
 | 
				
			||||||
 | 
					            if (person.similarity > Config.MIN_SIMILARITY) {
 | 
				
			||||||
 | 
					                onFaceAuthSuccess();
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                onFaceAuthFail(AuthenticationActivity.AuthFailReason.SIMILARITY);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            onFaceAuthFail(AuthenticationActivity.AuthFailReason.SIMILARITY);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void onVerificationFail(Throwable throwable) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void onFaceAuthSuccess() {
 | 
				
			||||||
 | 
					        showSuccess();
 | 
				
			||||||
 | 
					        /*if (preferences.getFingerAuth()) {
 | 
				
			||||||
 | 
					            onFingerClick(finger);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            showSuccess();
 | 
				
			||||||
 | 
					        }*/
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    private void showSuccess() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        final Intent intent = new Intent(RegisterActivity.this, CheckInActivity.class);
 | 
				
			||||||
 | 
					        intent.putExtra(AuthSuccessActivity.LOGIN, login);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        System.out.println("login value "+ login);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					            intent.putExtra(AuthSuccessActivity.TIME, (int) (((double) (verifEndTime - verifStartTime)) / 1e6));
 | 
				
			||||||
 | 
					            intent.putExtra("FromRegister", true);
 | 
				
			||||||
 | 
					            intent.putExtra("checkinButtonFromRegister", true);
 | 
				
			||||||
 | 
					            intent.putExtra("valueFromApiCheckIn", valueFromApiCheckIn);
 | 
				
			||||||
 | 
					            intent.putExtra("UserName", login);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        finish();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*if (checkinButton) {
 | 
				
			||||||
 | 
					            final Intent intent = new Intent(RegisterActivity.this, CheckInActivity.class);
 | 
				
			||||||
 | 
					            intent.putExtra(AuthSuccessActivity.LOGIN, login);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					                intent.putExtra(AuthSuccessActivity.TIME, (int) (((double) (verifEndTime - verifStartTime)) / 1e6));
 | 
				
			||||||
 | 
					                intent.putExtra("FromRegister", true);
 | 
				
			||||||
 | 
					                intent.putExtra("checkinButtonFromRegister", true);
 | 
				
			||||||
 | 
					                intent.putExtra("valueFromApiCheckIn", valueFromApiCheckIn);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            finish();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else{
 | 
				
			||||||
 | 
					            final Intent intent = new Intent(RegisterActivity.this, CheckInActivity.class);
 | 
				
			||||||
 | 
					            intent.putExtra(AuthSuccessActivity.LOGIN, login);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (BuildConfig.IS_OFFLINE_VERSION) {
 | 
				
			||||||
 | 
					                intent.putExtra(AuthSuccessActivity.TIME, (int) (((double) (verifEndTime - verifStartTime)) / 1e6));
 | 
				
			||||||
 | 
					                intent.putExtra("FromRegister", false);
 | 
				
			||||||
 | 
					                intent.putExtra("checkinButtonFromRegister", false);
 | 
				
			||||||
 | 
					                intent.putExtra("valueFromApiCheckIn", valueFromApiCheckIn);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            finish();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void onFaceAuthFail(AuthenticationActivity.AuthFailReason reason) {
 | 
				
			||||||
 | 
					        System.out.println("Root fail");
 | 
				
			||||||
 | 
					        if (faceFailCount < 4) {
 | 
				
			||||||
 | 
					            final FaceNotRecognizedFragment fragment = FaceNotRecognizedFragment.newInstance();
 | 
				
			||||||
 | 
					            fragment.setListener(this);
 | 
				
			||||||
 | 
					            if (reason == AuthenticationActivity.AuthFailReason.SIMILARITY && BuildConfig.IS_OFFLINE_VERSION)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                fragment.setVerificationTime((int)((double)(verifEndTime - verifStartTime) / 1e6));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            fragment.setFailReason(reason);
 | 
				
			||||||
 | 
					            showFragment(fragment);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            showFail();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showFail() {
 | 
				
			||||||
 | 
					        Toast.makeText(this, R.string.access_denied, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					        finish();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void showFragment(Fragment fragment) {
 | 
				
			||||||
 | 
					        final FragmentManager fragmentManager = getSupportFragmentManager();
 | 
				
			||||||
 | 
					        if (fragmentManager.findFragmentByTag(fragment.toString()) == null) {
 | 
				
			||||||
 | 
					            if (!goingSomewhere) {
 | 
				
			||||||
 | 
					                goingSomewhere = true;
 | 
				
			||||||
 | 
					                fragmentManager
 | 
				
			||||||
 | 
					                        .beginTransaction()
 | 
				
			||||||
 | 
					                        .replace(R.id.container, fragment, fragment.toString())
 | 
				
			||||||
 | 
					                        .commit();
 | 
				
			||||||
 | 
					                goingSomewhere = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -9,8 +9,20 @@ import android.view.View;
 | 
				
			|||||||
import android.widget.Button;
 | 
					import android.widget.Button;
 | 
				
			||||||
import android.widget.EditText;
 | 
					import android.widget.EditText;
 | 
				
			||||||
import android.widget.ImageButton;
 | 
					import android.widget.ImageButton;
 | 
				
			||||||
 | 
					import android.widget.TextView;
 | 
				
			||||||
import android.widget.Toast;
 | 
					import android.widget.Toast;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.android.volley.AuthFailureError;
 | 
				
			||||||
 | 
					import com.android.volley.DefaultRetryPolicy;
 | 
				
			||||||
 | 
					import com.android.volley.Request;
 | 
				
			||||||
 | 
					import com.android.volley.RequestQueue;
 | 
				
			||||||
 | 
					import com.android.volley.VolleyError;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.BasicNetwork;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.DiskBasedCache;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.HurlStack;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.StringRequest;
 | 
				
			||||||
 | 
					import com.android.volley.toolbox.Volley;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.json.JSONException;
 | 
					import org.json.JSONException;
 | 
				
			||||||
import org.json.JSONObject;
 | 
					import org.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -42,7 +54,10 @@ public class RegisterActivityNew extends AppCompatActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    JsonPlaceHolderApi jsonPlaceHolderApi;
 | 
					    JsonPlaceHolderApi jsonPlaceHolderApi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Button verifynproceed;
 | 
					    Button verifynproceed,face;
 | 
				
			||||||
 | 
					    TextView skip;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
					    protected void onCreate(Bundle savedInstanceState) {
 | 
				
			||||||
@ -57,18 +72,41 @@ public class RegisterActivityNew extends AppCompatActivity {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        verifynproceed = findViewById(R.id.verifynproceed);
 | 
					        verifynproceed = findViewById(R.id.verifynproceed);
 | 
				
			||||||
 | 
					        verifynproceed.setEnabled(true);
 | 
				
			||||||
        verifynproceed.setOnClickListener(new View.OnClickListener() {
 | 
					        verifynproceed.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onClick(View view) {
 | 
					            public void onClick(View view) {
 | 
				
			||||||
                isAllFieldsChecked = CheckAllFields();
 | 
					
 | 
				
			||||||
 | 
					                Intent intent = new Intent(RegisterActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("FromLoginPage",false);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					                /*isAllFieldsChecked = CheckAllFields();
 | 
				
			||||||
                if(isAllFieldsChecked) {
 | 
					                if(isAllFieldsChecked) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    Intent intent = new Intent(RegisterActivityNew.this, RegisterActivity.class);
 | 
					                    Intent intent = new Intent(RegisterActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                    intent.putExtra("FromLoginPage",false);
 | 
				
			||||||
                    startActivity(intent);
 | 
					                    startActivity(intent);
 | 
				
			||||||
                    //saveInfo();
 | 
					                    //saveInfo();
 | 
				
			||||||
                }
 | 
					                    //savaData();
 | 
				
			||||||
 | 
					                }*/
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        skip = findViewById(R.id.skip);
 | 
				
			||||||
 | 
					        skip.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onClick(View view) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                Intent intent = new Intent(RegisterActivityNew.this, RegisterActivity.class);
 | 
				
			||||||
 | 
					                intent.putExtra("FromLoginPage",false);
 | 
				
			||||||
 | 
					                startActivity(intent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        back_img = findViewById(R.id.back_img);
 | 
					        back_img = findViewById(R.id.back_img);
 | 
				
			||||||
        back_img.setOnClickListener(new View.OnClickListener() {
 | 
					        back_img.setOnClickListener(new View.OnClickListener() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
@ -79,12 +117,12 @@ public class RegisterActivityNew extends AppCompatActivity {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
                                                                                                                                                                                     public void createRetrofit(){
 | 
					                                                                                                                                                                                     public void createRetrofit(){
 | 
				
			||||||
        Retrofit retrofit=new Retrofit.Builder()
 | 
					        /*Retrofit retrofit=new Retrofit.Builder()
 | 
				
			||||||
                .baseUrl("http://huaiglobal.com/api/")
 | 
					                .baseUrl("http://huaiglobal.com/api/")
 | 
				
			||||||
                .addConverterFactory(GsonConverterFactory.create())
 | 
					                .addConverterFactory(GsonConverterFactory.create())
 | 
				
			||||||
                .build();
 | 
					                .build();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        jsonPlaceHolderApi=retrofit.create(JsonPlaceHolderApi.class);
 | 
					        jsonPlaceHolderApi=retrofit.create(JsonPlaceHolderApi.class);*/
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -113,25 +151,34 @@ public class RegisterActivityNew extends AppCompatActivity {
 | 
				
			|||||||
        fields.put("employeeId",edt_emp.getText().toString());
 | 
					        fields.put("employeeId",edt_emp.getText().toString());
 | 
				
			||||||
        fields.put("otp",edt_otp.getText().toString());
 | 
					        fields.put("otp",edt_otp.getText().toString());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       /* RegistrationNew registrationNew = new RegistrationNew(edt_comp.getText().toString(),edt_emp.getText().toString(),edt_otp.getText().toString());
 | 
					
 | 
				
			||||||
        System.out.println("Value of registrationNew "  );*/
 | 
					        Retrofit retrofit=new Retrofit.Builder()
 | 
				
			||||||
        CallApiService.getClient().createpost(fields);
 | 
					                .baseUrl("http://huaiglobal.com/api/services/app/Account/RegisterLunaEmployee")
 | 
				
			||||||
        Call<RegistrationNew> call=jsonPlaceHolderApi.createpost(fields);
 | 
					                .addConverterFactory(GsonConverterFactory.create())
 | 
				
			||||||
 | 
					                .build();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jsonPlaceHolderApi=retrofit.create(JsonPlaceHolderApi.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        RegistrationNew registrationNew = new RegistrationNew(edt_comp.getText().toString(),edt_emp.getText().toString(),edt_otp.getText().toString());
 | 
				
			||||||
 | 
					        System.out.println("Value of registrationNew "  );
 | 
				
			||||||
 | 
					        //CallApiService.getClient().createpost(fields);
 | 
				
			||||||
 | 
					        Call<RegistrationNew> call=jsonPlaceHolderApi.createpost(registrationNew);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        call.enqueue(new Callback<RegistrationNew>() {
 | 
					        call.enqueue(new Callback<RegistrationNew>() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onResponse(Call<RegistrationNew> call, Response<RegistrationNew> response) {
 | 
					            public void onResponse(Call<RegistrationNew> call, Response<RegistrationNew> response) {
 | 
				
			||||||
                if(response.isSuccessful()) {
 | 
					                if(response.isSuccessful()) {
 | 
				
			||||||
                    Log.e("register code=", String.valueOf(response.code()));
 | 
					                    Log.e("register code=", String.valueOf(response.code()));
 | 
				
			||||||
                    Toast.makeText(RegisterActivityNew.this, "User Added succesfully", Toast.LENGTH_SHORT).show();
 | 
					                    Toast.makeText(RegisterActivityNew.this, "User Added successfully", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
                    Intent intent = new Intent(RegisterActivityNew.this, RegisterFragment.class);
 | 
					                    /*Intent intent = new Intent(RegisterActivityNew.this, RegisterFragment.class);
 | 
				
			||||||
                    startActivity(intent);
 | 
					                    startActivity(intent);*/
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                else{
 | 
					                else{
 | 
				
			||||||
                    Log.e("else part register code=", String.valueOf(response.code()));
 | 
					                    Log.e("else part register code=", String.valueOf(response.code()));
 | 
				
			||||||
                    Intent intent = new Intent(RegisterActivityNew.this, RegisterFragment.class);
 | 
					                    /*Intent intent = new Intent(getApplicationContext(), RegisterFragment.class);
 | 
				
			||||||
                    startActivity(intent);
 | 
					                    startActivity(intent);*/
 | 
				
			||||||
 | 
					                    System.out.println("Response code: "+response.code());
 | 
				
			||||||
                    Toast.makeText(RegisterActivityNew.this, "Current user did not login to the application!", Toast.LENGTH_SHORT).show();
 | 
					                    Toast.makeText(RegisterActivityNew.this, "Current user did not login to the application!", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -145,4 +192,63 @@ public class RegisterActivityNew extends AppCompatActivity {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    public void savaData(){
 | 
				
			||||||
 | 
					        System.out.println("Inside save info");
 | 
				
			||||||
 | 
					        String url = "http://huaiglobal.com/api/services/app/Account/RegisterLunaEmployee"; // Replace with your API endpoint URL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        RequestQueue queue = Volley.newRequestQueue(RegisterActivityNew.this);
 | 
				
			||||||
 | 
					        StringRequest request = new StringRequest(Request.Method.POST, url, new com.android.volley.Response.Listener<String>() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onResponse(String response) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // on below line we are displaying a success toast message.
 | 
				
			||||||
 | 
					                Toast.makeText(RegisterActivityNew.this, "Data added to API", Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }, new com.android.volley.Response.ErrorListener() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public void onErrorResponse(VolleyError error) {
 | 
				
			||||||
 | 
					                // method to handle errors.
 | 
				
			||||||
 | 
					                Toast.makeText(RegisterActivityNew.this, "Fail to get response = " + error, Toast.LENGTH_SHORT).show();
 | 
				
			||||||
 | 
					                System.out.println("Error: " + error);
 | 
				
			||||||
 | 
					                /*Intent intent = new Intent(RegisterActivityNew.this, RegisterFragment.class);
 | 
				
			||||||
 | 
					                    startActivity(intent);*/
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }) {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            protected Map<String, String> getParams() {
 | 
				
			||||||
 | 
					                // below line we are creating a map for
 | 
				
			||||||
 | 
					                // storing our values in key and value pair.
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // on below line we are passing our key
 | 
				
			||||||
 | 
					                // and value pair to our parameters.
 | 
				
			||||||
 | 
					                params.put("companyCode", edt_comp.getText().toString());
 | 
				
			||||||
 | 
					                params.put("employeeCode", edt_emp.getText().toString());
 | 
				
			||||||
 | 
					                params.put("otp", edt_otp.getText().toString());
 | 
				
			||||||
 | 
					                System.out.println("Data input: "+ edt_comp.getText().toString() + " " +edt_emp.getText().toString() +" "+ edt_otp.getText().toString());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // at last we are
 | 
				
			||||||
 | 
					                // returning our params.
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            /*@Override
 | 
				
			||||||
 | 
					            public Map<String, String> getHeaders() throws AuthFailureError {
 | 
				
			||||||
 | 
					                Map<String, String> params = new HashMap<String, String>();
 | 
				
			||||||
 | 
					                params.put("Authorization", "bearer "+"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjUiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9lbWFpbGFkZHJlc3MiOiJkYXNzYW5kaXBAc2VudGllbnRnZWVrcy5jb20iLCJBc3BOZXQuSWRlbnRpdHkuU2VjdXJpdHlTdGFtcCI6IjdFR1lVNFRBU1BUS05BREIzVEtHM0ZQNzdFQ1AzVjNBIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJodHRwOi8vd3d3LmFzcG5ldGJvaWxlcnBsYXRlLmNvbS9pZGVudGl0eS9jbGFpbXMvdGVuYW50SWQiOiI0Iiwic3ViIjoiNSIsImp0aSI6IjYwOTFhMTgwLTkzMWItNGYwMS05ZWVjLTM3OTNkYmExMjkxYiIsImlhdCI6MTY5Mzg5OTk1NCwidG9rZW5fdmFsaWRpdHlfa2V5IjoiMzM3ZjAzMmEtN2I3NS00MTkzLWFhY2QtYjA3OWEyYjYxMjI0IiwidXNlcl9pZGVudGlmaWVyIjoiNUA0IiwidG9rZW5fdHlwZSI6IjAiLCJyZWZyZXNoX3Rva2VuX3ZhbGlkaXR5X2tleSI6Ijg1MTlmMjU3LWE3NmEtNDViOS05MDQ0LTU4ZTk0ZThhZTEwZSIsIm5iZiI6MTY5Mzg5OTk1NCwiZXhwIjoxNjkzOTg2MzU0LCJpc3MiOiJtdWx0aSIsImF1ZCI6Im11bHRpIn0.ImuWLPg85b7fN1nWzr1Es1L9j6xm7DrK4L_UxApzkqM");
 | 
				
			||||||
 | 
					                return params;
 | 
				
			||||||
 | 
					            }*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public Map<String, String> getHeaders() throws AuthFailureError {
 | 
				
			||||||
 | 
					                HashMap<String, String> headers = new HashMap<String, String>();
 | 
				
			||||||
 | 
					                headers.put("Content-Type", "application/json; charset=utf-8");
 | 
				
			||||||
 | 
					                return headers;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        queue.add(request);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -8,6 +8,7 @@ import android.text.Editable;
 | 
				
			|||||||
import android.text.InputType;
 | 
					import android.text.InputType;
 | 
				
			||||||
import android.text.TextUtils;
 | 
					import android.text.TextUtils;
 | 
				
			||||||
import android.text.method.PasswordTransformationMethod;
 | 
					import android.text.method.PasswordTransformationMethod;
 | 
				
			||||||
 | 
					import android.util.Log;
 | 
				
			||||||
import android.view.LayoutInflater;
 | 
					import android.view.LayoutInflater;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.view.ViewGroup;
 | 
					import android.view.ViewGroup;
 | 
				
			||||||
@ -57,6 +58,11 @@ public class RegisterFragment extends BaseFragment {
 | 
				
			|||||||
    TextInputLayout phoneWrapper;
 | 
					    TextInputLayout phoneWrapper;
 | 
				
			||||||
    Listener listener;
 | 
					    Listener listener;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @BindView(R.id.pass)
 | 
				
			||||||
 | 
					    EditText pass;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    String password="";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public RegisterFragment() {
 | 
					    public RegisterFragment() {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -115,6 +121,14 @@ public class RegisterFragment extends BaseFragment {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @OnClick(R.id.signUp)
 | 
					    @OnClick(R.id.signUp)
 | 
				
			||||||
    public void onClick() {
 | 
					    public void onClick() {
 | 
				
			||||||
 | 
					        Log.i("Route", "signUp");
 | 
				
			||||||
 | 
					        password = pass.getText().toString();
 | 
				
			||||||
 | 
					        if(password.equals("")){
 | 
				
			||||||
 | 
					            signUp.setEnabled(false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Utils.hideKeyboardRoutine(getContext(), getView());
 | 
					        Utils.hideKeyboardRoutine(getContext(), getView());
 | 
				
			||||||
        if (listener != null && validateFields(true, true)) {
 | 
					        if (listener != null && validateFields(true, true)) {
 | 
				
			||||||
            RegistrationModel registrationModel = new RegistrationModel();
 | 
					            RegistrationModel registrationModel = new RegistrationModel();
 | 
				
			||||||
@ -132,6 +146,7 @@ public class RegisterFragment extends BaseFragment {
 | 
				
			|||||||
        result = validateEmail(changeFocus, showError);
 | 
					        result = validateEmail(changeFocus, showError);
 | 
				
			||||||
        result = validateLogin(showError) && result;
 | 
					        result = validateLogin(showError) && result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        signUp.setEnabled(result);
 | 
					        signUp.setEnabled(result);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return result;
 | 
					        return result;
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,8 @@ import android.graphics.PorterDuff;
 | 
				
			|||||||
import android.os.Bundle;
 | 
					import android.os.Bundle;
 | 
				
			||||||
import androidx.annotation.Nullable;
 | 
					import androidx.annotation.Nullable;
 | 
				
			||||||
import androidx.core.content.ContextCompat;
 | 
					import androidx.core.content.ContextCompat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import android.util.Log;
 | 
				
			||||||
import android.view.LayoutInflater;
 | 
					import android.view.LayoutInflater;
 | 
				
			||||||
import android.view.View;
 | 
					import android.view.View;
 | 
				
			||||||
import android.view.ViewGroup;
 | 
					import android.view.ViewGroup;
 | 
				
			||||||
@ -81,6 +83,7 @@ public class SavePhotoFragment extends BaseFragment {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @OnClick({R.id.save})
 | 
					    @OnClick({R.id.save})
 | 
				
			||||||
    public void onClick() {
 | 
					    public void onClick() {
 | 
				
			||||||
 | 
					        Log.i("Route", "save onClick");
 | 
				
			||||||
        save.setEnabled(false);
 | 
					        save.setEnabled(false);
 | 
				
			||||||
        progressBar.setVisibility(View.VISIBLE);
 | 
					        progressBar.setVisibility(View.VISIBLE);
 | 
				
			||||||
        if (listener != null) {
 | 
					        if (listener != null) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,221 +0,0 @@
 | 
				
			|||||||
package ru.visionlab.femdemo.views;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import androidx.appcompat.app.AppCompatActivity;
 | 
					 | 
				
			||||||
import androidx.core.app.ActivityCompat;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import android.app.AlertDialog;
 | 
					 | 
				
			||||||
import android.content.Context;
 | 
					 | 
				
			||||||
import android.content.DialogInterface;
 | 
					 | 
				
			||||||
import android.content.Intent;
 | 
					 | 
				
			||||||
import android.content.pm.PackageManager;
 | 
					 | 
				
			||||||
import android.graphics.Color;
 | 
					 | 
				
			||||||
import android.graphics.drawable.ColorDrawable;
 | 
					 | 
				
			||||||
import android.location.Location;
 | 
					 | 
				
			||||||
import android.location.LocationManager;
 | 
					 | 
				
			||||||
import android.os.Bundle;
 | 
					 | 
				
			||||||
import android.provider.Settings;
 | 
					 | 
				
			||||||
import android.view.Gravity;
 | 
					 | 
				
			||||||
import android.view.LayoutInflater;
 | 
					 | 
				
			||||||
import android.view.View;
 | 
					 | 
				
			||||||
import android.view.WindowManager;
 | 
					 | 
				
			||||||
import android.widget.Button;
 | 
					 | 
				
			||||||
import android.widget.ImageView;
 | 
					 | 
				
			||||||
import android.widget.TextView;
 | 
					 | 
				
			||||||
import android.widget.Toast;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import cn.pedant.SweetAlert.SweetAlertDialog;
 | 
					 | 
				
			||||||
import ru.visionlab.femdemo.CheckInActivity;
 | 
					 | 
				
			||||||
import ru.visionlab.femdemo.R;
 | 
					 | 
				
			||||||
import ru.visionlab.femdemo.login.LoginActivity;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class EmployeeActivity extends AppCompatActivity {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private static  final int REQUEST_LOCATION=1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    TextView showLocationTxt;
 | 
					 | 
				
			||||||
    LocationManager locationManager;
 | 
					 | 
				
			||||||
    String latitude,longitude;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ImageView logout;
 | 
					 | 
				
			||||||
    ImageView menu;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
					 | 
				
			||||||
        super.onCreate(savedInstanceState);
 | 
					 | 
				
			||||||
        setContentView(R.layout.activity_employee);
 | 
					 | 
				
			||||||
        ActivityCompat.requestPermissions(this,new String[]
 | 
					 | 
				
			||||||
                {android.Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        showLocationTxt=findViewById(R.id.show_location);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        logout = findViewById(R.id.logout);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        locationManager=(LocationManager) getSystemService(Context.LOCATION_SERVICE);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        //Check gps is enable or not
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            //Write Function To enable gps
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            OnGPS();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            //GPS is already On then
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            getLocation();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        logout.setOnClickListener(new View.OnClickListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onClick(View view) {
 | 
					 | 
				
			||||||
                Intent intent = new Intent(EmployeeActivity.this, LoginActivity.class);
 | 
					 | 
				
			||||||
                startActivity(intent);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        menu = findViewById(R.id.menu);
 | 
					 | 
				
			||||||
        menu.setOnClickListener(new View.OnClickListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onClick(View view) {
 | 
					 | 
				
			||||||
                LayoutInflater inflater = LayoutInflater.from(getApplicationContext());
 | 
					 | 
				
			||||||
                view = inflater.inflate(R.layout.layout, null);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                TextView popup_log_out = view.findViewById(R.id.popup_log_out);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                popup_log_out.setOnClickListener(new View.OnClickListener() {
 | 
					 | 
				
			||||||
                    @Override
 | 
					 | 
				
			||||||
                    public void onClick(View view) {
 | 
					 | 
				
			||||||
                        Intent intent = new Intent(EmployeeActivity.this, LoginActivity.class);
 | 
					 | 
				
			||||||
                        startActivity(intent);
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                final AlertDialog alertDialog = new AlertDialog.Builder(EmployeeActivity.this)
 | 
					 | 
				
			||||||
                        .setView(view)
 | 
					 | 
				
			||||||
                        .create();
 | 
					 | 
				
			||||||
                alertDialog.show();
 | 
					 | 
				
			||||||
                alertDialog.getWindow().setLayout(600,460);
 | 
					 | 
				
			||||||
                alertDialog.getWindow().setGravity(Gravity.TOP|Gravity.LEFT);
 | 
					 | 
				
			||||||
                alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                WindowManager.LayoutParams params = alertDialog.getWindow().getAttributes();
 | 
					 | 
				
			||||||
                alertDialog.setCanceledOnTouchOutside(true);
 | 
					 | 
				
			||||||
                params.horizontalMargin = -100;
 | 
					 | 
				
			||||||
                alertDialog.getWindow().setAttributes(params);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void getLocation() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        //Check Permissions again
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (ActivityCompat.checkSelfPermission(EmployeeActivity.this,android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(EmployeeActivity.this,
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                android.Manifest.permission.ACCESS_FINE_LOCATION) !=PackageManager.PERMISSION_GRANTED)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            ActivityCompat.requestPermissions(this,new String[]
 | 
					 | 
				
			||||||
                    {android.Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            Location LocationGps= locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
 | 
					 | 
				
			||||||
            Location LocationNetwork=locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
 | 
					 | 
				
			||||||
            Location LocationPassive=locationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (LocationGps !=null)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                double lat=LocationGps.getLatitude();
 | 
					 | 
				
			||||||
                double longi=LocationGps.getLongitude();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
                longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
                System.out.println("Position 1");
 | 
					 | 
				
			||||||
                showLocationTxt.setText("Your Location:"+"\n"+"Latitude= "+latitude+"\n"+"Longitude= "+longitude);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else if (LocationNetwork !=null)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                double lat=LocationNetwork.getLatitude();
 | 
					 | 
				
			||||||
                double longi=LocationNetwork.getLongitude();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                double newLat = 22.5135;
 | 
					 | 
				
			||||||
                double newLong = 88.4029;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                float[] results = new float[1];
 | 
					 | 
				
			||||||
                Location.distanceBetween(lat,longi,newLat,newLong,results);
 | 
					 | 
				
			||||||
                float distance = results[0];
 | 
					 | 
				
			||||||
                Toast.makeText(this,String.valueOf(distance)+" metres from location",Toast.LENGTH_LONG).show();
 | 
					 | 
				
			||||||
                if(distance > 400){
 | 
					 | 
				
			||||||
                    moreThanFour();
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                else{
 | 
					 | 
				
			||||||
                    lessThanFour();
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
                longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
                System.out.println("Position 2");
 | 
					 | 
				
			||||||
                showLocationTxt.setText("Your Location:"+"\n"+"Latitude= "+latitude+"\n"+"Longitude= "+longitude);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else if (LocationPassive !=null)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                double lat=LocationPassive.getLatitude();
 | 
					 | 
				
			||||||
                double longi=LocationPassive.getLongitude();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                latitude=String.valueOf(lat);
 | 
					 | 
				
			||||||
                longitude=String.valueOf(longi);
 | 
					 | 
				
			||||||
                System.out.println("Position 3");
 | 
					 | 
				
			||||||
                showLocationTxt.setText("Your Location:"+"\n"+"Latitude= "+latitude+"\n"+"Longitude= "+longitude);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                Toast.makeText(this, "Can't Get Your Location", Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void OnGPS() {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        final AlertDialog.Builder builder= new AlertDialog.Builder(this);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        builder.setMessage("Enable GPS").setCancelable(false).setPositiveButton("YES", new DialogInterface.OnClickListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onClick(DialogInterface dialog, int which) {
 | 
					 | 
				
			||||||
                startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }).setNegativeButton("NO", new DialogInterface.OnClickListener() {
 | 
					 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onClick(DialogInterface dialog, int which) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                dialog.cancel();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        final AlertDialog alertDialog=builder.create();
 | 
					 | 
				
			||||||
        alertDialog.show();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void moreThanFour(){
 | 
					 | 
				
			||||||
        new SweetAlertDialog(this, SweetAlertDialog.WARNING_TYPE)
 | 
					 | 
				
			||||||
                .setTitleText("Are you sure you are near location?")
 | 
					 | 
				
			||||||
                .setContentText("Please be in your precise location")
 | 
					 | 
				
			||||||
                .setConfirmText("OK").show();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void lessThanFour(){
 | 
					 | 
				
			||||||
        new SweetAlertDialog(this, SweetAlertDialog.SUCCESS_TYPE)
 | 
					 | 
				
			||||||
                .setTitleText("You are currently near location")
 | 
					 | 
				
			||||||
                .setContentText("Attendance can be captured now")
 | 
					 | 
				
			||||||
                .setConfirmText("OK").show();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
		 After Width: | Height: | Size: 20 KiB  | 
| 
		 After Width: | Height: | Size: 25 KiB  | 
@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<shape xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
 | 
					    android:shape="rectangle">
 | 
				
			||||||
 | 
					    <corners android:radius="10dp" />
 | 
				
			||||||
 | 
					    <solid android:color="#F1F1F1"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</shape>
 | 
				
			||||||
@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<shape xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
 | 
					    android:shape="rectangle">
 | 
				
			||||||
 | 
					    <corners android:radius="10dp" />
 | 
				
			||||||
 | 
					    <solid android:color="#D75757"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</shape>
 | 
				
			||||||
@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<selector
 | 
				
			||||||
 | 
					    xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					    <item>
 | 
				
			||||||
 | 
					        <shape>
 | 
				
			||||||
 | 
					            <solid android:color="#ff3232"/>
 | 
				
			||||||
 | 
					            <corners android:radius="10dp" />
 | 
				
			||||||
 | 
					        </shape>
 | 
				
			||||||
 | 
					    </item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</selector>
 | 
				
			||||||
@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
 | 
				
			||||||
 | 
					    <corners android:radius="20dp"/>
 | 
				
			||||||
 | 
					    <padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/>
 | 
				
			||||||
 | 
					    <stroke android:width="1dp" android:color="#3D529E"/>
 | 
				
			||||||
 | 
					</shape>
 | 
				
			||||||
@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
 | 
				
			||||||
 | 
					    <corners android:radius="10dp"/>
 | 
				
			||||||
 | 
					    <padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/>
 | 
				
			||||||
 | 
					    <stroke android:width="1dp" android:color="#E1E1E1"/>
 | 
				
			||||||
 | 
					</shape>
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 9.0 KiB  | 
@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					<vector android:height="24dp" android:tint="#0E0F11"
 | 
				
			||||||
 | 
					    android:viewportHeight="24" android:viewportWidth="24"
 | 
				
			||||||
 | 
					    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					    <path android:fillColor="@android:color/white" android:pathData="M20,3h-1L19,1h-2v2L7,3L7,1L5,1v2L4,3c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,5c0,-1.1 -0.9,-2 -2,-2zM20,21L4,21L4,8h16v13z"/>
 | 
				
			||||||
 | 
					</vector>
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 426 B  | 
@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					    <item android:right="8dp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        android:gravity="left|center_vertical">
 | 
				
			||||||
 | 
					    </item>
 | 
				
			||||||
 | 
					</layer-list>
 | 
				
			||||||
@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					<vector android:height="24dp" android:tint="#0E0F11"
 | 
				
			||||||
 | 
					    android:viewportHeight="24" android:viewportWidth="24"
 | 
				
			||||||
 | 
					    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					    <path android:fillColor="@android:color/white" android:pathData="M3,18h13v-2L3,16v2zM3,13h10v-2L3,11v2zM3,6v2h13L16,6L3,6zM21,15.59L17.42,12 21,8.41 19.59,7l-5,5 5,5L21,15.59z"/>
 | 
				
			||||||
 | 
					</vector>
 | 
				
			||||||
@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					    <!-- Background -->
 | 
				
			||||||
 | 
					    <item android:drawable="@android:color/transparent" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- Border -->
 | 
				
			||||||
 | 
					    <item>
 | 
				
			||||||
 | 
					        <shape
 | 
				
			||||||
 | 
					            android:shape="rectangle">
 | 
				
			||||||
 | 
					            <stroke
 | 
				
			||||||
 | 
					                android:color="#3D529E"
 | 
				
			||||||
 | 
					                android:width="1dp" /> <!-- Border width -->
 | 
				
			||||||
 | 
					            <corners
 | 
				
			||||||
 | 
					                android:radius="15dp" /> <!-- Rounded corners, if desired -->
 | 
				
			||||||
 | 
					        </shape>
 | 
				
			||||||
 | 
					    </item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</layer-list>
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 16 KiB  | 
| 
		 After Width: | Height: | Size: 13 KiB  | 
| 
		 After Width: | Height: | Size: 4.8 KiB  | 
| 
		 After Width: | Height: | Size: 8.9 KiB  | 
| 
		 After Width: | Height: | Size: 9.5 KiB  | 
| 
		 After Width: | Height: | Size: 295 B  | 
@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					<vector android:height="24dp" android:tint="#0E0F11"
 | 
				
			||||||
 | 
					    android:viewportHeight="24" android:viewportWidth="24"
 | 
				
			||||||
 | 
					    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
 | 
					    <path android:fillColor="@android:color/white" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
 | 
				
			||||||
 | 
					    <path android:fillColor="@android:color/white" android:pathData="M12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/>
 | 
				
			||||||
 | 
					</vector>
 | 
				
			||||||
@ -0,0 +1,393 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout
 | 
				
			||||||
 | 
					    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:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
 | 
					    tools:context=".ApprovalListActivity"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/lin1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal">
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="14dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Approval list"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="110dp"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <ScrollView
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="match_parent">
 | 
				
			||||||
 | 
					        <RelativeLayout
 | 
				
			||||||
 | 
					            android:id="@+id/rl"
 | 
				
			||||||
 | 
					            android:layout_marginTop="35dp"
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel1"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/empId"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="RequestID :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/RequestIDVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/empId"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="RequestID"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel2"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel1">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/EmployeeID"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="EmployeeID :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/EmployeeIDVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/EmployeeID"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="EmployeeID"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel3"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel2">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/EmployeeName"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="EmployeeName :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/EmployeeNameVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/EmployeeName"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="EmployeeName"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel4"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel3">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LDate"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="LDate :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LDateVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/LDate"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="LDate"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel4">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LTimeOut"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="LTimeOut :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LTimeOutVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/LTimeOut"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="LTimeOut"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel6"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel5">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LTimeIn"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="LTimeOut :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LTimeInVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/LTimeIn"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="LTimeIn"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel7"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel6">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/NoOfHrs"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="NoOfHrs :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/NoOfHrsVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/NoOfHrs"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="NoOfHrs"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel8"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel7">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LeaveType"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="LeaveType :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/LeaveTypeVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/LeaveType"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="LeaveType"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel9"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel8">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/ApproverID"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="ApproverID :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/ApproverIDVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/ApproverID"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="ApproverID"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel10"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel9">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/ApproverName"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="ApproverName :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/ApproverNameVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/ApproverName"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="ApproverName"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel11"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="30dp"
 | 
				
			||||||
 | 
					                android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel10">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/Reason"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Reason :"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/ReasonVal"
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/Reason"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    android:text="Reason"
 | 
				
			||||||
 | 
					                    android:textColor="@color/black"
 | 
				
			||||||
 | 
					                    android:textSize="15sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </RelativeLayout>
 | 
				
			||||||
 | 
					    </ScrollView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					<?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:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/lin1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal">
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="14dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Approval list"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="110dp"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <ListView
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="match_parent"
 | 
				
			||||||
 | 
					        android:id="@+id/listview"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,170 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:padding="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/menu"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:background="@drawable/menu" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/logout"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_alignParentRight="true"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:background="@drawable/back" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:layout_width="350px"
 | 
				
			||||||
 | 
					        android:layout_height="350px"
 | 
				
			||||||
 | 
					        android:layout_gravity="center"
 | 
				
			||||||
 | 
					        android:layout_marginTop="100dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/circular"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="140px"
 | 
				
			||||||
 | 
					            android:layout_height="180px"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					            android:background="@drawable/homepage_logo" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnCheckIn"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="40dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="20dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="20dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_enable"
 | 
				
			||||||
 | 
					        android:text="Check In"
 | 
				
			||||||
 | 
					        android:textAllCaps="false"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        android:drawableLeft="@drawable/check_in"
 | 
				
			||||||
 | 
					        android:drawablePadding="-15sp"
 | 
				
			||||||
 | 
					        android:padding="10dp"
 | 
				
			||||||
 | 
					        android:gravity="center"/>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_enable"
 | 
				
			||||||
 | 
					        android:layout_marginTop="60dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:src="@drawable/check_in"
 | 
				
			||||||
 | 
					            android:backgroundTint="#4262D3"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <View
 | 
				
			||||||
 | 
					            android:layout_width="1dp"
 | 
				
			||||||
 | 
					            android:layout_height="50dp"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/btnCheckIn"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Check In"
 | 
				
			||||||
 | 
					            android:textColor="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="60dp"
 | 
				
			||||||
 | 
					            android:textSize="20sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:autoSizeTextType="uniform"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_check"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:src="@drawable/checkout"
 | 
				
			||||||
 | 
					            android:backgroundTint="#48B2EE"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <View
 | 
				
			||||||
 | 
					            android:layout_width="1dp"
 | 
				
			||||||
 | 
					            android:layout_height="50dp"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/btnCheckOut"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Check Out"
 | 
				
			||||||
 | 
					            android:textColor="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="60dp"
 | 
				
			||||||
 | 
					            android:textSize="20sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:autoSizeTextType="uniform"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="65dp"
 | 
				
			||||||
 | 
					        android:text="Emergency SOS"
 | 
				
			||||||
 | 
					        android:layout_marginTop="120dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_sos"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnCheckOut"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="20dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="20dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_check"
 | 
				
			||||||
 | 
					        android:text="Check Out"
 | 
				
			||||||
 | 
					        android:textAllCaps="false"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        android:drawableLeft="@drawable/checkout"
 | 
				
			||||||
 | 
					        android:padding="10dp"
 | 
				
			||||||
 | 
					        android:gravity="center"
 | 
				
			||||||
 | 
					        />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -40,11 +40,11 @@
 | 
				
			|||||||
            android:layout_height="180px"
 | 
					            android:layout_height="180px"
 | 
				
			||||||
            android:layout_centerInParent="true"
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
            android:layout_marginTop="30dp"
 | 
					            android:layout_marginTop="30dp"
 | 
				
			||||||
            android:background="@drawable/homepage_logo" />
 | 
					            android:background="@drawable/ese" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </RelativeLayout>
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <Button
 | 
					    <!--<Button
 | 
				
			||||||
        android:id="@+id/btnCheckIn"
 | 
					        android:id="@+id/btnCheckIn"
 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
@ -56,11 +56,124 @@
 | 
				
			|||||||
        android:textAllCaps="false"
 | 
					        android:textAllCaps="false"
 | 
				
			||||||
        android:textColor="@color/white"
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
        android:drawableLeft="@drawable/check_in"
 | 
					        android:drawableLeft="@drawable/check_in"
 | 
				
			||||||
 | 
					        android:drawablePadding="-15sp"
 | 
				
			||||||
        android:padding="10dp"
 | 
					        android:padding="10dp"
 | 
				
			||||||
        android:gravity="center"/>
 | 
					        android:gravity="center"/>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_enable"
 | 
				
			||||||
 | 
					        android:layout_marginTop="60dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:src="@drawable/check_in"
 | 
				
			||||||
 | 
					            android:backgroundTint="#4262D3"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <View
 | 
				
			||||||
 | 
					            android:layout_width="1dp"
 | 
				
			||||||
 | 
					            android:layout_height="50dp"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/btnCheckIn"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Check In"
 | 
				
			||||||
 | 
					            android:textColor="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="60dp"
 | 
				
			||||||
 | 
					            android:textSize="20sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:autoSizeTextType="uniform"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_check"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:src="@drawable/checkout"
 | 
				
			||||||
 | 
					            android:backgroundTint="#48B2EE"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <View
 | 
				
			||||||
 | 
					            android:layout_width="1dp"
 | 
				
			||||||
 | 
					            android:layout_height="50dp"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/btnCheckOut"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Check Out"
 | 
				
			||||||
 | 
					            android:textColor="@color/white"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="60dp"
 | 
				
			||||||
 | 
					            android:textSize="20sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:autoSizeTextType="uniform"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <androidx.appcompat.widget.LinearLayoutCompat
 | 
				
			||||||
 | 
					        android:id="@+id/checkSuccess"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="48dp"
 | 
				
			||||||
 | 
					        android:orientation="vertical"
 | 
				
			||||||
 | 
					        android:background="#4CC167"
 | 
				
			||||||
 | 
					        android:layout_marginTop="45dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/txtSuccess"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="48dp"
 | 
				
			||||||
 | 
					            android:text="Please complete licence verification"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:gravity="center_vertical"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </androidx.appcompat.widget.LinearLayoutCompat>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <Button
 | 
					    <Button
 | 
				
			||||||
        android:id="@+id/btncheckOut"
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="65dp"
 | 
				
			||||||
 | 
					        android:text="Emergency SOS"
 | 
				
			||||||
 | 
					        android:layout_marginTop="120dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_sos"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnCheckOut"
 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
        android:layout_marginTop="20dp"
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
@ -73,7 +186,7 @@
 | 
				
			|||||||
        android:drawableLeft="@drawable/checkout"
 | 
					        android:drawableLeft="@drawable/checkout"
 | 
				
			||||||
        android:padding="10dp"
 | 
					        android:padding="10dp"
 | 
				
			||||||
        android:gravity="center"
 | 
					        android:gravity="center"
 | 
				
			||||||
        />
 | 
					        />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</LinearLayout>
 | 
					</LinearLayout>
 | 
				
			||||||
@ -1,45 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					 | 
				
			||||||
<androidx.appcompat.widget.LinearLayoutCompat
 | 
					 | 
				
			||||||
    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:layout_width="match_parent"
 | 
					 | 
				
			||||||
    android:layout_height="match_parent"
 | 
					 | 
				
			||||||
    tools:context=".views.EmployeeActivity"
 | 
					 | 
				
			||||||
    android:orientation="vertical">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <RelativeLayout
 | 
					 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
        android:padding="15dp">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <ImageView
 | 
					 | 
				
			||||||
            android:id="@+id/menu"
 | 
					 | 
				
			||||||
            android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
            android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
            android:layout_alignParentLeft="true"
 | 
					 | 
				
			||||||
            android:layout_centerInParent="true"
 | 
					 | 
				
			||||||
            android:background="@drawable/menu" />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <ImageView
 | 
					 | 
				
			||||||
            android:id="@+id/logout"
 | 
					 | 
				
			||||||
            android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
            android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
            android:layout_alignParentRight="true"
 | 
					 | 
				
			||||||
            android:layout_centerInParent="true"
 | 
					 | 
				
			||||||
            android:background="@drawable/back" />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    </RelativeLayout>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <TextView
 | 
					 | 
				
			||||||
        android:id="@+id/show_location"
 | 
					 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					 | 
				
			||||||
        android:hint="Location"
 | 
					 | 
				
			||||||
        android:textSize="20sp"
 | 
					 | 
				
			||||||
        android:gravity="center_horizontal"
 | 
					 | 
				
			||||||
        android:layout_marginTop="50dp"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</androidx.appcompat.widget.LinearLayoutCompat>
 | 
					 | 
				
			||||||
@ -0,0 +1,238 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout
 | 
				
			||||||
 | 
					    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:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
 | 
					    tools:context=".LeaveRequestActivity"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal">
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="14dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Leave requests"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="110dp"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/lin1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_linear_grey"
 | 
				
			||||||
 | 
					        android:layout_marginTop="10dp">
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/menu"
 | 
				
			||||||
 | 
					            android:layout_width="60dp"
 | 
				
			||||||
 | 
					            android:layout_height="60dp"
 | 
				
			||||||
 | 
					            android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:background="@drawable/andrew" />
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="10dp"
 | 
				
			||||||
 | 
					            android:orientation="vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Madelyn Lubin"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:textColor="#000000"/>
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Tue, 22 - Thu, 24 Feb 2023"
 | 
				
			||||||
 | 
					                android:textStyle="normal"
 | 
				
			||||||
 | 
					                android:textColor="#5F5F5F"/>
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Casual Leave"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:textColor="#3553BB"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="vertical"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="90dp"
 | 
				
			||||||
 | 
					                android:layout_height="25dp"
 | 
				
			||||||
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					                android:padding="2dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:src="@drawable/tick"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="4dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Approve"
 | 
				
			||||||
 | 
					                    android:textColor="@color/white"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="90dp"
 | 
				
			||||||
 | 
					                android:layout_height="25dp"
 | 
				
			||||||
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_btn_with_stroke_grey"
 | 
				
			||||||
 | 
					                android:padding="2dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="5dp"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:src="@drawable/cross"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="4dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Reject"
 | 
				
			||||||
 | 
					                    android:textColor="#CB1A1A"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="15dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/lin2"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_linear_grey"
 | 
				
			||||||
 | 
					        android:layout_marginTop="10dp">
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/menu2"
 | 
				
			||||||
 | 
					            android:layout_width="60dp"
 | 
				
			||||||
 | 
					            android:layout_height="60dp"
 | 
				
			||||||
 | 
					            android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:background="@drawable/frank" />
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="10dp"
 | 
				
			||||||
 | 
					            android:orientation="vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Charlie Saris"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:textColor="#000000"/>
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Tue, 22 - Thu, 24 Feb 2023"
 | 
				
			||||||
 | 
					                android:textStyle="normal"
 | 
				
			||||||
 | 
					                android:textColor="#5F5F5F"/>
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Casual Leave"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:textColor="#3553BB"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="vertical"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="90dp"
 | 
				
			||||||
 | 
					                android:layout_height="25dp"
 | 
				
			||||||
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					                android:padding="2dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:src="@drawable/tick"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="4dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Approve"
 | 
				
			||||||
 | 
					                    android:textColor="@color/white"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="90dp"
 | 
				
			||||||
 | 
					                android:layout_height="25dp"
 | 
				
			||||||
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_btn_with_stroke_grey"
 | 
				
			||||||
 | 
					                android:padding="2dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="5dp"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:src="@drawable/cross"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="4dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Reject"
 | 
				
			||||||
 | 
					                    android:textColor="#CB1A1A"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="15dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,212 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout
 | 
				
			||||||
 | 
					    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:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
 | 
					    tools:context=".LeaveRequestDetailsActivity"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal">
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="14dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Leave requests"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="110dp"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_linear_grey"
 | 
				
			||||||
 | 
					        android:orientation="vertical"
 | 
				
			||||||
 | 
					        android:layout_marginTop="10dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:id="@+id/lin1"
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="horizontal"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            android:layout_marginTop="10dp">
 | 
				
			||||||
 | 
					            <ImageView
 | 
				
			||||||
 | 
					                android:id="@+id/menu"
 | 
				
			||||||
 | 
					                android:layout_width="60dp"
 | 
				
			||||||
 | 
					                android:layout_height="60dp"
 | 
				
			||||||
 | 
					                android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					                android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					                android:background="@drawable/andrew" />
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_marginLeft="10dp"
 | 
				
			||||||
 | 
					                android:orientation="vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Madelyn Lubin"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"
 | 
				
			||||||
 | 
					                    android:textColor="#000000"/>
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Tue, 22 - Thu, 24 Feb 2023"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"
 | 
				
			||||||
 | 
					                    android:textColor="#5F5F5F"/>
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Casual Leave"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"
 | 
				
			||||||
 | 
					                    android:textColor="#3553BB"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:orientation="vertical"
 | 
				
			||||||
 | 
					                android:layout_marginLeft="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="03"
 | 
				
			||||||
 | 
					                    android:textSize="26sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"
 | 
				
			||||||
 | 
					                    android:textColor="#000000"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Days"
 | 
				
			||||||
 | 
					                    android:textSize="26sp"
 | 
				
			||||||
 | 
					                    android:textStyle="normal"
 | 
				
			||||||
 | 
					                    android:textColor="#000000"
 | 
				
			||||||
 | 
					                    android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                    />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <Button
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:background="@drawable/bg_btn_with_stroke_grey"
 | 
				
			||||||
 | 
					            android:text="Casual Leave"
 | 
				
			||||||
 | 
					            android:textAlignment="viewStart"
 | 
				
			||||||
 | 
					            android:textColor="#3553BB"
 | 
				
			||||||
 | 
					            android:padding="5dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Total Leave this year"
 | 
				
			||||||
 | 
					            android:textColor="#A1A1A1"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="23 days"
 | 
				
			||||||
 | 
					            android:textColor="#434343"
 | 
				
			||||||
 | 
					            android:layout_marginTop="8dp"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Substitute"
 | 
				
			||||||
 | 
					            android:textColor="#A1A1A1"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Richard Wilson"
 | 
				
			||||||
 | 
					            android:textColor="#434343"
 | 
				
			||||||
 | 
					            android:layout_marginTop="8dp"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Approver"
 | 
				
			||||||
 | 
					            android:textColor="#A1A1A1"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Michael Adams"
 | 
				
			||||||
 | 
					            android:textColor="#434343"
 | 
				
			||||||
 | 
					            android:layout_marginTop="8dp"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="HR Contact"
 | 
				
			||||||
 | 
					            android:textColor="#A1A1A1"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="HR Contact"
 | 
				
			||||||
 | 
					            android:textColor="#434343"
 | 
				
			||||||
 | 
					            android:layout_marginTop="8dp"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnapprove"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					        android:layout_marginTop="60dp"
 | 
				
			||||||
 | 
					        android:text="Approve"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnreject"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_btn_with_stroke_red"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        android:text="Reject"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -17,7 +17,6 @@
 | 
				
			|||||||
        android:scrollbars="none">
 | 
					        android:scrollbars="none">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        <LinearLayout
 | 
					        <LinearLayout
 | 
				
			||||||
            android:layout_width="match_parent"
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
            android:layout_height="wrap_content"
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
@ -41,27 +40,6 @@
 | 
				
			|||||||
                    />
 | 
					                    />
 | 
				
			||||||
            </RelativeLayout>
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <androidx.appcompat.widget.LinearLayoutCompat
 | 
					 | 
				
			||||||
                android:id="@+id/lay_licence_verify"
 | 
					 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					 | 
				
			||||||
                android:layout_height="48dp"
 | 
					 | 
				
			||||||
                android:orientation="vertical"
 | 
					 | 
				
			||||||
                android:background="#FF2E2E"
 | 
					 | 
				
			||||||
                android:visibility="gone">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                <TextView
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    android:layout_width="wrap_content"
 | 
					 | 
				
			||||||
                    android:layout_height="48dp"
 | 
					 | 
				
			||||||
                    android:text="Please complete licence verification"
 | 
					 | 
				
			||||||
                    android:textStyle="bold"
 | 
					 | 
				
			||||||
                    android:textColor="@color/white"
 | 
					 | 
				
			||||||
                    android:layout_gravity="center"
 | 
					 | 
				
			||||||
                    android:gravity="center_vertical"
 | 
					 | 
				
			||||||
                    />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            </androidx.appcompat.widget.LinearLayoutCompat>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <RelativeLayout
 | 
					            <RelativeLayout
 | 
				
			||||||
                android:layout_width="350px"
 | 
					                android:layout_width="350px"
 | 
				
			||||||
                android:layout_height="350px"
 | 
					                android:layout_height="350px"
 | 
				
			||||||
@ -76,28 +54,84 @@
 | 
				
			|||||||
                    android:layout_height="180px"
 | 
					                    android:layout_height="180px"
 | 
				
			||||||
                    android:layout_centerInParent="true"
 | 
					                    android:layout_centerInParent="true"
 | 
				
			||||||
                    android:layout_marginTop="30dp"
 | 
					                    android:layout_marginTop="30dp"
 | 
				
			||||||
                    android:background="@drawable/homepage_logo" />
 | 
					                    android:background="@drawable/ese" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            </RelativeLayout>
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <ImageView
 | 
					            <!--<ImageView
 | 
				
			||||||
                android:layout_width="169dp"
 | 
					                android:layout_width="169dp"
 | 
				
			||||||
                android:layout_height="39dp"
 | 
					                android:layout_height="39dp"
 | 
				
			||||||
                android:layout_gravity="center_horizontal"
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
                android:gravity="center"
 | 
					                android:gravity="center"
 | 
				
			||||||
                android:layout_marginTop="57dp"
 | 
					                android:layout_marginTop="57dp"
 | 
				
			||||||
                android:src="@drawable/login_text"
 | 
					                android:src="@drawable/login_text"
 | 
				
			||||||
                />
 | 
					                />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <ImageView
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Welcome"
 | 
				
			||||||
 | 
					                android:textColor="#3D529E"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:textSize="40sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:layout_marginTop="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <!--<ImageView
 | 
				
			||||||
                android:layout_width="243dp"
 | 
					                android:layout_width="243dp"
 | 
				
			||||||
                android:layout_height="39dp"
 | 
					                android:layout_height="39dp"
 | 
				
			||||||
                android:layout_gravity="center_horizontal"
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
                android:gravity="center"
 | 
					                android:gravity="center"
 | 
				
			||||||
                android:src="@drawable/login_sub_text"
 | 
					                android:src="@drawable/login_sub_text"
 | 
				
			||||||
                />
 | 
					                />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Please click on Login to begin the check in process"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:textColor="#576277"
 | 
				
			||||||
 | 
					                android:textSize="10sp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <Button
 | 
					            <Button
 | 
				
			||||||
 | 
					                android:id="@+id/login_new"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="@dimen/button_height"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_button_enable"
 | 
				
			||||||
 | 
					                android:text="Log In"
 | 
				
			||||||
 | 
					                android:textColor="@color/white"
 | 
				
			||||||
 | 
					                android:textSize="20sp"
 | 
				
			||||||
 | 
					                android:layout_marginLeft="23dp"
 | 
				
			||||||
 | 
					                android:layout_marginRight="23dp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					                android:textAllCaps="false"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="If you are a new user, please initiate the face \n     validation process by clicking on the link "
 | 
				
			||||||
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:textColor="#576277"
 | 
				
			||||||
 | 
					                android:textSize="12sp"
 | 
				
			||||||
 | 
					                android:layout_marginTop="40dp"
 | 
				
			||||||
 | 
					                android:layout_marginLeft="27dp"
 | 
				
			||||||
 | 
					                android:layout_marginRight="23dp"
 | 
				
			||||||
 | 
					                android:autoSizeTextType="uniform"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/reg_new"
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="@string/hyperlink"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:textColor="#576277"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					                android:layout_marginLeft="23dp"
 | 
				
			||||||
 | 
					                android:layout_marginRight="23dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <!--<Button
 | 
				
			||||||
                android:id="@+id/reg_new"
 | 
					                android:id="@+id/reg_new"
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
                android:layout_height="@dimen/button_height"
 | 
					                android:layout_height="@dimen/button_height"
 | 
				
			||||||
@ -107,20 +141,32 @@
 | 
				
			|||||||
                android:textSize="14sp"
 | 
					                android:textSize="14sp"
 | 
				
			||||||
                android:layout_marginLeft="23dp"
 | 
					                android:layout_marginLeft="23dp"
 | 
				
			||||||
                android:layout_marginRight="23dp"
 | 
					                android:layout_marginRight="23dp"
 | 
				
			||||||
                android:textAllCaps="false"/>
 | 
					                android:textAllCaps="false"/>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <Button
 | 
					
 | 
				
			||||||
                android:id="@+id/login_new"
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <androidx.appcompat.widget.LinearLayoutCompat
 | 
				
			||||||
 | 
					                android:id="@+id/lay_licence_verify"
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
                android:layout_height="@dimen/button_height"
 | 
					                android:layout_height="48dp"
 | 
				
			||||||
                android:background="@drawable/bg_button_disable"
 | 
					                android:orientation="vertical"
 | 
				
			||||||
                android:text="Login"
 | 
					                android:background="#FF2E2E"
 | 
				
			||||||
                android:textColor="@color/black"
 | 
					                android:layout_marginTop="45dp"
 | 
				
			||||||
                android:textSize="14sp"
 | 
					                android:visibility="gone"
 | 
				
			||||||
                android:layout_marginLeft="23dp"
 | 
					                >
 | 
				
			||||||
                android:layout_marginRight="23dp"
 | 
					
 | 
				
			||||||
                android:layout_marginTop="15dp"
 | 
					                <TextView
 | 
				
			||||||
                android:textAllCaps="false"/>
 | 
					
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="48dp"
 | 
				
			||||||
 | 
					                    android:text="Please complete licence verification"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:gravity="center_vertical"
 | 
				
			||||||
 | 
					                    />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </androidx.appcompat.widget.LinearLayoutCompat>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <!--<ImageView
 | 
					            <!--<ImageView
 | 
				
			||||||
                android:layout_width="@dimen/login_logo_width"
 | 
					                android:layout_width="@dimen/login_logo_width"
 | 
				
			||||||
 | 
				
			|||||||
@ -9,6 +9,18 @@
 | 
				
			|||||||
    android:orientation="vertical"
 | 
					    android:orientation="vertical"
 | 
				
			||||||
    android:padding="23dp">
 | 
					    android:padding="23dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <ScrollView
 | 
				
			||||||
 | 
					        android:id="@+id/scrollView"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="0dp"
 | 
				
			||||||
 | 
					        android:layout_weight="1"
 | 
				
			||||||
 | 
					        android:fillViewport="true">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="match_parent"
 | 
				
			||||||
 | 
					        android:orientation="vertical">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <ImageButton
 | 
					    <ImageButton
 | 
				
			||||||
        android:id="@+id/back"
 | 
					        android:id="@+id/back"
 | 
				
			||||||
        android:layout_width="14dp"
 | 
					        android:layout_width="14dp"
 | 
				
			||||||
@ -53,11 +65,12 @@
 | 
				
			|||||||
        >
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <ImageView
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/faceImage"
 | 
				
			||||||
            android:layout_width="50dp"
 | 
					            android:layout_width="50dp"
 | 
				
			||||||
            android:layout_height="50dp"
 | 
					            android:layout_height="50dp"
 | 
				
			||||||
            android:background="@drawable/image"
 | 
					 | 
				
			||||||
            android:layout_centerInParent="true"
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
            android:layout_marginTop="30dp"/>
 | 
					            android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					            android:background="@drawable/ese" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </RelativeLayout>
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -112,7 +125,7 @@
 | 
				
			|||||||
        android:ems="10"
 | 
					        android:ems="10"
 | 
				
			||||||
        android:drawableLeft="@drawable/user1"
 | 
					        android:drawableLeft="@drawable/user1"
 | 
				
			||||||
        android:drawablePadding="12dp"
 | 
					        android:drawablePadding="12dp"
 | 
				
			||||||
        android:hint="Employee ID"
 | 
					        android:hint="User ID"
 | 
				
			||||||
        android:textStyle="bold"
 | 
					        android:textStyle="bold"
 | 
				
			||||||
        android:textSize="14sp"
 | 
					        android:textSize="14sp"
 | 
				
			||||||
        android:background="@drawable/custom_input"
 | 
					        android:background="@drawable/custom_input"
 | 
				
			||||||
@ -188,7 +201,7 @@
 | 
				
			|||||||
        android:layout_height="wrap_content"
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
        android:layout_marginTop="20dp"
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
        android:background="@drawable/bg_btn_with_stroke"
 | 
					        android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
        android:text="Sign in "
 | 
					        android:text="Log In "
 | 
				
			||||||
        android:textAllCaps="false"
 | 
					        android:textAllCaps="false"
 | 
				
			||||||
        android:textColor="@color/white"
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
@ -202,8 +215,11 @@
 | 
				
			|||||||
        android:padding="10dp"
 | 
					        android:padding="10dp"
 | 
				
			||||||
        android:text="Forget password ?"
 | 
					        android:text="Forget password ?"
 | 
				
			||||||
        android:textColor="#576277"
 | 
					        android:textColor="#576277"
 | 
				
			||||||
        android:textSize="13sp" />
 | 
					        android:textSize="13sp"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </ScrollView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</LinearLayout>
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,310 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout
 | 
				
			||||||
 | 
					    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:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
 | 
					    tools:context=".PermissionRequestActivity"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<ScrollView
 | 
				
			||||||
 | 
					    android:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:orientation="vertical"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="match_parent">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/lin1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal">
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="14dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Permission requests"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="90dp"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/linearLayout1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:weightSum="2"
 | 
				
			||||||
 | 
					        android:visibility="gone">
 | 
				
			||||||
 | 
					        <Button
 | 
				
			||||||
 | 
					            android:id="@+id/btn_official"
 | 
				
			||||||
 | 
					            android:textSize="12dp"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Official"
 | 
				
			||||||
 | 
					            android:textColor="@color/white"
 | 
				
			||||||
 | 
					            android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					            android:layout_weight="1"
 | 
				
			||||||
 | 
					            android:layout_marginRight="5dp"/>
 | 
				
			||||||
 | 
					        <Button
 | 
				
			||||||
 | 
					            android:id="@+id/btn_private"
 | 
				
			||||||
 | 
					            android:textSize="12dp"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Private"
 | 
				
			||||||
 | 
					            android:background="@drawable/bg_btn_with_stroke_grey"
 | 
				
			||||||
 | 
					            android:layout_weight="1"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="5dp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="60dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:src="@drawable/calender2"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Date"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="110dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/permission"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="25dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:weightSum="1"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/permissionType"
 | 
				
			||||||
 | 
					            android:layout_width="0dp"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Permission type"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_weight="0.5"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <Spinner
 | 
				
			||||||
 | 
					            android:id="@+id/spinner"
 | 
				
			||||||
 | 
					            android:layout_width="0dp"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:gravity="center_vertical"
 | 
				
			||||||
 | 
					            android:spinnerMode="dropdown"
 | 
				
			||||||
 | 
					            android:layout_weight="0.5"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/private_date"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="45dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="25dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Date"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="135dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/official_from_date"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="45dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="25dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="From Date"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="135dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/official_to_date"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="45dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="25dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="To Date"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="135dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/timePickerFrom"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="25dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="25dp"
 | 
				
			||||||
 | 
					            android:layout_height="25dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/calender"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/textTimeFrom"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Time from"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="100dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/timePickerTo"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="25dp"
 | 
				
			||||||
 | 
					            android:layout_height="25dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/calender"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/textTimeTo"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Time to"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="110dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <EditText
 | 
				
			||||||
 | 
					        android:id="@+id/edtRemarks"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="80dp"
 | 
				
			||||||
 | 
					        android:padding="10dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/edittext_border"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        android:hint="Remarks"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        android:gravity="left"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnSubmit"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="100dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					        android:text="Submit"
 | 
				
			||||||
 | 
					        android:textAllCaps="false"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
 | 
					</ScrollView>
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,321 @@
 | 
				
			|||||||
 | 
					<?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"
 | 
				
			||||||
 | 
					    xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- <include layout="@layout/include_toolbar"/>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <FrameLayout
 | 
				
			||||||
 | 
					        android:id="@+id/container"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="match_parent"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_centerHorizontal="true"
 | 
				
			||||||
 | 
					        android:layout_gravity="center"
 | 
				
			||||||
 | 
					        android:layout_marginTop="@dimen/photo_save_photo_margin_top">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <com.makeramen.roundedimageview.RoundedImageView
 | 
				
			||||||
 | 
					            android:id="@+id/photo"
 | 
				
			||||||
 | 
					            android:layout_width="@dimen/rounded_photo_size"
 | 
				
			||||||
 | 
					            android:layout_height="@dimen/rounded_photo_size"
 | 
				
			||||||
 | 
					            android:scaleType="centerCrop"
 | 
				
			||||||
 | 
					            app:riv_border_color="@color/accentColor"
 | 
				
			||||||
 | 
					            app:riv_border_width="7dp"
 | 
				
			||||||
 | 
					            app:riv_mutate_background="true"
 | 
				
			||||||
 | 
					            app:riv_oval="false"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ProgressBar
 | 
				
			||||||
 | 
					            style="@style/Base.Widget.AppCompat.ProgressBar"
 | 
				
			||||||
 | 
					            android:id="@+id/progressBar"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:indeterminate="true"
 | 
				
			||||||
 | 
					            android:visibility="invisible"/>
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<RelativeLayout
 | 
				
			||||||
 | 
					        android:layout_width="@dimen/rounded_photo_size"
 | 
				
			||||||
 | 
					        android:layout_height="@dimen/rounded_photo_size"
 | 
				
			||||||
 | 
					        android:layout_gravity="center"
 | 
				
			||||||
 | 
					        android:layout_marginTop="50dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/circular"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/photo"
 | 
				
			||||||
 | 
					            android:layout_width="212dp"
 | 
				
			||||||
 | 
					            android:layout_height="212dp"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					            <!–android:background="@drawable/user" />–>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>-->
 | 
				
			||||||
 | 
					    <!--<TextView
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Please click here for clicking image"
 | 
				
			||||||
 | 
					        android:textSize="15sp"
 | 
				
			||||||
 | 
					        android:textStyle="normal"
 | 
				
			||||||
 | 
					        android:textColor="#2b2b60"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:layout_marginTop="15dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        style="@style/Widget.AppCompat.Button.Borderless"
 | 
				
			||||||
 | 
					        android:id="@+id/retry"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="@dimen/button_height"
 | 
				
			||||||
 | 
					        android:layout_above="@+id/save"
 | 
				
			||||||
 | 
					        android:layout_centerHorizontal="true"
 | 
				
			||||||
 | 
					        android:layout_marginBottom="20dp"
 | 
				
			||||||
 | 
					        android:text="@string/retry"
 | 
				
			||||||
 | 
					        android:textColor="@color/accentColor"
 | 
				
			||||||
 | 
					        android:textSize="14sp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="200dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        android:id="@+id/save"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="@dimen/button_height"
 | 
				
			||||||
 | 
					        android:layout_alignParentBottom="true"
 | 
				
			||||||
 | 
					        android:layout_gravity="bottom"
 | 
				
			||||||
 | 
					        android:layout_marginBottom="@dimen/button_margin_bottom"
 | 
				
			||||||
 | 
					        android:background="@color/accentColor"
 | 
				
			||||||
 | 
					        android:text="@string/Ok"
 | 
				
			||||||
 | 
					        android:textColor="@android:color/white"
 | 
				
			||||||
 | 
					        android:textSize="14sp"
 | 
				
			||||||
 | 
					        />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <ImageButton
 | 
				
			||||||
 | 
					        android:id="@+id/back_img"
 | 
				
			||||||
 | 
					        android:layout_width="14dp"
 | 
				
			||||||
 | 
					        android:layout_height="20dp"
 | 
				
			||||||
 | 
					        android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					        android:background="@color/white"
 | 
				
			||||||
 | 
					        android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<RelativeLayout
 | 
				
			||||||
 | 
					        android:layout_width="70dp"
 | 
				
			||||||
 | 
					        android:layout_height="70dp"
 | 
				
			||||||
 | 
					        android:layout_gravity="center"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/circular"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="50dp"
 | 
				
			||||||
 | 
					            android:layout_height="50dp"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					            android:background="@drawable/user" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<RelativeLayout
 | 
				
			||||||
 | 
					        android:layout_width="350px"
 | 
				
			||||||
 | 
					        android:layout_height="350px"
 | 
				
			||||||
 | 
					        android:layout_gravity="center"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/circular"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     <ImageView
 | 
				
			||||||
 | 
					         android:layout_width="160px"
 | 
				
			||||||
 | 
					         android:layout_height="180px"
 | 
				
			||||||
 | 
					         android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					         android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					         android:background="@drawable/employee_new" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <TextView
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Register"
 | 
				
			||||||
 | 
					        android:textSize="30sp"
 | 
				
			||||||
 | 
					        android:textStyle="bold"
 | 
				
			||||||
 | 
					        android:textColor="#3D529E"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <TextView
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Please signup to create an account"
 | 
				
			||||||
 | 
					        android:textSize="15sp"
 | 
				
			||||||
 | 
					        android:textStyle="normal"
 | 
				
			||||||
 | 
					        android:textColor="#576277"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:layout_marginTop="2dp"/>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomStart="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopStart="8dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_textinput"
 | 
				
			||||||
 | 
					        android:hint="Username"
 | 
				
			||||||
 | 
					        app:startIconDrawable="@drawable/user"
 | 
				
			||||||
 | 
					        app:endIconMode="clear_text">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Username"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </com.google.android.material.textfield.TextInputEditText>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomStart="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopStart="8dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_textinput"
 | 
				
			||||||
 | 
					        android:hint="Email"
 | 
				
			||||||
 | 
					        app:startIconDrawable="@drawable/email"
 | 
				
			||||||
 | 
					        app:endIconMode="clear_text">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:background="@color/white"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </com.google.android.material.textfield.TextInputEditText>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomStart="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopStart="8dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_textinput"
 | 
				
			||||||
 | 
					        android:hint="Phone"
 | 
				
			||||||
 | 
					        app:startIconDrawable="@drawable/phone"
 | 
				
			||||||
 | 
					        app:endIconMode="clear_text">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:inputType="number"
 | 
				
			||||||
 | 
					            android:maxLength="10"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </com.google.android.material.textfield.TextInputEditText>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomStart="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopStart="8dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_textinput"
 | 
				
			||||||
 | 
					        android:hint="Password"
 | 
				
			||||||
 | 
					        app:startIconDrawable="@drawable/lock"
 | 
				
			||||||
 | 
					        app:endIconMode="clear_text">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					            android:id="@+id/pass"
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:background="@color/white"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </com.google.android.material.textfield.TextInputEditText>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginTop="20dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopEnd="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusBottomStart="8dp"
 | 
				
			||||||
 | 
					        app:boxCornerRadiusTopStart="8dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_textinput"
 | 
				
			||||||
 | 
					        android:hint="Confirm Password"
 | 
				
			||||||
 | 
					        app:startIconDrawable="@drawable/lock"
 | 
				
			||||||
 | 
					        app:endIconMode="clear_text">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <com.google.android.material.textfield.TextInputEditText
 | 
				
			||||||
 | 
					            android:id="@+id/conPass"
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:background="@color/white"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </com.google.android.material.textfield.TextInputEditText>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!-- <EditText
 | 
				
			||||||
 | 
					         android:layout_width="match_parent"
 | 
				
			||||||
 | 
					         android:layout_height="54dp"
 | 
				
			||||||
 | 
					         android:ems="10"
 | 
				
			||||||
 | 
					         android:drawableLeft="@drawable/comp"
 | 
				
			||||||
 | 
					         android:drawablePadding="12dp"
 | 
				
			||||||
 | 
					         android:hint="Company code"
 | 
				
			||||||
 | 
					         android:textStyle="bold"
 | 
				
			||||||
 | 
					         android:textSize="14sp"
 | 
				
			||||||
 | 
					         android:background="@drawable/custom_input"
 | 
				
			||||||
 | 
					         android:paddingLeft="16dp"
 | 
				
			||||||
 | 
					         android:layout_marginTop="37dp"/>
 | 
				
			||||||
 | 
					     <EditText
 | 
				
			||||||
 | 
					         android:layout_width="match_parent"
 | 
				
			||||||
 | 
					         android:layout_height="54dp"
 | 
				
			||||||
 | 
					         android:ems="10"
 | 
				
			||||||
 | 
					         android:drawableLeft="@drawable/employee_id"
 | 
				
			||||||
 | 
					         android:drawablePadding="12dp"
 | 
				
			||||||
 | 
					         android:hint="Employee ID"
 | 
				
			||||||
 | 
					         android:textStyle="bold"
 | 
				
			||||||
 | 
					         android:textSize="14sp"
 | 
				
			||||||
 | 
					         android:background="@drawable/custom_input"
 | 
				
			||||||
 | 
					         android:paddingLeft="16dp"
 | 
				
			||||||
 | 
					         android:layout_marginTop="18dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <EditText
 | 
				
			||||||
 | 
					      android:layout_width="match_parent"
 | 
				
			||||||
 | 
					      android:layout_height="54dp"
 | 
				
			||||||
 | 
					      android:layout_marginTop="18dp"
 | 
				
			||||||
 | 
					      android:background="@drawable/custom_input"
 | 
				
			||||||
 | 
					      android:drawableLeft="@drawable/baseline_message_24"
 | 
				
			||||||
 | 
					      android:drawablePadding="12dp"
 | 
				
			||||||
 | 
					      android:ems="10"
 | 
				
			||||||
 | 
					      android:hint="OTP"
 | 
				
			||||||
 | 
					      android:paddingLeft="16dp"
 | 
				
			||||||
 | 
					      android:textSize="14sp"
 | 
				
			||||||
 | 
					      android:textStyle="bold" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <Button
 | 
				
			||||||
 | 
					         android:id="@+id/verifynproceed"
 | 
				
			||||||
 | 
					         android:layout_width="match_parent"
 | 
				
			||||||
 | 
					         android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					         android:layout_marginTop="58dp"
 | 
				
			||||||
 | 
					         android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					         android:text="Verify and Proceed"
 | 
				
			||||||
 | 
					         android:textAllCaps="false"
 | 
				
			||||||
 | 
					         android:textColor="@color/white"
 | 
				
			||||||
 | 
					         />-->
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -34,6 +34,19 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    </RelativeLayout>
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <TextView
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Terms and conditions"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:textColor="#576277"
 | 
				
			||||||
 | 
					        android:layout_marginTop="80dp"
 | 
				
			||||||
 | 
					        android:textSize="20sp"
 | 
				
			||||||
 | 
					        android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <TextView
 | 
					    <TextView
 | 
				
			||||||
        android:layout_width="wrap_content"
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
@ -42,7 +55,8 @@
 | 
				
			|||||||
        android:textStyle="bold"
 | 
					        android:textStyle="bold"
 | 
				
			||||||
        android:textColor="#3D529E"
 | 
					        android:textColor="#3D529E"
 | 
				
			||||||
        android:layout_gravity="center_horizontal"
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
        android:layout_marginTop="30dp"/>
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <TextView
 | 
					    <TextView
 | 
				
			||||||
        android:layout_width="wrap_content"
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
@ -52,7 +66,9 @@
 | 
				
			|||||||
        android:textStyle="normal"
 | 
					        android:textStyle="normal"
 | 
				
			||||||
        android:textColor="#576277"
 | 
					        android:textColor="#576277"
 | 
				
			||||||
        android:layout_gravity="center_horizontal"
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
        android:layout_marginTop="2dp"/>
 | 
					        android:layout_marginTop="2dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <EditText
 | 
					    <EditText
 | 
				
			||||||
        android:id="@+id/edt_comp"
 | 
					        android:id="@+id/edt_comp"
 | 
				
			||||||
@ -67,7 +83,8 @@
 | 
				
			|||||||
        android:background="@drawable/custom_input"
 | 
					        android:background="@drawable/custom_input"
 | 
				
			||||||
        android:paddingLeft="16dp"
 | 
					        android:paddingLeft="16dp"
 | 
				
			||||||
        android:paddingRight="16dp"
 | 
					        android:paddingRight="16dp"
 | 
				
			||||||
        android:layout_marginTop="37dp"/>
 | 
					        android:layout_marginTop="37dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
    <EditText
 | 
					    <EditText
 | 
				
			||||||
        android:id="@+id/edt_emp"
 | 
					        android:id="@+id/edt_emp"
 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
@ -81,7 +98,8 @@
 | 
				
			|||||||
        android:background="@drawable/custom_input"
 | 
					        android:background="@drawable/custom_input"
 | 
				
			||||||
        android:paddingLeft="16dp"
 | 
					        android:paddingLeft="16dp"
 | 
				
			||||||
        android:paddingRight="16dp"
 | 
					        android:paddingRight="16dp"
 | 
				
			||||||
        android:layout_marginTop="18dp"/>
 | 
					        android:layout_marginTop="18dp"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <EditText
 | 
					    <EditText
 | 
				
			||||||
        android:id="@+id/edt_otp"
 | 
					        android:id="@+id/edt_otp"
 | 
				
			||||||
@ -98,17 +116,38 @@
 | 
				
			|||||||
        android:textSize="14sp"
 | 
					        android:textSize="14sp"
 | 
				
			||||||
        android:textStyle="bold"
 | 
					        android:textStyle="bold"
 | 
				
			||||||
        android:inputType="numberPassword"
 | 
					        android:inputType="numberPassword"
 | 
				
			||||||
        android:maxLength="6"/>
 | 
					        android:maxLength="6"
 | 
				
			||||||
 | 
					        android:visibility="gone"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <Button
 | 
					    <Button
 | 
				
			||||||
        android:id="@+id/verifynproceed"
 | 
					        android:id="@+id/verifynproceed"
 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
        android:layout_marginTop="58dp"
 | 
					        android:layout_marginTop="100dp"
 | 
				
			||||||
        android:background="@drawable/bg_btn_with_stroke"
 | 
					        android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
        android:text="Verify and Proceed"
 | 
					        android:text="Face recognition and registration"
 | 
				
			||||||
        android:textAllCaps="false"
 | 
					        android:textAllCaps="true"
 | 
				
			||||||
        android:textColor="@color/white"
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        android:visibility="gone"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <TextView
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Please have your username and password, which have been provided by the administration before proceeding"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:textColor="#576277"
 | 
				
			||||||
 | 
					        android:layout_marginTop="50dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <TextView
 | 
				
			||||||
 | 
					        android:id="@+id/skip"
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Next"
 | 
				
			||||||
 | 
					        android:textSize="20sp"
 | 
				
			||||||
 | 
					        android:textStyle="bold"
 | 
				
			||||||
 | 
					        android:textColor="#3D529E"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:layout_marginTop="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</LinearLayout>
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,123 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout
 | 
				
			||||||
 | 
					    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:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
 | 
					    tools:context=".ReportActivity"
 | 
				
			||||||
 | 
					    android:orientation="vertical"
 | 
				
			||||||
 | 
					    android:padding="23dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal">
 | 
				
			||||||
 | 
					        <ImageButton
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="14dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:background="@color/white"
 | 
				
			||||||
 | 
					            android:contentDescription="Back"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="Attendance Reports"
 | 
				
			||||||
 | 
					            android:textSize="18sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="100dp"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <!--<TextView
 | 
				
			||||||
 | 
					        android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:text="Reports"
 | 
				
			||||||
 | 
					        android:textSize="30sp"
 | 
				
			||||||
 | 
					        android:textStyle="bold"
 | 
				
			||||||
 | 
					        android:textColor="#3D529E"
 | 
				
			||||||
 | 
					        android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					        android:layout_marginTop="60dp"/>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/fromDate"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="60dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="20dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/calender"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/textFromDate"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="From date"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="100dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:id="@+id/toDate"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:orientation="horizontal"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_button_time"
 | 
				
			||||||
 | 
					        android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:layout_width="20dp"
 | 
				
			||||||
 | 
					            android:layout_height="20dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/calender"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/textToDate"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:text="To date"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:layout_gravity="center"
 | 
				
			||||||
 | 
					            android:paddingLeft="110dp"
 | 
				
			||||||
 | 
					            android:textSize="17sp"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Button
 | 
				
			||||||
 | 
					        android:id="@+id/btnReport"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:layout_marginLeft="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginRight="14dp"
 | 
				
			||||||
 | 
					        android:layout_marginTop="70dp"
 | 
				
			||||||
 | 
					        android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					        android:text="Submit"
 | 
				
			||||||
 | 
					        android:textAllCaps="false"
 | 
				
			||||||
 | 
					        android:textColor="@color/white"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -0,0 +1,251 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<RelativeLayout
 | 
				
			||||||
 | 
					    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:layout_width="match_parent"
 | 
				
			||||||
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
 | 
					    tools:context=".ReportActivity"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/rl_1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="60dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ImageView
 | 
				
			||||||
 | 
					            android:id="@+id/back"
 | 
				
			||||||
 | 
					            android:layout_width="30dp"
 | 
				
			||||||
 | 
					            android:layout_height="30dp"
 | 
				
			||||||
 | 
					            android:layout_centerVertical="true"
 | 
				
			||||||
 | 
					            android:layout_marginLeft="10dp"
 | 
				
			||||||
 | 
					            android:src="@drawable/ic_baseline_arrow_back_24"
 | 
				
			||||||
 | 
					            android:backgroundTint="@color/white"></ImageView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <TextView
 | 
				
			||||||
 | 
					            android:id="@+id/txt_report"
 | 
				
			||||||
 | 
					            android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					            android:textStyle="bold"
 | 
				
			||||||
 | 
					            android:textSize="15sp"
 | 
				
			||||||
 | 
					            android:textColor="@color/black"
 | 
				
			||||||
 | 
					            android:text="Report Details"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/rl2"
 | 
				
			||||||
 | 
					        android:layout_marginTop="45dp"
 | 
				
			||||||
 | 
					        android:layout_below="@id/rl_1"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <RelativeLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="30dp"
 | 
				
			||||||
 | 
					            android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginBottom="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/empId"
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="EmployeeID :"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/empIdVal"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_toRightOf="@id/empId"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:text="EmployeeID"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/rl3"
 | 
				
			||||||
 | 
					        android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					        android:layout_below="@id/rl2"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <RelativeLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="30dp"
 | 
				
			||||||
 | 
					            android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginBottom="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/pdate"
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Pdate :"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/pdateVal"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_toRightOf="@id/pdate"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:text="Pdate"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/rl4"
 | 
				
			||||||
 | 
					        android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					        android:layout_below="@id/rl3"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <RelativeLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="30dp"
 | 
				
			||||||
 | 
					            android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginBottom="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/Check_In"
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Check In :"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/Check_InVal"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_toRightOf="@id/Check_In"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:text="Check In"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/rl5"
 | 
				
			||||||
 | 
					        android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					        android:layout_below="@id/rl4"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <RelativeLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="30dp"
 | 
				
			||||||
 | 
					            android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginBottom="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/Check_Out"
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Check Out :"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/Check_OutVal"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_toRightOf="@id/Check_Out"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:text="Check Out"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					    <RelativeLayout
 | 
				
			||||||
 | 
					        android:id="@+id/rl6"
 | 
				
			||||||
 | 
					        android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					        android:layout_below="@id/rl5"
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <RelativeLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="30dp"
 | 
				
			||||||
 | 
					            android:layout_marginStart="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginTop="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginEnd="15dp"
 | 
				
			||||||
 | 
					            android:layout_marginBottom="15dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/status"
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Status :"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/statusVal"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_toRightOf="@id/status"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:text="Status"
 | 
				
			||||||
 | 
					                android:textColor="@color/black"
 | 
				
			||||||
 | 
					                android:textSize="15sp"
 | 
				
			||||||
 | 
					                android:textStyle="normal"></TextView>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</RelativeLayout>
 | 
				
			||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
    android:layout_width="match_parent"
 | 
					    android:layout_width="match_parent"
 | 
				
			||||||
    android:layout_height="match_parent"
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
    tools:context=".Splashactivity"
 | 
					    tools:context=".Splashactivity"
 | 
				
			||||||
    android:background="#4262D3">
 | 
					    android:background="@color/white">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <RelativeLayout
 | 
					    <RelativeLayout
 | 
				
			||||||
        android:id="@+id/splash"
 | 
					        android:id="@+id/splash"
 | 
				
			||||||
@ -21,8 +21,7 @@
 | 
				
			|||||||
            android:layout_centerInParent="true"
 | 
					            android:layout_centerInParent="true"
 | 
				
			||||||
            android:layout_marginLeft="90px"
 | 
					            android:layout_marginLeft="90px"
 | 
				
			||||||
            android:layout_marginRight="90px"
 | 
					            android:layout_marginRight="90px"
 | 
				
			||||||
            android:src="@drawable/splash_logo"
 | 
					            android:src="@drawable/ese" />
 | 
				
			||||||
            />
 | 
					 | 
				
			||||||
    </RelativeLayout>
 | 
					    </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</RelativeLayout>
 | 
					</RelativeLayout>
 | 
				
			||||||
@ -19,6 +19,44 @@
 | 
				
			|||||||
            android:paddingRight="@dimen/activity_horizontal_margin"
 | 
					            android:paddingRight="@dimen/activity_horizontal_margin"
 | 
				
			||||||
            android:paddingTop="@dimen/activity_vertical_margin">
 | 
					            android:paddingTop="@dimen/activity_vertical_margin">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:layout_width="350px"
 | 
				
			||||||
 | 
					                android:layout_height="350px"
 | 
				
			||||||
 | 
					                android:layout_gravity="center"
 | 
				
			||||||
 | 
					                android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					                android:background="@drawable/circular"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="160px"
 | 
				
			||||||
 | 
					                    android:layout_height="180px"
 | 
				
			||||||
 | 
					                    android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					                    android:layout_marginTop="30dp"
 | 
				
			||||||
 | 
					                    android:background="@drawable/ese" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Hello again!"
 | 
				
			||||||
 | 
					                android:textSize="30sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:textColor="#3D529E"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:layout_marginTop="30dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:text="Please enter username and password provided by the administrator"
 | 
				
			||||||
 | 
					                android:textSize="10sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:textColor="#576277"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_horizontal"
 | 
				
			||||||
 | 
					                android:layout_marginTop="2dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <com.google.android.material.textfield.TextInputLayout
 | 
					            <com.google.android.material.textfield.TextInputLayout
 | 
				
			||||||
                android:id="@+id/loginWrapper"
 | 
					                android:id="@+id/loginWrapper"
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
@ -82,7 +120,7 @@
 | 
				
			|||||||
                    android:layout_width="match_parent"
 | 
					                    android:layout_width="match_parent"
 | 
				
			||||||
                    android:layout_height="wrap_content"
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
                    android:hint="@string/password"
 | 
					                    android:hint="@string/password"
 | 
				
			||||||
                    android:inputType="number"
 | 
					                    android:inputType="numberPassword"
 | 
				
			||||||
                    android:textColor="@android:color/black"
 | 
					                    android:textColor="@android:color/black"
 | 
				
			||||||
                    android:textSize="16sp" />
 | 
					                    android:textSize="16sp" />
 | 
				
			||||||
            </com.google.android.material.textfield.TextInputLayout>
 | 
					            </com.google.android.material.textfield.TextInputLayout>
 | 
				
			||||||
@ -96,7 +134,7 @@
 | 
				
			|||||||
                android:layout_marginTop="35dp"
 | 
					                android:layout_marginTop="35dp"
 | 
				
			||||||
                android:background="@drawable/selector_button"
 | 
					                android:background="@drawable/selector_button"
 | 
				
			||||||
                android:enabled="false"
 | 
					                android:enabled="false"
 | 
				
			||||||
                android:text="@string/register_sign_up"
 | 
					                android:text="NEXT"
 | 
				
			||||||
                android:textColor="@android:color/white"
 | 
					                android:textColor="@android:color/white"
 | 
				
			||||||
                android:textSize="14sp"/>
 | 
					                android:textSize="14sp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@
 | 
				
			|||||||
            android:layout_width="@dimen/rounded_photo_size"
 | 
					            android:layout_width="@dimen/rounded_photo_size"
 | 
				
			||||||
            android:layout_height="@dimen/rounded_photo_size"
 | 
					            android:layout_height="@dimen/rounded_photo_size"
 | 
				
			||||||
            android:scaleType="centerCrop"
 | 
					            android:scaleType="centerCrop"
 | 
				
			||||||
            app:riv_border_color="@color/accentColor"
 | 
					            app:riv_border_color="#4262D3"
 | 
				
			||||||
            app:riv_border_width="7dp"
 | 
					            app:riv_border_width="7dp"
 | 
				
			||||||
            app:riv_mutate_background="true"
 | 
					            app:riv_mutate_background="true"
 | 
				
			||||||
            app:riv_oval="false"/>
 | 
					            app:riv_oval="false"/>
 | 
				
			||||||
@ -43,7 +43,7 @@
 | 
				
			|||||||
        android:layout_centerHorizontal="true"
 | 
					        android:layout_centerHorizontal="true"
 | 
				
			||||||
        android:layout_marginBottom="10dp"
 | 
					        android:layout_marginBottom="10dp"
 | 
				
			||||||
        android:text="@string/retry"
 | 
					        android:text="@string/retry"
 | 
				
			||||||
        android:textColor="@color/accentColor"
 | 
					        android:textColor="#4262D3"
 | 
				
			||||||
        android:textSize="14sp"/>
 | 
					        android:textSize="14sp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <Button
 | 
					    <Button
 | 
				
			||||||
@ -53,8 +53,8 @@
 | 
				
			|||||||
        android:layout_alignParentBottom="true"
 | 
					        android:layout_alignParentBottom="true"
 | 
				
			||||||
        android:layout_gravity="bottom"
 | 
					        android:layout_gravity="bottom"
 | 
				
			||||||
        android:layout_marginBottom="@dimen/button_margin_bottom"
 | 
					        android:layout_marginBottom="@dimen/button_margin_bottom"
 | 
				
			||||||
        android:background="@color/accentColor"
 | 
					        android:background="#4262D3"
 | 
				
			||||||
        android:text="@string/Ok"
 | 
					        android:text="Confirm"
 | 
				
			||||||
        android:textColor="@android:color/white"
 | 
					        android:textColor="@android:color/white"
 | 
				
			||||||
        android:textSize="14sp"/>
 | 
					        android:textSize="14sp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,12 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
					<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
    android:layout_width="match_parent"
 | 
					    android:layout_width="match_parent"
 | 
				
			||||||
    android:layout_height="wrap_content"
 | 
					    android:layout_height="match_parent"
 | 
				
			||||||
    android:orientation="vertical"
 | 
					    android:orientation="vertical">
 | 
				
			||||||
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <LinearLayout
 | 
					    <LinearLayout
 | 
				
			||||||
        android:layout_width="match_parent"
 | 
					        android:layout_width="250dp"
 | 
				
			||||||
        android:layout_height="wrap_content"
 | 
					        android:layout_height="match_parent"
 | 
				
			||||||
        android:orientation="vertical"
 | 
					        android:orientation="vertical"
 | 
				
			||||||
        android:background="@drawable/shape"
 | 
					        android:background="@drawable/shape"
 | 
				
			||||||
        android:layout_margin="15dp" >
 | 
					        android:layout_margin="15dp" >
 | 
				
			||||||
@ -18,8 +16,6 @@
 | 
				
			|||||||
            android:layout_height="wrap_content"
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            <RelativeLayout
 | 
					            <RelativeLayout
 | 
				
			||||||
                android:id="@+id/rel1"
 | 
					                android:id="@+id/rel1"
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
@ -35,9 +31,10 @@
 | 
				
			|||||||
                    android:background="@drawable/andrew" />
 | 
					                    android:background="@drawable/andrew" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <TextView
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/username"
 | 
				
			||||||
                    android:layout_width="wrap_content"
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
                    android:layout_height="wrap_content"
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
                    android:text="Andrew Bahl"
 | 
					                    android:text="User"
 | 
				
			||||||
                    android:layout_toRightOf="@id/menu"
 | 
					                    android:layout_toRightOf="@id/menu"
 | 
				
			||||||
                    android:layout_centerVertical="true"
 | 
					                    android:layout_centerVertical="true"
 | 
				
			||||||
                    android:layout_marginLeft="20dp"
 | 
					                    android:layout_marginLeft="20dp"
 | 
				
			||||||
@ -48,19 +45,169 @@
 | 
				
			|||||||
            </RelativeLayout>
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <View
 | 
					            <View
 | 
				
			||||||
                android:id="@+id/view"
 | 
					                android:id="@+id/view1"
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
                android:layout_height="1dp"
 | 
					                android:layout_height="1dp"
 | 
				
			||||||
                android:background="#4262D3"
 | 
					                android:background="#adadad"
 | 
				
			||||||
                android:layout_gravity="center_vertical"
 | 
					                android:layout_gravity="center_vertical"
 | 
				
			||||||
                android:layout_below="@id/rel1"
 | 
					                android:layout_below="@id/rel1"
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <RelativeLayout
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel2"
 | 
				
			||||||
                android:layout_width="match_parent"
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
                android:layout_height="wrap_content"
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
                android:padding="15dp"
 | 
					                android:padding="15dp"
 | 
				
			||||||
                android:layout_below="@id/view">
 | 
					                android:layout_below="@id/view1">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:id="@+id/req"
 | 
				
			||||||
 | 
					                    android:layout_width="20dp"
 | 
				
			||||||
 | 
					                    android:layout_height="20dp"
 | 
				
			||||||
 | 
					                    android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					                    android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					                    android:background="@drawable/permission" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/request"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Permission"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/req"
 | 
				
			||||||
 | 
					                    android:layout_centerVertical="true"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="38dp"
 | 
				
			||||||
 | 
					                    android:textSize="16sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <View
 | 
				
			||||||
 | 
					                android:id="@+id/view2"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="1dp"
 | 
				
			||||||
 | 
					                android:background="#adadad"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel2"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel3"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:padding="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/view2">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:id="@+id/approval"
 | 
				
			||||||
 | 
					                    android:layout_width="20dp"
 | 
				
			||||||
 | 
					                    android:layout_height="20dp"
 | 
				
			||||||
 | 
					                    android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					                    android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					                    android:background="@drawable/approval" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/permissionApproval"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Permission appoval"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/approval"
 | 
				
			||||||
 | 
					                    android:layout_centerVertical="true"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="38dp"
 | 
				
			||||||
 | 
					                    android:textSize="16sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <View
 | 
				
			||||||
 | 
					                android:id="@+id/view3"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="1dp"
 | 
				
			||||||
 | 
					                android:background="#adadad"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel3"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel4"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:padding="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/view3">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:id="@+id/rep"
 | 
				
			||||||
 | 
					                    android:layout_width="20dp"
 | 
				
			||||||
 | 
					                    android:layout_height="20dp"
 | 
				
			||||||
 | 
					                    android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					                    android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					                    android:background="@drawable/report" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/report"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Attendance Report"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/rep"
 | 
				
			||||||
 | 
					                    android:layout_centerVertical="true"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="38dp"
 | 
				
			||||||
 | 
					                    android:textSize="16sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <View
 | 
				
			||||||
 | 
					                android:id="@+id/view4"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="1dp"
 | 
				
			||||||
 | 
					                android:background="#adadad"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel4"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:id="@+id/rel5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:padding="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/view4">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:id="@+id/emer"
 | 
				
			||||||
 | 
					                    android:layout_width="20dp"
 | 
				
			||||||
 | 
					                    android:layout_height="20dp"
 | 
				
			||||||
 | 
					                    android:layout_alignParentLeft="true"
 | 
				
			||||||
 | 
					                    android:layout_centerInParent="true"
 | 
				
			||||||
 | 
					                    android:background="@drawable/emergency" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:id="@+id/emergency"
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Emergency SOS"
 | 
				
			||||||
 | 
					                    android:layout_toRightOf="@id/emer"
 | 
				
			||||||
 | 
					                    android:layout_centerVertical="true"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="38dp"
 | 
				
			||||||
 | 
					                    android:textSize="16sp"
 | 
				
			||||||
 | 
					                    android:textStyle="bold"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </RelativeLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <View
 | 
				
			||||||
 | 
					                android:id="@+id/view5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="1dp"
 | 
				
			||||||
 | 
					                android:background="#adadad"
 | 
				
			||||||
 | 
					                android:layout_gravity="center_vertical"
 | 
				
			||||||
 | 
					                android:layout_below="@id/rel5"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <RelativeLayout
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:padding="15dp"
 | 
				
			||||||
 | 
					                android:layout_below="@id/view5">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <ImageView
 | 
					                <ImageView
 | 
				
			||||||
                    android:id="@+id/log"
 | 
					                    android:id="@+id/log"
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,191 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
 | 
					<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
				
			||||||
 | 
					    android:layout_width="fill_parent"
 | 
				
			||||||
 | 
					    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					    android:orientation="horizontal">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <LinearLayout
 | 
				
			||||||
 | 
					        android:layout_width="match_parent"
 | 
				
			||||||
 | 
					        android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					        android:weightSum="2"
 | 
				
			||||||
 | 
					        android:padding="10dp"
 | 
				
			||||||
 | 
					        android:layout_margin="10dp"
 | 
				
			||||||
 | 
					        android:orientation="vertical"
 | 
				
			||||||
 | 
					        android:background="@drawable/edittext_border"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="horizontal">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/EmployeeName"
 | 
				
			||||||
 | 
					                android:text="Employee Name"
 | 
				
			||||||
 | 
					                android:layout_marginTop="5dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="5dp"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:textSize="18sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:layout_width="fill_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="@color/colorPrimary" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/EmployeeNameVal"
 | 
				
			||||||
 | 
					                android:text="EmployeeName"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="#5d5d5d"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="horizontal">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/EmployeeID"
 | 
				
			||||||
 | 
					                android:text="Employee ID"
 | 
				
			||||||
 | 
					                android:layout_marginTop="5dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="5dp"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:textSize="18sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:layout_width="fill_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="@color/colorPrimary" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/EmployeeIDVal"
 | 
				
			||||||
 | 
					                android:text="EmployeeID"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="#5d5d5d"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="horizontal">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/LeaveType"
 | 
				
			||||||
 | 
					                android:text="Leave Type"
 | 
				
			||||||
 | 
					                android:layout_marginTop="5dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="5dp"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:textSize="18sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:layout_width="fill_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="@color/colorPrimary" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/LeaveTypeVal"
 | 
				
			||||||
 | 
					                android:text="LeaveType"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="#5d5d5d"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="horizontal">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/ApproverName"
 | 
				
			||||||
 | 
					                android:text="Approver Name"
 | 
				
			||||||
 | 
					                android:layout_marginTop="5dp"
 | 
				
			||||||
 | 
					                android:layout_marginBottom="5dp"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:textSize="18sp"
 | 
				
			||||||
 | 
					                android:textStyle="bold"
 | 
				
			||||||
 | 
					                android:layout_width="fill_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="@color/colorPrimary" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <TextView
 | 
				
			||||||
 | 
					                android:id="@+id/ApproverNameVal"
 | 
				
			||||||
 | 
					                android:text="ApproverName"
 | 
				
			||||||
 | 
					                android:layout_weight="0.5"
 | 
				
			||||||
 | 
					                android:layout_width="match_parent"
 | 
				
			||||||
 | 
					                android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                android:textColor="#5d5d5d"
 | 
				
			||||||
 | 
					                android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <LinearLayout
 | 
				
			||||||
 | 
					            android:layout_width="match_parent"
 | 
				
			||||||
 | 
					            android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					            android:orientation="horizontal"
 | 
				
			||||||
 | 
					            android:gravity="center_horizontal"
 | 
				
			||||||
 | 
					            android:layout_marginRight="5dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="90dp"
 | 
				
			||||||
 | 
					                android:layout_height="25dp"
 | 
				
			||||||
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_btn_with_stroke"
 | 
				
			||||||
 | 
					                android:padding="2dp">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:src="@drawable/tick"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="4dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Approve"
 | 
				
			||||||
 | 
					                    android:textColor="@color/white"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="10dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <LinearLayout
 | 
				
			||||||
 | 
					                android:layout_width="90dp"
 | 
				
			||||||
 | 
					                android:layout_height="25dp"
 | 
				
			||||||
 | 
					                android:orientation="horizontal"
 | 
				
			||||||
 | 
					                android:background="@drawable/bg_btn_with_stroke_grey"
 | 
				
			||||||
 | 
					                android:padding="2dp"
 | 
				
			||||||
 | 
					                android:layout_marginLeft="5dp"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <ImageView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:src="@drawable/cross"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="4dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextView
 | 
				
			||||||
 | 
					                    android:layout_width="wrap_content"
 | 
				
			||||||
 | 
					                    android:layout_height="wrap_content"
 | 
				
			||||||
 | 
					                    android:text="Reject"
 | 
				
			||||||
 | 
					                    android:textColor="#CB1A1A"
 | 
				
			||||||
 | 
					                    android:layout_gravity="center"
 | 
				
			||||||
 | 
					                    android:layout_marginLeft="15dp"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </LinearLayout>
 | 
				
			||||||
 | 
					</LinearLayout>
 | 
				
			||||||
@ -112,7 +112,7 @@
 | 
				
			|||||||
    <string name="zoom_in_and_look_straight_at_the_camera">Zoom in slowly and look straight at the camera</string>
 | 
					    <string name="zoom_in_and_look_straight_at_the_camera">Zoom in slowly and look straight at the camera</string>
 | 
				
			||||||
    <string name="zoom_success">Success!</string>
 | 
					    <string name="zoom_success">Success!</string>
 | 
				
			||||||
    <string name="selfie" translatable="false">Tap to login with <b>Selfie Validation</b></string>
 | 
					    <string name="selfie" translatable="false">Tap to login with <b>Selfie Validation</b></string>
 | 
				
			||||||
    <string name="login" translatable="false">Sign up using your <b>Login Credential</b></string>
 | 
					    <string name="login" translatable="false">Please enter your <b>Login Credentials</b></string>
 | 
				
			||||||
    <string name="styled" translatable="false">Tap to login with <b>Selfie Validation</b></string>
 | 
					    <string name="styled" translatable="false">Tap to login with <b>Selfie Validation</b></string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -120,4 +120,13 @@
 | 
				
			|||||||
    <string name="nav_open" translatable="false">Open</string>
 | 
					    <string name="nav_open" translatable="false">Open</string>
 | 
				
			||||||
    <string name="nav_close" translatable="false">Close</string>
 | 
					    <string name="nav_close" translatable="false">Close</string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <string name="hyperlink" translatable="false"><a href="https://www.geeksforgeeks.org/">Face registration</a></string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <string-array name="spinner_items">
 | 
				
			||||||
 | 
					        <item>School Meeting</item>
 | 
				
			||||||
 | 
					        <item>Private</item>
 | 
				
			||||||
 | 
					        <item>Official-Work</item>
 | 
				
			||||||
 | 
					        <item>Bad Weather Leave</item>
 | 
				
			||||||
 | 
					    </string-array>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</resources>
 | 
					</resources>
 | 
				
			||||||
 | 
				
			|||||||