first commit
commit
40c8d4858b
|
@ -0,0 +1,15 @@
|
||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="17" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
<option name="resolveExternalAnnotations" value="false" />
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1 @@
|
||||||
|
/build
|
|
@ -0,0 +1,54 @@
|
||||||
|
plugins {
|
||||||
|
alias(libs.plugins.androidApplication)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.example.qualitychecker'
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.example.qualitychecker"
|
||||||
|
minSdk 24
|
||||||
|
targetSdk 34
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation libs.appcompat
|
||||||
|
implementation libs.material
|
||||||
|
implementation libs.activity
|
||||||
|
implementation libs.constraintlayout
|
||||||
|
testImplementation libs.junit
|
||||||
|
androidTestImplementation libs.ext.junit
|
||||||
|
androidTestImplementation libs.espresso.core
|
||||||
|
dependencies {
|
||||||
|
// Other dependencies
|
||||||
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||||
|
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||||
|
implementation "androidx.navigation:navigation-fragment:2.4.0"
|
||||||
|
implementation "androidx.navigation:navigation-ui:2.4.0"
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.4.0'
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-livedata:2.4.0'
|
||||||
|
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||||||
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
||||||
|
implementation 'com.journeyapps:zxing-android-embedded:4.1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.example.qualitychecker;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
public void useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
|
assertEquals("com.example.qualitychecker", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" /> <!-- If your app needs to access network state -->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.CAMERA"/>
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
|
tools:targetApi="31">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="com.google.zxing.client.android.CaptureActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||||
|
android:windowSoftInputMode="stateAlwaysHidden" >
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.google.zxing.client.android.SCAN" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activities.MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="stateAlwaysVisible|adjustResize">
|
||||||
|
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activities.HomeActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="stateAlwaysVisible|adjustResize">
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".ui.activities.LoginActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="stateAlwaysVisible|adjustResize">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.example.qualitychecker.apiservice;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.models.EmployeePhoto;
|
||||||
|
import com.example.qualitychecker.models.InspectionCheckPoint;
|
||||||
|
import com.example.qualitychecker.models.InspectionDefect;
|
||||||
|
import com.example.qualitychecker.models.InspectionDimension;
|
||||||
|
import com.example.qualitychecker.models.InspectionReport;
|
||||||
|
import com.example.qualitychecker.models.InspectionReportItem;
|
||||||
|
import com.example.qualitychecker.models.ItemUnit;
|
||||||
|
import com.example.qualitychecker.models.Product;
|
||||||
|
import com.example.qualitychecker.models.VoiceOfCustomer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
import retrofit2.http.Path;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface ApiService {
|
||||||
|
|
||||||
|
@GET("rest/uic/inspection-report")
|
||||||
|
Call<List<InspectionReport>> fetchAllReports();
|
||||||
|
|
||||||
|
@GET("rest/uic/inspection-report/{id}")
|
||||||
|
Call<InspectionReport> fetchReport(
|
||||||
|
@Path("id") long id
|
||||||
|
);
|
||||||
|
|
||||||
|
@POST("rest/authentication/authenticate-user")
|
||||||
|
Call<Boolean> isUserAuthenticated(
|
||||||
|
@Query("username") String username,
|
||||||
|
@Query("password") String password,
|
||||||
|
@Query("roles") String[] roles
|
||||||
|
);
|
||||||
|
|
||||||
|
@POST("rest/uic/inspection-report")
|
||||||
|
Call<InspectionReport> saveInspectionReport(
|
||||||
|
@Body InspectionReport inspectionReport
|
||||||
|
);
|
||||||
|
|
||||||
|
@GET("rest/uic/cosmos-products/find-by-sku")
|
||||||
|
Call<List<Product>> fetchProductBySku(
|
||||||
|
@Query("sku") String sku
|
||||||
|
);
|
||||||
|
|
||||||
|
@GET("rest/uic/inspection-report/checkpoints")
|
||||||
|
Call<List<InspectionCheckPoint>> fetchCheckPoints();
|
||||||
|
|
||||||
|
@GET( "rest/uic/inspection-report/defects" )
|
||||||
|
Call<List<InspectionDefect>> fetchDefects();
|
||||||
|
|
||||||
|
@GET( "rest/uic/inspection-report/dimensions" )
|
||||||
|
Call<List<InspectionDimension>> fetchDimensions();
|
||||||
|
|
||||||
|
@GET( "rest/hrms/employees/attendance")
|
||||||
|
Call<EmployeePhoto> fetchEmployeePhoto( @Query("username") String username );
|
||||||
|
|
||||||
|
@GET("rest/cosmos/amazon-voc")
|
||||||
|
Call<List<VoiceOfCustomer>> fetchVocs( @Query("asin") String asin );
|
||||||
|
|
||||||
|
@GET( "rest/uic/cosmos-products/find-by-fnsku")
|
||||||
|
Call<Product> fetchByFnsku(
|
||||||
|
@Query("fnsku") String fnsku
|
||||||
|
);
|
||||||
|
|
||||||
|
@GET( "rest/uic/inspection-report/inspection-items-logs" )
|
||||||
|
Call<List<InspectionReportItem>> fetchItemsLogs(
|
||||||
|
@Query("sku") String sku
|
||||||
|
);
|
||||||
|
|
||||||
|
@GET( "rest/uic/items/units" )
|
||||||
|
Call<List<ItemUnit>> fetchItemUnits();
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.example.qualitychecker.apiservice;
|
||||||
|
|
||||||
|
import retrofit2.Retrofit;
|
||||||
|
|
||||||
|
public class ApiServiceFactory {
|
||||||
|
private static ApiService apiService;
|
||||||
|
public synchronized static ApiService getApiService() {
|
||||||
|
if ( apiService == null ) {
|
||||||
|
Retrofit retrofit = RetrofitClient.getClient();
|
||||||
|
apiService = retrofit.create( ApiService.class );
|
||||||
|
}
|
||||||
|
return apiService;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.example.qualitychecker.apiservice;
|
||||||
|
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonToken;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class BooleanTypeAdapter extends TypeAdapter<Boolean> {
|
||||||
|
@Override
|
||||||
|
public Boolean read(JsonReader in) throws IOException {
|
||||||
|
JsonToken token = in.peek();
|
||||||
|
if (token == JsonToken.BOOLEAN) {
|
||||||
|
return in.nextBoolean();
|
||||||
|
} else if (token == JsonToken.STRING) {
|
||||||
|
String value = in.nextString();
|
||||||
|
return Boolean.parseBoolean(value);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(JsonWriter out, Boolean value) throws IOException {
|
||||||
|
out.value(value);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.example.qualitychecker.apiservice;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
|
import retrofit2.Retrofit;
|
||||||
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
|
|
||||||
|
public class RetrofitClient {
|
||||||
|
|
||||||
|
private final static String BASE_URL = "http://192.168.91.16:8080/uind/";
|
||||||
|
private static Retrofit retrofit;
|
||||||
|
|
||||||
|
public synchronized static Retrofit getClient() {
|
||||||
|
|
||||||
|
Gson gson = new GsonBuilder()
|
||||||
|
.registerTypeAdapter(Boolean.class, new BooleanTypeAdapter())
|
||||||
|
.create();
|
||||||
|
|
||||||
|
if ( retrofit == null ) {
|
||||||
|
retrofit = new Retrofit.Builder()
|
||||||
|
.baseUrl( BASE_URL )
|
||||||
|
.addConverterFactory( GsonConverterFactory.create( gson ) )
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
return retrofit;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public class Dimension {
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
private float actual;
|
||||||
|
private float required;
|
||||||
|
private float difference;
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
public Dimension(){
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getActual() {
|
||||||
|
return actual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActual(float actual) {
|
||||||
|
this.actual = actual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getRequired() {
|
||||||
|
return required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequired(float required) {
|
||||||
|
this.required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getDifference() {
|
||||||
|
return difference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDifference(float difference) {
|
||||||
|
this.difference = difference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Dimension{" +
|
||||||
|
"type='" + type + '\'' +
|
||||||
|
", actual=" + actual +
|
||||||
|
", required=" + required +
|
||||||
|
", difference=" + difference +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
|
||||||
|
public class EmployeePhoto {
|
||||||
|
private long id;
|
||||||
|
private long employeeId;
|
||||||
|
private String photoBlob;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public EmployeePhoto() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmployeePhoto( long employeeId, String photoBlob ) {
|
||||||
|
this.employeeId = employeeId;
|
||||||
|
this.photoBlob = photoBlob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId( long id ) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getEmployeeId() {
|
||||||
|
return employeeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmployeeId( long employeeId ) {
|
||||||
|
this.employeeId = employeeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhotoBlob() {
|
||||||
|
return photoBlob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoBlob( String photoBlob ) {
|
||||||
|
this.photoBlob = photoBlob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "EmployeePhoto{" +
|
||||||
|
"id=" + id +
|
||||||
|
", employeeId=" + employeeId +
|
||||||
|
", photoBlob='" + photoBlob + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
|
||||||
|
public class InspectionCheckPoint {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private String title;
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionCheckPoint{" +
|
||||||
|
"id=" + id +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", category='" + category + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public class InspectionDefect {
|
||||||
|
|
||||||
|
private String category;
|
||||||
|
private String defect;
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefect() {
|
||||||
|
return defect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefect(String defect) {
|
||||||
|
this.defect = defect;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionDefect{" +
|
||||||
|
"category='" + category + '\'' +
|
||||||
|
", defect='" + defect + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public class InspectionDimension {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionDimension{" +
|
||||||
|
"id=" + id +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,111 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
public class InspectionItemCheckPoint {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private long inspectionItemId;
|
||||||
|
private String title;
|
||||||
|
private boolean checked;
|
||||||
|
private String remarks;
|
||||||
|
// wrapper
|
||||||
|
private String defectSeverity;
|
||||||
|
private InspectionItemDefect defect;
|
||||||
|
private byte[] file;
|
||||||
|
private String imagePath;
|
||||||
|
|
||||||
|
private String defectTitle;
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getChecked() {
|
||||||
|
return checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChecked(boolean checked) {
|
||||||
|
this.checked = checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemarks() {
|
||||||
|
return remarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemarks(String remarks) {
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getInspectionItemId() {
|
||||||
|
return inspectionItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInspectionItemId(long inspectionItemId) {
|
||||||
|
this.inspectionItemId = inspectionItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getFile() {
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile(byte[] file) {
|
||||||
|
this.file = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefectSeverity() {
|
||||||
|
return defectSeverity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefectSeverity(String defectSeverity) {
|
||||||
|
this.defectSeverity = defectSeverity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefect(InspectionItemDefect defect) {
|
||||||
|
this.defect = defect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefectTitle() {
|
||||||
|
return defectTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefectTitle(String defectTitle) {
|
||||||
|
this.defectTitle = defectTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImagePath() {
|
||||||
|
return imagePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImagePath(String imagePath) {
|
||||||
|
this.imagePath = imagePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionItemCheckPoint{" +
|
||||||
|
"id=" + id +
|
||||||
|
", inspectionItemId=" + inspectionItemId +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", checked=" + checked +
|
||||||
|
", remarks='" + remarks + '\'' +
|
||||||
|
", defectSeverity='" + defectSeverity + '\'' +
|
||||||
|
", defect=" + defect +
|
||||||
|
", file=" + Arrays.toString(file) +
|
||||||
|
", imagePath='" + imagePath + '\'' +
|
||||||
|
", defectTitle='" + defectTitle + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
public class InspectionItemDefect {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private long cpId;
|
||||||
|
private String title;
|
||||||
|
private String defectSeverity;
|
||||||
|
// wrapper
|
||||||
|
private byte[] file;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCpId() {
|
||||||
|
return cpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCpId(long cpId) {
|
||||||
|
this.cpId = cpId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefectSeverity() {
|
||||||
|
return defectSeverity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefectSeverity(String defectSeverity) {
|
||||||
|
this.defectSeverity = defectSeverity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getFile() {
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile(byte[] file) {
|
||||||
|
this.file = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionItemDefect{" +
|
||||||
|
"id=" + id +
|
||||||
|
", cpId=" + cpId +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", file=" + Arrays.toString(file) +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
public class InspectionItemDimension {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private long inspectionItemId;
|
||||||
|
private String type;
|
||||||
|
private float actual;
|
||||||
|
private float required;
|
||||||
|
private float difference;
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
public InspectionItemDimension() {
|
||||||
|
}
|
||||||
|
public InspectionItemDimension(String type, float actual, float required, float difference, String unit) {
|
||||||
|
this.type = type;
|
||||||
|
this.actual = actual;
|
||||||
|
this.required = required;
|
||||||
|
this.difference = difference;
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getInspectionItemId() {
|
||||||
|
return inspectionItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInspectionItemId(long inspectionItemId) {
|
||||||
|
this.inspectionItemId = inspectionItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getActual() {
|
||||||
|
return actual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActual(float actual) {
|
||||||
|
this.actual = actual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getRequired() {
|
||||||
|
return required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequired(float required) {
|
||||||
|
this.required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getDifference() {
|
||||||
|
return difference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDifference(float difference) {
|
||||||
|
this.difference = difference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionItemDimension{" +
|
||||||
|
"id=" + id +
|
||||||
|
", inspectionItemId=" + inspectionItemId +
|
||||||
|
", type='" + type + '\'' +
|
||||||
|
", actual=" + actual +
|
||||||
|
", required=" + required +
|
||||||
|
", difference=" + difference +
|
||||||
|
", unit='" + unit + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,140 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class InspectionReport {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private boolean fri;
|
||||||
|
private String code;
|
||||||
|
private String generatedBy;
|
||||||
|
private String generatedAt;
|
||||||
|
private long siteId;
|
||||||
|
private long floorId;
|
||||||
|
private long departmentId;
|
||||||
|
private long functionId;
|
||||||
|
private String generalRemarks;
|
||||||
|
private String reportResult;
|
||||||
|
|
||||||
|
// wrapper
|
||||||
|
List<InspectionReportItem> items;
|
||||||
|
|
||||||
|
public InspectionReport(){
|
||||||
|
this.fri = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGeneratedBy() {
|
||||||
|
return generatedBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGeneratedBy(String generatedBy) {
|
||||||
|
this.generatedBy = generatedBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGeneratedAt() {
|
||||||
|
return generatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGeneratedAt(String generatedAt) {
|
||||||
|
this.generatedAt = generatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSiteId() {
|
||||||
|
return siteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSiteId(long siteId) {
|
||||||
|
this.siteId = siteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFloorId() {
|
||||||
|
return floorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloorId(long floorId) {
|
||||||
|
this.floorId = floorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getDepartmentId() {
|
||||||
|
return departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentId(long departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFunctionId() {
|
||||||
|
return functionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFunctionId(long functionId) {
|
||||||
|
this.functionId = functionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGeneralRemarks() {
|
||||||
|
return generalRemarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGeneralRemarks(String generalRemarks) {
|
||||||
|
this.generalRemarks = generalRemarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReportResult() {
|
||||||
|
return reportResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReportResult(String reportResult) {
|
||||||
|
this.reportResult = reportResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionReportItem> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<InspectionReportItem> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getFri() {
|
||||||
|
return fri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFri(boolean fri) {
|
||||||
|
this.fri = fri;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionReport{" +
|
||||||
|
"id=" + id +
|
||||||
|
", code='" + code + '\'' +
|
||||||
|
", generatedBy='" + generatedBy + '\'' +
|
||||||
|
", generatedAt=" + generatedAt +
|
||||||
|
", siteId=" + siteId +
|
||||||
|
", floorId=" + floorId +
|
||||||
|
", departmentId=" + departmentId +
|
||||||
|
", functionId=" + functionId +
|
||||||
|
", generalRemarks='" + generalRemarks + '\'' +
|
||||||
|
", reportResult='" + reportResult + '\'' +
|
||||||
|
", items=" + items +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,267 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class InspectionReportItem {
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
private long reportId;
|
||||||
|
private String asin;
|
||||||
|
private String parentAsin;
|
||||||
|
private String marketplace;
|
||||||
|
private String sku;
|
||||||
|
private String title;
|
||||||
|
private String hsCode;
|
||||||
|
private String modelNumber;
|
||||||
|
private long itemPerBox;
|
||||||
|
private String smColor;
|
||||||
|
private String smSize;
|
||||||
|
private String smItemName;
|
||||||
|
private String orderNumber;
|
||||||
|
private String article;
|
||||||
|
private float totalPresentPieces;
|
||||||
|
private float totalPresentPacks;
|
||||||
|
private float totalPresentCartons;
|
||||||
|
// sqrt( totalPresentCartons )
|
||||||
|
private float cartonsSelected;
|
||||||
|
private float packsSelected;
|
||||||
|
private float piecesSelected;
|
||||||
|
private String packingDetails;
|
||||||
|
private String sampleSize;
|
||||||
|
private String dateAdded;
|
||||||
|
// wrapper
|
||||||
|
private List<InspectionItemCheckPoint> checkPoints;
|
||||||
|
private List<InspectionItemDimension> dimensions;
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getReportId() {
|
||||||
|
return reportId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReportId(long reportId) {
|
||||||
|
this.reportId = reportId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAsin() {
|
||||||
|
return asin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAsin(String asin) {
|
||||||
|
this.asin = asin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentAsin() {
|
||||||
|
return parentAsin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentAsin(String parentAsin) {
|
||||||
|
this.parentAsin = parentAsin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarketplace() {
|
||||||
|
return marketplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarketplace(String marketplace) {
|
||||||
|
this.marketplace = marketplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku(String sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHsCode() {
|
||||||
|
return hsCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHsCode(String hsCode) {
|
||||||
|
this.hsCode = hsCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModelNumber() {
|
||||||
|
return modelNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModelNumber(String modelNumber) {
|
||||||
|
this.modelNumber = modelNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getItemPerBox() {
|
||||||
|
return itemPerBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemPerBox(long itemPerBox) {
|
||||||
|
this.itemPerBox = itemPerBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmColor() {
|
||||||
|
return smColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmColor(String smColor) {
|
||||||
|
this.smColor = smColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmSize() {
|
||||||
|
return smSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmSize(String smSize) {
|
||||||
|
this.smSize = smSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmItemName() {
|
||||||
|
return smItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmItemName(String smItemName) {
|
||||||
|
this.smItemName = smItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionItemCheckPoint> getCheckPoints() {
|
||||||
|
return checkPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckPoints(List<InspectionItemCheckPoint> checkPoints) {
|
||||||
|
this.checkPoints = checkPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionItemDimension> getDimensions() {
|
||||||
|
return dimensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDimensions(List<InspectionItemDimension> dimensions) {
|
||||||
|
this.dimensions = dimensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderNumber() {
|
||||||
|
return orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNumber(String orderNumber) {
|
||||||
|
this.orderNumber = orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArticle() {
|
||||||
|
return article;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArticle(String article) {
|
||||||
|
this.article = article;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTotalPresentPieces() {
|
||||||
|
return totalPresentPieces;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalPresentPieces(float totalPresentPieces) {
|
||||||
|
this.totalPresentPieces = totalPresentPieces;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTotalPresentPacks() {
|
||||||
|
return totalPresentPacks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalPresentPacks(float totalPresentPacks) {
|
||||||
|
this.totalPresentPacks = totalPresentPacks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTotalPresentCartons() {
|
||||||
|
return totalPresentCartons;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalPresentCartons(float totalPresentCartons) {
|
||||||
|
this.totalPresentCartons = totalPresentCartons;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCartonsSelected() {
|
||||||
|
return cartonsSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCartonsSelected(float cartonsSelected) {
|
||||||
|
this.cartonsSelected = cartonsSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPacksSelected() {
|
||||||
|
return packsSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPacksSelected(float packsSelected) {
|
||||||
|
this.packsSelected = packsSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPackingDetails() {
|
||||||
|
return packingDetails;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackingDetails(String packingDetails) {
|
||||||
|
this.packingDetails = packingDetails;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPiecesSelected() {
|
||||||
|
return piecesSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPiecesSelected(float piecesSelected) {
|
||||||
|
this.piecesSelected = piecesSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSampleSize() {
|
||||||
|
return sampleSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSampleSize(String sampleSize) {
|
||||||
|
this.sampleSize = sampleSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDateAdded() {
|
||||||
|
return dateAdded;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDateAdded(String dateAdded) {
|
||||||
|
this.dateAdded = dateAdded;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InspectionAuditReportItem{" +
|
||||||
|
"id=" + id +
|
||||||
|
", reportId=" + reportId +
|
||||||
|
", asin='" + asin + '\'' +
|
||||||
|
", parentAsin='" + parentAsin + '\'' +
|
||||||
|
", marketplace='" + marketplace + '\'' +
|
||||||
|
", sku='" + sku + '\'' +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", hsCode='" + hsCode + '\'' +
|
||||||
|
", modelNumber='" + modelNumber + '\'' +
|
||||||
|
", itemPerBox=" + itemPerBox +
|
||||||
|
", smColor='" + smColor + '\'' +
|
||||||
|
", smSize='" + smSize + '\'' +
|
||||||
|
", smItemName='" + smItemName + '\'' +
|
||||||
|
", checkPoints=" + checkPoints +
|
||||||
|
", dimensions=" + dimensions +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public class ItemUnit {
|
||||||
|
private long id;
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
public ItemUnit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemUnit( String title ) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId( long id ) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle( String title ) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ItemUnit{" +
|
||||||
|
"id=" + id +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,141 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public class Product {
|
||||||
|
|
||||||
|
private String asin;
|
||||||
|
private String parentAsin;
|
||||||
|
private String marketplace;
|
||||||
|
private String sku;
|
||||||
|
private String title;
|
||||||
|
private String hsCode;
|
||||||
|
private String modelNumber;
|
||||||
|
private long itemPerBox;
|
||||||
|
private String smColor;
|
||||||
|
private String smSize;
|
||||||
|
private String smItemName;
|
||||||
|
private long itemPerPack;
|
||||||
|
private long inventory;
|
||||||
|
|
||||||
|
public String getAsin() {
|
||||||
|
return asin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAsin(String asin) {
|
||||||
|
this.asin = asin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentAsin() {
|
||||||
|
return parentAsin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentAsin(String parentAsin) {
|
||||||
|
this.parentAsin = parentAsin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarketplace() {
|
||||||
|
return marketplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarketplace(String marketplace) {
|
||||||
|
this.marketplace = marketplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku(String sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHsCode() {
|
||||||
|
return hsCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHsCode(String hsCode) {
|
||||||
|
this.hsCode = hsCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModelNumber() {
|
||||||
|
return modelNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModelNumber(String modelNumber) {
|
||||||
|
this.modelNumber = modelNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getItemPerBox() {
|
||||||
|
return itemPerBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemPerBox(long itemPerBox) {
|
||||||
|
this.itemPerBox = itemPerBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmColor() {
|
||||||
|
return smColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmColor(String smColor) {
|
||||||
|
this.smColor = smColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmSize() {
|
||||||
|
return smSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmSize(String smSize) {
|
||||||
|
this.smSize = smSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSmItemName() {
|
||||||
|
return smItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmItemName(String smItemName) {
|
||||||
|
this.smItemName = smItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getItemPerPack() {
|
||||||
|
return itemPerPack;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemPerPack(long itemPerPack) {
|
||||||
|
this.itemPerPack = itemPerPack;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getInventory() {
|
||||||
|
return inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInventory(long inventory) {
|
||||||
|
this.inventory = inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Product{" +
|
||||||
|
"asin='" + asin + '\'' +
|
||||||
|
", parentAsin='" + parentAsin + '\'' +
|
||||||
|
", marketplace='" + marketplace + '\'' +
|
||||||
|
", sku='" + sku + '\'' +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", hsCode='" + hsCode + '\'' +
|
||||||
|
", modelNumber='" + modelNumber + '\'' +
|
||||||
|
", itemPerBox=" + itemPerBox +
|
||||||
|
", smColor='" + smColor + '\'' +
|
||||||
|
", smSize='" + smSize + '\'' +
|
||||||
|
", smItemName='" + smItemName + '\'' +
|
||||||
|
", itemPerPack=" + itemPerPack +
|
||||||
|
", inventory=" + inventory +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public interface SaveReportCallback {
|
||||||
|
void onSuccess();
|
||||||
|
void onFailure(Throwable throwable);
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.example.qualitychecker.models;
|
||||||
|
|
||||||
|
public class VoiceOfCustomer {
|
||||||
|
private String mskus;
|
||||||
|
private String marketplace;
|
||||||
|
private String itemName;
|
||||||
|
private String fnsku;
|
||||||
|
private String pcxHealth;
|
||||||
|
private String imageUrl;
|
||||||
|
private String asin;
|
||||||
|
|
||||||
|
public String getFnsku() {
|
||||||
|
return fnsku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFnsku(String fnsku) {
|
||||||
|
this.fnsku = fnsku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPcxHealth() {
|
||||||
|
return pcxHealth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPcxHealth(String pcxHealth) {
|
||||||
|
this.pcxHealth = pcxHealth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarketplace() {
|
||||||
|
return marketplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarketplace(String marketplace) {
|
||||||
|
this.marketplace = marketplace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAsin() {
|
||||||
|
return asin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAsin(String asin) {
|
||||||
|
this.asin = asin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImageUrl() {
|
||||||
|
return imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageUrl(String imageUrl) {
|
||||||
|
this.imageUrl = imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMskus() {
|
||||||
|
return mskus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMskus(String mskus) {
|
||||||
|
this.mskus = mskus;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getItemName() {
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemName(String itemName) {
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "VoiceOfCustomer{" +
|
||||||
|
"mskus='" + mskus + '\'' +
|
||||||
|
", marketplace='" + marketplace + '\'' +
|
||||||
|
", itemName='" + itemName + '\'' +
|
||||||
|
", fnsku='" + fnsku + '\'' +
|
||||||
|
", pcxHealth='" + pcxHealth + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
package com.example.qualitychecker.service;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.apiservice.ApiService;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiServiceFactory;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemCheckPoint;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemDefect;
|
||||||
|
import com.example.qualitychecker.models.InspectionReport;
|
||||||
|
import com.example.qualitychecker.models.SaveReportCallback;
|
||||||
|
import com.example.qualitychecker.store.Store;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class InspectionReportService {
|
||||||
|
|
||||||
|
private static InspectionReportService instance;
|
||||||
|
private ApiService apiService;
|
||||||
|
private List<String> defectTypes;
|
||||||
|
private List<String> dimensionTypes;
|
||||||
|
private List<String> reportResult;
|
||||||
|
private Store store;
|
||||||
|
|
||||||
|
// singleton instance
|
||||||
|
public synchronized static InspectionReportService getInstance(){
|
||||||
|
if( instance == null ){
|
||||||
|
instance = new InspectionReportService();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// initialize api service
|
||||||
|
{
|
||||||
|
apiService = ApiServiceFactory.getApiService();
|
||||||
|
defectTypes = Arrays.asList( "CRITICAL","MINOR","MAJOR" );
|
||||||
|
dimensionTypes = Arrays.asList( "LENGTH", "WIDTH", "DROP" );
|
||||||
|
reportResult = Arrays.asList("PASSED","FAILED");
|
||||||
|
store = Store.getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void isUserAuthenticated( String username,
|
||||||
|
String password,
|
||||||
|
String[] roles,
|
||||||
|
Callback<Boolean> callback){
|
||||||
|
|
||||||
|
|
||||||
|
apiService.isUserAuthenticated(username, password, roles).enqueue(
|
||||||
|
new Callback<Boolean>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(@NonNull Call<Boolean> call, @NonNull Response<Boolean> response) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
callback.onResponse(call, response);
|
||||||
|
} else {
|
||||||
|
// Handle error
|
||||||
|
callback.onFailure(call, new Throwable("Failed to authenticate user"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call<Boolean> call, @NonNull Throwable t) {
|
||||||
|
// Handle failure
|
||||||
|
callback.onFailure(call, t);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getDefectTypes(){
|
||||||
|
return defectTypes;
|
||||||
|
}
|
||||||
|
public List<String> getDimensionTypes(){return dimensionTypes;}
|
||||||
|
|
||||||
|
public List<String> getReportResult() {
|
||||||
|
return reportResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReportResult(List<String> reportResult) {
|
||||||
|
this.reportResult = reportResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveReport(InspectionReport inspectionReport , SaveReportCallback callback){
|
||||||
|
|
||||||
|
if( Objects.nonNull( inspectionReport ) && inspectionReport.getItems().get(0).getSku() != null && inspectionReport.getItems() != null &&
|
||||||
|
! inspectionReport.getItems().isEmpty() &&
|
||||||
|
! inspectionReport.getItems().get(0).getCheckPoints().isEmpty() ){
|
||||||
|
// populate defects in cp
|
||||||
|
for( InspectionItemCheckPoint itemCp : inspectionReport.getItems().get(0).getCheckPoints() ){
|
||||||
|
InspectionItemDefect defect = new InspectionItemDefect();
|
||||||
|
defect.setDefectSeverity(itemCp.getDefectSeverity());
|
||||||
|
defect.setTitle( itemCp.getDefectTitle() );
|
||||||
|
itemCp.setDefect( defect );
|
||||||
|
}
|
||||||
|
// post object
|
||||||
|
apiService.saveInspectionReport( inspectionReport ).enqueue(
|
||||||
|
new Callback<InspectionReport>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<InspectionReport> call, Response<InspectionReport> response) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
callback.onSuccess();
|
||||||
|
} else {
|
||||||
|
callback.onFailure(new Exception("API call failed with status code: " + response.code()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<InspectionReport> call, Throwable t) {
|
||||||
|
callback.onFailure( t );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
callback.onFailure( new Exception("Please Fill the required Fields..") );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,229 @@
|
||||||
|
package com.example.qualitychecker.store;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.apiservice.ApiService;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiServiceFactory;
|
||||||
|
import com.example.qualitychecker.models.Dimension;
|
||||||
|
import com.example.qualitychecker.models.EmployeePhoto;
|
||||||
|
import com.example.qualitychecker.models.InspectionCheckPoint;
|
||||||
|
import com.example.qualitychecker.models.InspectionDefect;
|
||||||
|
import com.example.qualitychecker.models.InspectionDimension;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemCheckPoint;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemDimension;
|
||||||
|
import com.example.qualitychecker.models.InspectionReport;
|
||||||
|
import com.example.qualitychecker.models.InspectionReportItem;
|
||||||
|
import com.example.qualitychecker.models.ItemUnit;
|
||||||
|
import com.example.qualitychecker.models.Product;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class Store {
|
||||||
|
|
||||||
|
private static Store instance;
|
||||||
|
private InspectionReport report;
|
||||||
|
private ApiService apiService;
|
||||||
|
private List<InspectionCheckPoint> checkPoints;
|
||||||
|
private List<InspectionDefect> defects;
|
||||||
|
private List<InspectionDimension> dimensionList;
|
||||||
|
private List<InspectionItemDimension> dimensions;
|
||||||
|
private List<Product> products;
|
||||||
|
private EmployeePhoto employeePhoto;
|
||||||
|
private List<ItemUnit> itemUnits;
|
||||||
|
|
||||||
|
private Store(){
|
||||||
|
}
|
||||||
|
|
||||||
|
public static synchronized Store getInstance(){
|
||||||
|
if( instance == null ){
|
||||||
|
instance = new Store();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void initializeNewReport() {
|
||||||
|
checkPoints = new ArrayList<>();
|
||||||
|
defects = new ArrayList<>();
|
||||||
|
dimensions = new ArrayList<>();
|
||||||
|
products = new ArrayList<>();
|
||||||
|
itemUnits = new ArrayList<>();
|
||||||
|
dimensionList = new ArrayList<>();
|
||||||
|
apiService = ApiServiceFactory.getApiService();
|
||||||
|
report = new InspectionReport();
|
||||||
|
InspectionReportItem item = new InspectionReportItem();
|
||||||
|
item.setDimensions( new ArrayList<>() );
|
||||||
|
report.setItems(Collections.singletonList( item ));
|
||||||
|
|
||||||
|
apiService.fetchCheckPoints().enqueue(
|
||||||
|
new Callback<List<InspectionCheckPoint>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse( Call<List<InspectionCheckPoint>> call,
|
||||||
|
Response<List<InspectionCheckPoint>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
checkPoints = response.body() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<InspectionCheckPoint>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
apiService.fetchDefects().enqueue(
|
||||||
|
new Callback<List<InspectionDefect>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse( Call<List<InspectionDefect>> call,
|
||||||
|
Response<List<InspectionDefect>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
defects = response.body();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure( Call<List<InspectionDefect>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
apiService.fetchCheckPoints().enqueue(
|
||||||
|
new Callback<List<InspectionCheckPoint>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<InspectionCheckPoint>> call,
|
||||||
|
Response<List<InspectionCheckPoint>> response) {
|
||||||
|
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
List<InspectionItemCheckPoint> itemCp = new ArrayList<>();
|
||||||
|
for( InspectionCheckPoint cp : response.body() ){
|
||||||
|
InspectionItemCheckPoint icp = new InspectionItemCheckPoint();
|
||||||
|
icp.setTitle( cp.getTitle() );
|
||||||
|
icp.setDefectSeverity("MINOR");
|
||||||
|
icp.setChecked( false );
|
||||||
|
icp.setRemarks("");
|
||||||
|
itemCp.add( icp );
|
||||||
|
}
|
||||||
|
report.getItems().get( 0 ).setCheckPoints( itemCp );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<InspectionCheckPoint>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
apiService.fetchItemUnits().enqueue(
|
||||||
|
new Callback<List<ItemUnit>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<ItemUnit>> call,
|
||||||
|
Response<List<ItemUnit>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
System.out.println( response.body() );
|
||||||
|
itemUnits = response.body();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<ItemUnit>> call,
|
||||||
|
Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
apiService.fetchDimensions().enqueue(
|
||||||
|
new Callback<List<InspectionDimension>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<InspectionDimension>> call, Response<List<InspectionDimension>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
dimensionList = response.body();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<InspectionDimension>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InspectionReport getReport() {
|
||||||
|
return report;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReport(InspectionReport report) {
|
||||||
|
this.report = report;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionCheckPoint> getCheckPoints() {
|
||||||
|
return checkPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionDefect> getDefects() {
|
||||||
|
return defects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionItemDimension> getDimensions() {
|
||||||
|
return dimensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDimensions(List<InspectionItemDimension> dimensions) {
|
||||||
|
this.dimensions = dimensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Product> getProducts() {
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProducts(List<Product> products) {
|
||||||
|
this.products = products;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmployeePhoto getEmployeePhoto() {
|
||||||
|
return employeePhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmployeePhoto(EmployeePhoto employeePhoto) {
|
||||||
|
this.employeePhoto = employeePhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getItemUnits() {
|
||||||
|
return itemUnits.stream().map( ItemUnit::getTitle ).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemUnits(List<ItemUnit> itemUnits) {
|
||||||
|
this.itemUnits = itemUnits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProfileImage( ) {
|
||||||
|
if( employeePhoto != null ){
|
||||||
|
return "https://portal.utopiaindustries.pk/uind/employee-photo/" + employeePhoto.getEmployeeId() +".jpeg";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getDimensionList() {
|
||||||
|
return dimensionList.stream().map( InspectionDimension::getTitle ).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDimensionList(List<InspectionDimension> dimensionList) {
|
||||||
|
this.dimensionList = dimensionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Store{" +
|
||||||
|
"report=" + report +
|
||||||
|
", apiService=" + apiService +
|
||||||
|
", checkPoints=" + checkPoints +
|
||||||
|
", defects=" + defects +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,169 @@
|
||||||
|
package com.example.qualitychecker.ui.activities;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiService;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiServiceFactory;
|
||||||
|
import com.example.qualitychecker.models.EmployeePhoto;
|
||||||
|
import com.example.qualitychecker.models.InspectionReport;
|
||||||
|
import com.example.qualitychecker.store.Store;
|
||||||
|
import com.example.qualitychecker.ui.adapter.ReportAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class HomeActivity extends AppCompatActivity implements View.OnClickListener {
|
||||||
|
|
||||||
|
private Button createReportBtn,refreshReportsBtn,logoutBtn;
|
||||||
|
private RecyclerView recyclerView;
|
||||||
|
private ApiService apiService;
|
||||||
|
private TextView usernameTitle;
|
||||||
|
private ImageView profileImage;
|
||||||
|
private Store store;
|
||||||
|
|
||||||
|
@SuppressLint("SourceLockedOrientationActivity")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
if( ! isNetworkConnected() ){
|
||||||
|
Toast.makeText( this, "No Internet Connection", Toast.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
setContentView(R.layout.activity_home);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );
|
||||||
|
|
||||||
|
// initialize views
|
||||||
|
store = Store.getInstance();
|
||||||
|
apiService = ApiServiceFactory.getApiService();
|
||||||
|
createReportBtn = findViewById( R.id.create_report_btn );
|
||||||
|
refreshReportsBtn = findViewById( R.id.refresh_btn );
|
||||||
|
logoutBtn = findViewById( R.id.logout_btn );
|
||||||
|
recyclerView = findViewById( R.id.reports_recyclerview );
|
||||||
|
usernameTitle = findViewById( R.id.username_title );
|
||||||
|
profileImage = findViewById( R.id.profile_image );
|
||||||
|
|
||||||
|
refreshReportsBtn.setOnClickListener( this );
|
||||||
|
createReportBtn.setOnClickListener( this );
|
||||||
|
logoutBtn.setOnClickListener( this );
|
||||||
|
|
||||||
|
recyclerView.setLayoutManager( new LinearLayoutManager( this ) );
|
||||||
|
|
||||||
|
updateProfileImage();
|
||||||
|
refreshReportData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshReportData(){
|
||||||
|
apiService.fetchAllReports().enqueue(
|
||||||
|
new Callback<List<InspectionReport>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<InspectionReport>> call, Response<List<InspectionReport>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
System.out.println( response.body() );
|
||||||
|
ReportAdapter adapter = new ReportAdapter( response.body() );
|
||||||
|
recyclerView.setAdapter( adapter );
|
||||||
|
} else {
|
||||||
|
System.out.println("Error");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<InspectionReport>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
int id = v.getId();
|
||||||
|
if( id == R.id.create_report_btn ){
|
||||||
|
Intent intent = new Intent( this, MainActivity.class );
|
||||||
|
startActivity( intent );
|
||||||
|
}
|
||||||
|
if( id == R.id.logout_btn ){
|
||||||
|
SharedPreferences sharedPreferences = getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||||
|
editor.putString("username", null );
|
||||||
|
editor.putString("password", null );
|
||||||
|
editor.apply();
|
||||||
|
Intent intent = new Intent( HomeActivity.this, LoginActivity.class );
|
||||||
|
startActivity( intent );
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
if( id == R.id.refresh_btn ){
|
||||||
|
refreshReportData();
|
||||||
|
updateProfileImage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateProfileImage(){
|
||||||
|
SharedPreferences sharedPreferences = getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
|
String username = sharedPreferences.getString("username", null );
|
||||||
|
System.out.println( );
|
||||||
|
if( username != null ){
|
||||||
|
apiService.fetchEmployeePhoto( username ).enqueue(
|
||||||
|
new Callback<EmployeePhoto>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<EmployeePhoto> call, Response<EmployeePhoto> response) {
|
||||||
|
System.out.println( response.body() );
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
System.out.println( response.body() );
|
||||||
|
usernameTitle.setText( response.body().getName() );
|
||||||
|
store.setEmployeePhoto( response.body() );
|
||||||
|
Glide.with( getBaseContext() )
|
||||||
|
.load( store.getProfileImage( ) )
|
||||||
|
.into( profileImage );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<EmployeePhoto> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private boolean isNetworkConnected() {
|
||||||
|
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();
|
||||||
|
return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
refreshReportData();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,142 @@
|
||||||
|
package com.example.qualitychecker.ui.activities;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.service.InspectionReportService;
|
||||||
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private TextInputEditText username,password;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
private Button loginButton;
|
||||||
|
private InspectionReportService reportService;
|
||||||
|
|
||||||
|
@SuppressLint("SourceLockedOrientationActivity")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
if( ! isNetworkConnected() ){
|
||||||
|
Toast.makeText( this, "No Internet Connection", Toast.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
reportService = InspectionReportService.getInstance();
|
||||||
|
isUserAlreadyLoginAndAuthorize();
|
||||||
|
setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );
|
||||||
|
setContentView(R.layout.activity_login);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
username = findViewById( R.id.username );
|
||||||
|
password = findViewById( R.id.password );
|
||||||
|
loginButton = findViewById( R.id.login_btn );
|
||||||
|
progressBar = findViewById( R.id.progressBar );
|
||||||
|
|
||||||
|
SharedPreferences sharedPreferences = getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||||
|
|
||||||
|
loginButton.setOnClickListener(v -> {
|
||||||
|
try {
|
||||||
|
progressBar.setVisibility( View.VISIBLE );
|
||||||
|
String usernameStr = Objects.requireNonNull( username.getText() ).toString().trim();
|
||||||
|
String passwordStr = Objects.requireNonNull( password.getText() ).toString().trim();
|
||||||
|
// check both are valid
|
||||||
|
if( ! usernameStr.isEmpty() && ! passwordStr.isEmpty() ) {
|
||||||
|
reportService.isUserAuthenticated(usernameStr, passwordStr, new String[]{"ROLE_DEVELOPER"}, new Callback<Boolean>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<Boolean> call, Response<Boolean> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null && response.body() ){
|
||||||
|
editor.putString("username", usernameStr );
|
||||||
|
editor.putString("password", passwordStr );
|
||||||
|
editor.apply();
|
||||||
|
progressBar.setVisibility( View.INVISIBLE );
|
||||||
|
Intent intent = new Intent( LoginActivity.this, HomeActivity.class );
|
||||||
|
startActivity( intent );
|
||||||
|
// close login screen
|
||||||
|
LoginActivity.this.finish();
|
||||||
|
} else {
|
||||||
|
progressBar.setVisibility( View.INVISIBLE );
|
||||||
|
Snackbar.make( v, "Invalid Credential or Access not Authorized", Snackbar.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<Boolean> call, Throwable t) {
|
||||||
|
progressBar.setVisibility( View.INVISIBLE );
|
||||||
|
Snackbar.make( v, "Something went wrong", Snackbar.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Snackbar.make( v, "Please Enter Your Credentials!!", Snackbar.LENGTH_LONG ).show();
|
||||||
|
progressBar.setVisibility( View.INVISIBLE );
|
||||||
|
}
|
||||||
|
} catch ( NullPointerException exception ){
|
||||||
|
Snackbar.make( v, Objects.requireNonNull( exception.getMessage() ), Snackbar.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void isUserAlreadyLoginAndAuthorize() {
|
||||||
|
SharedPreferences sharedPreferences = getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
|
|
||||||
|
String username = sharedPreferences.getString("username", null);
|
||||||
|
String password = sharedPreferences.getString("password", null);
|
||||||
|
|
||||||
|
reportService.isUserAuthenticated(username,
|
||||||
|
password,
|
||||||
|
new String[]{"ROLE_DEVELOPER"},
|
||||||
|
new Callback<Boolean>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<Boolean> call, Response<Boolean> response) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
boolean isAuthenticated = response.body();
|
||||||
|
if (isAuthenticated) {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
// close login screen
|
||||||
|
LoginActivity.this.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<Boolean> call, Throwable t) {
|
||||||
|
Log.d(t.getMessage(), "onFailure: ");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isNetworkConnected() {
|
||||||
|
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();
|
||||||
|
return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.example.qualitychecker.ui.activities;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.navigation.NavController;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
import androidx.navigation.fragment.NavHostFragment;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.store.Store;
|
||||||
|
import com.example.qualitychecker.ui.fragments.FirstStepFragment;
|
||||||
|
import com.example.qualitychecker.ui.fragments.SecondStepFragment;
|
||||||
|
import com.google.zxing.integration.android.IntentIntegrator;
|
||||||
|
import com.google.zxing.integration.android.IntentResult;
|
||||||
|
|
||||||
|
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
|
||||||
|
|
||||||
|
private NavController navController;
|
||||||
|
private Store store;
|
||||||
|
|
||||||
|
{
|
||||||
|
store = Store.getInstance();
|
||||||
|
store.initializeNewReport();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SourceLockedOrientationActivity")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );
|
||||||
|
|
||||||
|
// initializing fields
|
||||||
|
navController = Navigation.findNavController( this, R.id.nav_host_fragment );
|
||||||
|
updateUsername();
|
||||||
|
}
|
||||||
|
private void updateUsername() {
|
||||||
|
if ( store.getReport() != null ) {
|
||||||
|
SharedPreferences sharedPreferences = getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
|
String username = sharedPreferences.getString("username", null);
|
||||||
|
store.getReport().setGeneratedBy(username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
int id = v.getId();
|
||||||
|
System.out.println( navController.getCurrentDestination().getId() );
|
||||||
|
navigate("","",R.id.action_firstStepFragment_to_secondStepFragment );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void navigate(String fromFragment,
|
||||||
|
String toFragment,
|
||||||
|
int toId ){
|
||||||
|
System.out.println( navController.getCurrentDestination().getId() );
|
||||||
|
navController.navigate( toId );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
|
||||||
|
if (result != null) {
|
||||||
|
if (result.getContents() == null) {
|
||||||
|
Toast.makeText(this, "Cancelled", Toast.LENGTH_LONG).show();
|
||||||
|
} else {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
FirstStepFragment firstStepFragment = ( FirstStepFragment) getCurrentVisibleFragment();
|
||||||
|
firstStepFragment.onBarcodeScanResult( result.getContents() );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
SecondStepFragment secondStepFragment = ( SecondStepFragment) getCurrentVisibleFragment();
|
||||||
|
secondStepFragment.onImagePickerResult( requestCode, resultCode, data );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Fragment getCurrentVisibleFragment() {
|
||||||
|
NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().getPrimaryNavigationFragment();
|
||||||
|
assert navHostFragment != null;
|
||||||
|
FragmentManager fragmentManager = navHostFragment.getChildFragmentManager();
|
||||||
|
return fragmentManager.getPrimaryNavigationFragment();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,231 @@
|
||||||
|
package com.example.qualitychecker.ui.adapter;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.models.InspectionCheckPoint;
|
||||||
|
import com.example.qualitychecker.models.InspectionDefect;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemCheckPoint;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class CheckPointAdapter extends
|
||||||
|
RecyclerView.Adapter<CheckPointAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
private final List<InspectionItemCheckPoint> checkPointList;
|
||||||
|
private final List<InspectionCheckPoint> checkPoints;
|
||||||
|
private final List<InspectionDefect> defects;
|
||||||
|
private final List<String> defectTypes;
|
||||||
|
private final Context context;
|
||||||
|
public CheckPointAdapter( List<InspectionItemCheckPoint> checkPointList,
|
||||||
|
List<InspectionCheckPoint> checkPoints,
|
||||||
|
List<InspectionDefect> defects,
|
||||||
|
List<String> defectTypes,
|
||||||
|
Context context ) {
|
||||||
|
|
||||||
|
this.checkPointList = checkPointList;
|
||||||
|
this.checkPoints = checkPoints;
|
||||||
|
this.defects = defects;
|
||||||
|
this.defectTypes = defectTypes;
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from( parent.getContext() )
|
||||||
|
.inflate(R.layout.check_point, parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
|
InspectionItemCheckPoint checkPoint = checkPointList.get( position );
|
||||||
|
holder.bind(checkPoints, defects, defectTypes, checkPoint);
|
||||||
|
// spinner on change
|
||||||
|
{
|
||||||
|
holder.checkpointSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String selectedItem = parent.getItemAtPosition(position).toString();
|
||||||
|
InspectionCheckPoint cp = checkPoints.stream().filter(check -> check.getTitle().equalsIgnoreCase(selectedItem))
|
||||||
|
.findFirst().orElse(new InspectionCheckPoint());
|
||||||
|
holder.populateDefects(cp, defects, checkPoint);
|
||||||
|
checkPoint.setTitle(selectedItem);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.defectsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String selectedItem = parent.getItemAtPosition(position).toString();
|
||||||
|
checkPoint.setDefectTitle(selectedItem);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.defectTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String selectedItem = parent.getItemAtPosition(position).toString();
|
||||||
|
checkPoint.setDefectSeverity(selectedItem);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// checkboxes on change
|
||||||
|
{
|
||||||
|
holder.okCheckBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
|
if (isChecked) {
|
||||||
|
holder.linearLayout.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
checkPoint.setChecked ( false );
|
||||||
|
holder.noCheckBox.setChecked( !isChecked );
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.noCheckBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
|
if (isChecked) {
|
||||||
|
holder.linearLayout.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
checkPoint.setChecked( true );
|
||||||
|
holder.okCheckBox.setChecked( !isChecked );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// remarks on change
|
||||||
|
{
|
||||||
|
holder.remarks.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
checkPoint.setRemarks( s.toString() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
holder.imagePicker.setOnClickListener( v -> {
|
||||||
|
Intent intent = new Intent( Intent.ACTION_GET_CONTENT );
|
||||||
|
intent.addCategory( Intent.CATEGORY_OPENABLE );
|
||||||
|
intent.setType( "image/*" );
|
||||||
|
( ( Activity ) context ).startActivityForResult( intent, position );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return checkPointList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private final Spinner checkpointSpinner, defectsSpinner, defectTypeSpinner;
|
||||||
|
private final CheckBox okCheckBox, noCheckBox;
|
||||||
|
private final EditText remarks;
|
||||||
|
private final ImageButton imagePicker;
|
||||||
|
private final LinearLayout linearLayout;
|
||||||
|
private final TextView selectedImage;
|
||||||
|
|
||||||
|
public ViewHolder( @NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
checkpointSpinner = itemView.findViewById(R.id.check_point_spinner);
|
||||||
|
okCheckBox = itemView.findViewById(R.id.check_point_ok);
|
||||||
|
noCheckBox = itemView.findViewById(R.id.check_point_no);
|
||||||
|
remarks = itemView.findViewById(R.id.check_point_remarks);
|
||||||
|
imagePicker = itemView.findViewById(R.id.image_picker );
|
||||||
|
selectedImage = itemView.findViewById( R.id.selected_image );
|
||||||
|
defectsSpinner = itemView.findViewById(R.id.defect_spinner);
|
||||||
|
defectTypeSpinner = itemView.findViewById(R.id.defect_type_spinner);
|
||||||
|
linearLayout = itemView.findViewById(R.id.defect_layout);
|
||||||
|
}
|
||||||
|
public void bind(List<InspectionCheckPoint> checkPoints,
|
||||||
|
List<InspectionDefect> defects,
|
||||||
|
List<String> defectTypeOptions,
|
||||||
|
InspectionItemCheckPoint data ) {
|
||||||
|
List<String> checkPointsList = checkPoints.stream().map(InspectionCheckPoint::getTitle).collect(Collectors.toList());
|
||||||
|
|
||||||
|
// Populate checklist Spinner dropdown
|
||||||
|
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(checkpointSpinner.getContext(),
|
||||||
|
android.R.layout.simple_spinner_item, checkPointsList);
|
||||||
|
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
checkpointSpinner.setAdapter(spinnerAdapter);
|
||||||
|
|
||||||
|
// Populate defect type Spinner dropdown
|
||||||
|
ArrayAdapter<String> defectTypeSpinnerAdapter = new ArrayAdapter<>(defectTypeSpinner.getContext(),
|
||||||
|
android.R.layout.simple_spinner_item, defectTypeOptions);
|
||||||
|
defectTypeSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
defectTypeSpinner.setAdapter(defectTypeSpinnerAdapter);
|
||||||
|
|
||||||
|
// Pre populate
|
||||||
|
String defaultSelectedItem = data.getTitle();
|
||||||
|
int defaultPosition = checkPointsList.indexOf(defaultSelectedItem);
|
||||||
|
checkpointSpinner.setSelection(defaultPosition);
|
||||||
|
|
||||||
|
String defaultSelectedDefectType = data.getDefectSeverity();
|
||||||
|
int defaultSelectedDefectTypePosition = defectTypeOptions.indexOf(defaultSelectedDefectType);
|
||||||
|
defectTypeSpinner.setSelection(defaultSelectedDefectTypePosition);
|
||||||
|
|
||||||
|
remarks.setText( data.getRemarks() );
|
||||||
|
okCheckBox.setChecked( data.getChecked() );
|
||||||
|
noCheckBox.setChecked( ! data.getChecked());
|
||||||
|
|
||||||
|
if( data.getChecked()){
|
||||||
|
linearLayout.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
linearLayout.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedImage.setText( data.getImagePath() );
|
||||||
|
}
|
||||||
|
private void populateDefects(InspectionCheckPoint cp, List<InspectionDefect> defects, InspectionItemCheckPoint data) {
|
||||||
|
|
||||||
|
List<InspectionDefect> filteredDefects = defects.stream()
|
||||||
|
.filter(d -> d.getCategory().equalsIgnoreCase(cp.getCategory()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<String> defectList = filteredDefects.stream().map(InspectionDefect::getDefect).collect(Collectors.toList());
|
||||||
|
// Populate defect Spinner dropdown
|
||||||
|
ArrayAdapter<String> defectSpinnerAdapter = new ArrayAdapter<>(defectsSpinner.getContext(),
|
||||||
|
android.R.layout.simple_spinner_item, defectList);
|
||||||
|
defectSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
defectsSpinner.setAdapter(defectSpinnerAdapter);
|
||||||
|
|
||||||
|
String defaultDefectSelectedItem = data.getDefectTitle();
|
||||||
|
int defaultSelectedDefectPosition = defectList.indexOf(defaultDefectSelectedItem);
|
||||||
|
defectsSpinner.setSelection(defaultSelectedDefectPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.example.qualitychecker.ui.adapter;
|
||||||
|
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemDimension;
|
||||||
|
import com.example.qualitychecker.service.InspectionReportService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DimensionAdapter extends
|
||||||
|
RecyclerView.Adapter<DimensionAdapter.DimensionAdapterViewHolder>{
|
||||||
|
|
||||||
|
private final List<InspectionItemDimension> dimensions;
|
||||||
|
private final List<String> dimensionTypes;
|
||||||
|
private final List<String> dimensionUnits;
|
||||||
|
public DimensionAdapter(List<InspectionItemDimension> dimensions, List<String> dimensionTypes, List<String> dimensionUnits) {
|
||||||
|
this.dimensions = dimensions;
|
||||||
|
this.dimensionTypes = dimensionTypes;
|
||||||
|
this.dimensionUnits = dimensionUnits;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public DimensionAdapter.DimensionAdapterViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.dimension_item , parent, false);
|
||||||
|
return new DimensionAdapterViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull DimensionAdapterViewHolder holder, int position) {
|
||||||
|
InspectionItemDimension item = dimensions.get( position );
|
||||||
|
holder.bind( item , dimensionTypes , dimensionUnits ) ;
|
||||||
|
holder.deleteItemBtn.setOnClickListener( v ->{
|
||||||
|
removeItem( holder.getAdapterPosition() );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return dimensions.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeItem(int position) {
|
||||||
|
if( position >= 0 && position < dimensions.size() ){
|
||||||
|
dimensions.remove(position);
|
||||||
|
notifyItemRemoved(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class DimensionAdapterViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
private final Spinner dimensionTypeSpinner,dimensionUnitSpinner;
|
||||||
|
private final EditText requiredEditText,actualEditText,differenceEditText;
|
||||||
|
private final ImageButton deleteItemBtn;
|
||||||
|
|
||||||
|
public DimensionAdapterViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
dimensionTypeSpinner = itemView.findViewById( R.id.dimension_type_spinner );
|
||||||
|
dimensionUnitSpinner = itemView.findViewById( R.id.dimension_unit_spinner );
|
||||||
|
requiredEditText = itemView.findViewById( R.id.required );
|
||||||
|
actualEditText = itemView.findViewById( R.id.actual );
|
||||||
|
differenceEditText = itemView.findViewById( R.id.difference );
|
||||||
|
deleteItemBtn = itemView.findViewById( R.id.dimension_item_delete );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bind( InspectionItemDimension dimension ,
|
||||||
|
List<String> dimensionTypes,
|
||||||
|
List<String> dimensionUnits ){
|
||||||
|
|
||||||
|
// Populate dimension type Spinner dropdown
|
||||||
|
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(dimensionTypeSpinner.getContext(),
|
||||||
|
android.R.layout.simple_spinner_item, dimensionTypes );
|
||||||
|
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
dimensionTypeSpinner.setAdapter(spinnerAdapter);
|
||||||
|
|
||||||
|
String defaultSelection = dimension.getType();
|
||||||
|
int defaultSelectedPosition = dimensionTypes.indexOf(defaultSelection);
|
||||||
|
dimensionTypeSpinner.setSelection(defaultSelectedPosition);
|
||||||
|
|
||||||
|
// Populate dimension unit Spinner dropdown
|
||||||
|
ArrayAdapter<String> unitSpinnerAdapter = new ArrayAdapter<>(dimensionUnitSpinner.getContext(),
|
||||||
|
android.R.layout.simple_spinner_item, dimensionUnits );
|
||||||
|
unitSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
dimensionUnitSpinner.setAdapter(unitSpinnerAdapter);
|
||||||
|
|
||||||
|
String defaultUnitSelection = dimension.getUnit();
|
||||||
|
int defaultItemSelectedPosition = dimensionUnits.indexOf(defaultUnitSelection);
|
||||||
|
dimensionUnitSpinner.setSelection(defaultItemSelectedPosition);
|
||||||
|
|
||||||
|
|
||||||
|
requiredEditText.setText( String.valueOf( dimension.getRequired() ));
|
||||||
|
actualEditText.setText( String.valueOf( dimension.getActual() ));
|
||||||
|
differenceEditText.setText( String.valueOf( dimension.getDifference() ));
|
||||||
|
|
||||||
|
// Spinner listener
|
||||||
|
{
|
||||||
|
dimensionTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String selectedItem = parent.getItemAtPosition(position).toString();
|
||||||
|
dimension.setType( selectedItem );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// unit spinner
|
||||||
|
{
|
||||||
|
dimensionUnitSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String selectedItem = parent.getItemAtPosition(position).toString();
|
||||||
|
dimension.setUnit( selectedItem );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// edit text listeners
|
||||||
|
{
|
||||||
|
requiredEditText.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
dimension.setRequired( Float.parseFloat( s.toString() ) );
|
||||||
|
float difference = dimension.getActual() - dimension.getRequired();
|
||||||
|
differenceEditText.setText( String.valueOf( difference ));
|
||||||
|
dimension.setDifference( difference );
|
||||||
|
} catch ( Exception e ){
|
||||||
|
differenceEditText.setText( "0" );
|
||||||
|
dimension.setDifference( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
actualEditText.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
dimension.setActual( Float.parseFloat( s.toString() ) );
|
||||||
|
float difference = dimension.getActual() - dimension.getRequired();
|
||||||
|
differenceEditText.setText( String.valueOf( difference ));
|
||||||
|
dimension.setDifference( difference );
|
||||||
|
} catch ( Exception e ){
|
||||||
|
differenceEditText.setText( "0" );
|
||||||
|
dimension.setDifference( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.example.qualitychecker.ui.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemDimension;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemDimensionAdapter extends
|
||||||
|
RecyclerView.Adapter<ItemDimensionAdapter.ItemDiemsionViewHolder> {
|
||||||
|
|
||||||
|
private final List<InspectionItemDimension> dimensions;
|
||||||
|
|
||||||
|
public ItemDimensionAdapter( List<InspectionItemDimension> dimensions ){
|
||||||
|
this.dimensions = dimensions;
|
||||||
|
}
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ItemDiemsionViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_dimension , parent, false);
|
||||||
|
return new ItemDiemsionViewHolder( view );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ItemDiemsionViewHolder holder, int position) {
|
||||||
|
InspectionItemDimension dimension = dimensions.get( position );
|
||||||
|
holder.bind( dimension );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return dimensions.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ItemDiemsionViewHolder extends RecyclerView.ViewHolder{
|
||||||
|
|
||||||
|
private final EditText dimensionType,dimensionUnit,dimensionRequired,dimensionActual,dimensionDifference;
|
||||||
|
|
||||||
|
public ItemDiemsionViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
dimensionType = itemView.findViewById( R.id.dimension_type );
|
||||||
|
dimensionUnit = itemView.findViewById( R.id.dimension_unit );
|
||||||
|
dimensionRequired = itemView.findViewById( R.id.dimension_required );
|
||||||
|
dimensionActual = itemView.findViewById( R.id.dimension_actual );
|
||||||
|
dimensionDifference = itemView.findViewById( R.id.dimension_difference );
|
||||||
|
}
|
||||||
|
public void bind( InspectionItemDimension dimension ){
|
||||||
|
dimensionType.setText( dimension.getType() );
|
||||||
|
dimensionUnit.setText( dimension.getUnit() );
|
||||||
|
dimensionRequired.setText( String.valueOf( dimension.getRequired() ));
|
||||||
|
dimensionActual.setText( String.valueOf( dimension.getActual() ) );
|
||||||
|
dimensionDifference.setText( String.valueOf( dimension.getDifference() ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.example.qualitychecker.ui.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.models.InspectionReportItem;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class ItemHistoryAdapter extends
|
||||||
|
RecyclerView.Adapter<ItemHistoryAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
private final List<InspectionReportItem> items;
|
||||||
|
|
||||||
|
public ItemHistoryAdapter(List<InspectionReportItem> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_history_item, parent, false);
|
||||||
|
return new ViewHolder( view );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
|
InspectionReportItem item = items.get( position );
|
||||||
|
try {
|
||||||
|
holder.bind( item );
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return items.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
private final TextView itemSku,itemAsin,itemDate,itemCartons,itemPacks,itemPieces;
|
||||||
|
|
||||||
|
public ViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
itemSku = itemView.findViewById( R.id.item_history_sku );
|
||||||
|
itemAsin = itemView.findViewById( R.id.item_history_asin );
|
||||||
|
itemDate = itemView.findViewById( R.id.item_history_date );
|
||||||
|
itemCartons = itemView.findViewById( R.id.item_history_cartons );
|
||||||
|
itemPacks = itemView.findViewById( R.id.item_history_packs );
|
||||||
|
itemPieces = itemView.findViewById( R.id.item_history_pieces );
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DefaultLocale")
|
||||||
|
public void bind(InspectionReportItem item ) throws ParseException {
|
||||||
|
SimpleDateFormat jsonDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault());
|
||||||
|
SimpleDateFormat displayDateFormat = new SimpleDateFormat("MMM dd, yyyy hh:mm a", Locale.getDefault());
|
||||||
|
itemSku.setText( item.getSku() );
|
||||||
|
itemAsin.setText( item.getAsin() );
|
||||||
|
if( item.getDateAdded() != null ){
|
||||||
|
Date date = jsonDateFormat.parse( item.getDateAdded() );
|
||||||
|
String formattedDateTime = displayDateFormat.format( date );
|
||||||
|
itemDate.setText( formattedDateTime );
|
||||||
|
} else {
|
||||||
|
itemDate.setText("");
|
||||||
|
}
|
||||||
|
itemCartons.setText( String.format("Cartons : %f", item.getCartonsSelected() ) );
|
||||||
|
itemPacks.setText( String.format("Packs : %f", item.getPacksSelected() ) );
|
||||||
|
itemPieces.setText( String.format("Pieces : %f", item.getPiecesSelected() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.example.qualitychecker.ui.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.models.InspectionReport;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class ReportAdapter extends
|
||||||
|
RecyclerView.Adapter<ReportAdapter.ViewHolder>{
|
||||||
|
private final List<InspectionReport> reports;
|
||||||
|
|
||||||
|
public ReportAdapter(List<InspectionReport> reports) {
|
||||||
|
this.reports = reports;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from( parent.getContext() ).inflate(R.layout.report_item , parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
|
try {
|
||||||
|
holder.bindDate( reports.get( position ) );
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return reports.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private final TextView codeTv,createdByTv, remarksTv,dateTv,status;
|
||||||
|
private final SimpleDateFormat jsonDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault());
|
||||||
|
private final SimpleDateFormat displayDateFormat = new SimpleDateFormat("MMM dd, yyyy hh:mm a", Locale.getDefault());
|
||||||
|
|
||||||
|
public ViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
codeTv = itemView.findViewById( R.id.code );
|
||||||
|
createdByTv = itemView.findViewById( R.id.created_by );
|
||||||
|
remarksTv = itemView.findViewById( R.id.remarks );
|
||||||
|
dateTv = itemView.findViewById( R.id.date );
|
||||||
|
status = itemView.findViewById( R.id.status );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bindDate( InspectionReport report ) throws ParseException {
|
||||||
|
codeTv.setText( report.getCode() );
|
||||||
|
createdByTv.setText( report.getGeneratedBy() );
|
||||||
|
remarksTv.setText( report.getGeneralRemarks() );
|
||||||
|
|
||||||
|
Date date = jsonDateFormat.parse( report.getGeneratedAt() );
|
||||||
|
// Format the date in 12-hour format
|
||||||
|
String formattedDateTime = displayDateFormat.format( date );
|
||||||
|
dateTv.setText( formattedDateTime );
|
||||||
|
if( report.getReportResult().equalsIgnoreCase("FAILED") ){
|
||||||
|
status.setBackgroundResource( R.drawable.failed_bg );
|
||||||
|
}
|
||||||
|
if( report.getReportResult().equalsIgnoreCase("Passed") ){
|
||||||
|
status.setBackgroundResource( R.drawable.passed_bg );
|
||||||
|
}
|
||||||
|
status.setText( report.getReportResult() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.example.qualitychecker.ui.adapter;
|
||||||
|
|
||||||
|
import static com.example.qualitychecker.ui.adapter.VocAdapter.*;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.models.VoiceOfCustomer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class VocAdapter extends
|
||||||
|
RecyclerView.Adapter<VocViewHolder> {
|
||||||
|
|
||||||
|
private final List<VoiceOfCustomer> vocs;
|
||||||
|
private final Context context;
|
||||||
|
|
||||||
|
public VocAdapter (List<VoiceOfCustomer> vocs, Context context) {
|
||||||
|
this.vocs = vocs;
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public VocViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.voc_item, parent, false);
|
||||||
|
return new VocViewHolder( view , context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull VocViewHolder holder, int position) {
|
||||||
|
VoiceOfCustomer voc = vocs.get( position );
|
||||||
|
holder.bind( voc );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return vocs.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class VocViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
private final TextView asin, fnsku,health,item,markeplace;
|
||||||
|
private final ImageView imageView;
|
||||||
|
private final Context context;
|
||||||
|
|
||||||
|
public VocViewHolder(@NonNull View itemView, Context context) {
|
||||||
|
super(itemView);
|
||||||
|
this.context = context;
|
||||||
|
asin = itemView.findViewById( R.id.asin );
|
||||||
|
fnsku = itemView.findViewById( R.id.fnsku );
|
||||||
|
health = itemView.findViewById( R.id.health );
|
||||||
|
item = itemView.findViewById( R.id.item );
|
||||||
|
markeplace = itemView.findViewById( R.id.marketplace );
|
||||||
|
imageView = itemView.findViewById( R.id.voc_item_imageview );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bind( VoiceOfCustomer voc ){
|
||||||
|
asin.setText( voc.getAsin() );
|
||||||
|
fnsku.setText( voc.getFnsku() );
|
||||||
|
health.setText( voc.getPcxHealth() );
|
||||||
|
item .setText( voc.getItemName() );
|
||||||
|
markeplace.setText( voc.getMarketplace() );
|
||||||
|
Glide.with( context )
|
||||||
|
.load( voc.getImageUrl() )
|
||||||
|
.into( imageView );
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,546 @@
|
||||||
|
package com.example.qualitychecker.ui.fragments;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.navigation.NavController;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiService;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiServiceFactory;
|
||||||
|
import com.example.qualitychecker.models.InspectionReportItem;
|
||||||
|
import com.example.qualitychecker.models.Product;
|
||||||
|
import com.example.qualitychecker.store.Store;
|
||||||
|
import com.example.qualitychecker.ui.adapter.ItemHistoryAdapter;
|
||||||
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
import com.google.zxing.integration.android.IntentIntegrator;
|
||||||
|
import com.journeyapps.barcodescanner.CaptureActivity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class FirstStepFragment extends Fragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
private NavController navController;
|
||||||
|
private Button leftFab,rightFab,showHistoryBtn;
|
||||||
|
private EditText sku,boxCarton,itemPerBox,pieces,packagingDetails,boxCartonSelected,itemPerBoxSelected,piecesSelected;
|
||||||
|
private Spinner markerplace,modelNumber,title,color,size;
|
||||||
|
private CheckBox fri,refri;
|
||||||
|
private ImageButton searchSku,scanBtn;
|
||||||
|
private TextView profileName;
|
||||||
|
private ImageView profileImage;
|
||||||
|
private ApiService apiService;
|
||||||
|
private Store store;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_first_step , container, false );
|
||||||
|
initializeViews( view );
|
||||||
|
apiService = ApiServiceFactory.getApiService();
|
||||||
|
store = Store.getInstance();
|
||||||
|
// set on click listener
|
||||||
|
leftFab.setOnClickListener( this );
|
||||||
|
rightFab.setOnClickListener( this );
|
||||||
|
searchSku.setOnClickListener( this );
|
||||||
|
scanBtn.setOnClickListener( this );
|
||||||
|
showHistoryBtn.setOnClickListener( this );
|
||||||
|
populateItem( store.getProducts() );
|
||||||
|
prePopulateData( store.getProducts() );
|
||||||
|
|
||||||
|
|
||||||
|
profileName.setText( store.getEmployeePhoto().getName() !=null ? store.getEmployeePhoto().getName() : "" );
|
||||||
|
Glide.with( getContext() )
|
||||||
|
.load( store.getProfileImage( ) )
|
||||||
|
.into( profileImage );
|
||||||
|
|
||||||
|
fri.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
|
if( isChecked ){
|
||||||
|
store.getReport().setFri( true );
|
||||||
|
refri.setChecked( false );
|
||||||
|
} else {
|
||||||
|
store.getReport().setFri( false );
|
||||||
|
refri.setChecked( true );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
refri.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
|
if( isChecked ){
|
||||||
|
store.getReport().setFri( false );
|
||||||
|
fri.setChecked( false );
|
||||||
|
} else {
|
||||||
|
store.getReport().setFri( true );
|
||||||
|
fri.setChecked( true );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// marketplace
|
||||||
|
markerplace.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
if( parent.getItemAtPosition( position ) != null ){
|
||||||
|
String marketplaceOption = parent.getItemAtPosition( position ).toString();
|
||||||
|
store.getReport().getItems().get(0).setMarketplace( marketplaceOption );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
store.getReport().getItems().get(0).setMarketplace("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// title
|
||||||
|
title.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
if( parent.getItemAtPosition( position ) != null ){
|
||||||
|
String titleOption = parent.getItemAtPosition( position ).toString();
|
||||||
|
store.getReport().getItems().get(0).setTitle( titleOption );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
store.getReport().getItems().get(0).setTitle("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// model
|
||||||
|
modelNumber.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
if( parent.getItemAtPosition( position ) != null ){
|
||||||
|
String modelOption = parent.getItemAtPosition( position ).toString();
|
||||||
|
store.getReport().getItems().get(0).setModelNumber( modelOption );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
store.getReport().getItems().get(0).setModelNumber("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// color
|
||||||
|
color.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
if( parent.getItemAtPosition( position ) != null ){
|
||||||
|
String colorOption = parent.getItemAtPosition( position ).toString();
|
||||||
|
store.getReport().getItems().get(0).setSmColor( colorOption );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
store.getReport().getItems().get(0).setSmColor("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// size
|
||||||
|
size.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
if( parent.getItemAtPosition( position ) != null ){
|
||||||
|
String sizeOption = parent.getItemAtPosition( position ).toString();
|
||||||
|
store.getReport().getItems().get(0).setSmSize( sizeOption );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
store.getReport().getItems().get(0).setSmSize("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
boxCartonSelected.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
store.getReport().getItems().get(0).setCartonsSelected( Long.parseLong( s.toString() ) );
|
||||||
|
} catch ( Exception e ){
|
||||||
|
store.getReport().getItems().get(0).setCartonsSelected( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
itemPerBoxSelected.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
store.getReport().getItems().get(0).setPacksSelected( Long.parseLong( s.toString() ) );
|
||||||
|
} catch ( Exception e ){
|
||||||
|
store.getReport().getItems().get(0).setPacksSelected( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
piecesSelected.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
store.getReport().getItems().get(0).setPiecesSelected( Long.parseLong( s.toString() ) );
|
||||||
|
} catch ( Exception e ){
|
||||||
|
store.getReport().getItems().get(0).setPiecesSelected( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// generalRemarks.addTextChangedListener(new TextWatcher() {
|
||||||
|
// @Override
|
||||||
|
// public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
// try {
|
||||||
|
// store.getReport().setGeneralRemarks( s.toString() );
|
||||||
|
// } catch ( Exception e ){
|
||||||
|
// store.getReport().setGeneralRemarks( "");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void afterTextChanged(Editable s) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
navController = Navigation.findNavController( requireView() );
|
||||||
|
if( v.getId() == R.id.button_left_frag_1 ){
|
||||||
|
if( getActivity() != null ){
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.button_right_frag_1 ){
|
||||||
|
navController.navigate( R.id.action_firstStepFragment_to_secondStepFragment );
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.search_sku_btn ){
|
||||||
|
if( sku.getText() != null ){
|
||||||
|
String skuStr = sku.getText().toString().trim();
|
||||||
|
apiService.fetchProductBySku( skuStr ).enqueue(
|
||||||
|
new Callback<List<Product>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<Product>> call, Response<List<Product>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
Product product = response.body().stream().findFirst().orElse(new Product());
|
||||||
|
store.getReport().getItems().get(0).setSku( skuStr );
|
||||||
|
store.getReport().getItems().get(0).setAsin( product.getAsin() );
|
||||||
|
populateItem( response.body() );
|
||||||
|
store.setProducts( response.body() );
|
||||||
|
} else {
|
||||||
|
Snackbar.make(v, "Error in response", Snackbar.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<Product>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.scan_sku_btn ){
|
||||||
|
IntentIntegrator integrator = new IntentIntegrator( getActivity() );
|
||||||
|
integrator.setCaptureActivity(CaptureActivity.class);
|
||||||
|
integrator.setOrientationLocked( true );
|
||||||
|
integrator.setBarcodeImageEnabled( true );
|
||||||
|
integrator.initiateScan();
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.button_show_history ){
|
||||||
|
openItemHistoryDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prePopulateData( List<Product> products ){
|
||||||
|
fri.setChecked( store.getReport().getFri() );
|
||||||
|
refri.setChecked( ! store.getReport().getFri() );
|
||||||
|
// sku
|
||||||
|
sku.setText( store.getReport().getItems().get(0).getSku() );
|
||||||
|
System.out.println( products );
|
||||||
|
System.out.println( store.getReport().getItems().get(0) );
|
||||||
|
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
List<String> modelNumbers = products.stream().map( Product::getModelNumber ).distinct().collect(Collectors.toList()) ;
|
||||||
|
|
||||||
|
String defaultModelSelection = store.getReport().getItems().get(0).getModelNumber();
|
||||||
|
int defaultModelSelectionIndex = modelNumbers.indexOf( defaultModelSelection );
|
||||||
|
modelNumber.setSelection( defaultModelSelectionIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
List<String> titles = products.stream().map( Product::getTitle ).distinct().collect(Collectors.toList()) ;
|
||||||
|
String defaultTitleSelection = store.getReport().getItems().get(0).getTitle();
|
||||||
|
int defaultTitleSelectionIndex = titles.indexOf( defaultTitleSelection );
|
||||||
|
title.setSelection( defaultTitleSelectionIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateItem( List<Product> products ){
|
||||||
|
populateMarketplaces( products );
|
||||||
|
populateMmodelNumber(products );
|
||||||
|
populateTitle( products );
|
||||||
|
populateColor( products );
|
||||||
|
populateSize( products );
|
||||||
|
populateItemPresentedDetails( products );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateItemPresentedDetails( List<Product> products ){
|
||||||
|
try{
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
Product product = products.get( 0 );
|
||||||
|
String inventory = String.valueOf( product.getInventory() );
|
||||||
|
String itemPerBoxText = String.valueOf( product.getInventory() * product.getItemPerPack() );
|
||||||
|
String boxCartonText = String.valueOf( ( product.getInventory() / product.getItemPerBox() ) );
|
||||||
|
|
||||||
|
String packagingDetailsText = String.format("%d Item per Pack, %d Pack per Box", product.getItemPerPack(), product.getItemPerBox() );
|
||||||
|
|
||||||
|
itemPerBox.setText( inventory );
|
||||||
|
pieces.setText( itemPerBoxText );
|
||||||
|
boxCarton.setText( boxCartonText );
|
||||||
|
packagingDetails.setText( packagingDetailsText );
|
||||||
|
|
||||||
|
boxCartonSelected.setText( String.valueOf( store.getReport().getItems().get(0).getCartonsSelected() ));
|
||||||
|
itemPerBoxSelected.setText( String.valueOf( store.getReport().getItems().get(0).getPacksSelected() ) );
|
||||||
|
piecesSelected.setText( String.valueOf( store.getReport().getItems().get(0).getPiecesSelected() ) );
|
||||||
|
// generalRemarks.setText( store.getReport().getItems().get(0).getSampleSize() );
|
||||||
|
|
||||||
|
store.getReport().getItems().get(0).setTotalPresentPieces( Long.parseLong( inventory ) );
|
||||||
|
store.getReport().getItems().get(0).setTotalPresentPacks( Long.parseLong( itemPerBoxText ) );
|
||||||
|
store.getReport().getItems().get(0).setTotalPresentCartons( Long.parseLong( boxCartonText ) );
|
||||||
|
store.getReport().getItems().get(0).setPackingDetails( packagingDetailsText );
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch ( Exception e){
|
||||||
|
itemPerBox.setText( "0" );
|
||||||
|
pieces.setText( "0" );
|
||||||
|
boxCarton.setText( "0" );
|
||||||
|
packagingDetails.setText( "" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void populateSize( List<Product> products ){
|
||||||
|
List<String> sizes = Collections.singletonList("[Size]");
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
sizes = products.stream().map( Product::getSmSize ).distinct().collect(Collectors.toList() );
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_dropdown_item, sizes.toArray( new String[0]) );
|
||||||
|
size.setAdapter( adapter );
|
||||||
|
//
|
||||||
|
String sizeOption = (String) size.getSelectedItem();
|
||||||
|
store.getReport().getItems().get(0).setSmSize( sizeOption );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateColor( List<Product> products ){
|
||||||
|
List<String> colors = Collections.singletonList("[Color]");
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
colors = products.stream().map( Product::getSmColor ).distinct().collect(Collectors.toList() );
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_dropdown_item, colors.toArray( new String[0]) );
|
||||||
|
color.setAdapter( adapter );
|
||||||
|
//
|
||||||
|
String colorOption = (String) color.getSelectedItem();
|
||||||
|
store.getReport().getItems().get(0).setSmColor( colorOption );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateTitle( List<Product> products ){
|
||||||
|
List<String> titles = Collections.singletonList("[Title]");
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
titles = products.stream().map( Product::getTitle ).distinct().collect(Collectors.toList()) ;
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_dropdown_item, titles.toArray( new String[0] ));
|
||||||
|
title.setAdapter( adapter );
|
||||||
|
//
|
||||||
|
String titleOption = (String) title.getSelectedItem();
|
||||||
|
store.getReport().getItems().get(0).setTitle( titleOption );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void populateMmodelNumber( List<Product> products ){
|
||||||
|
List<String> modelNumbers = Collections.singletonList("[Model Number]");
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
modelNumbers = products.stream().map( Product::getModelNumber ).distinct().collect(Collectors.toList()) ;
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_dropdown_item, modelNumbers.toArray(new String[0] ));
|
||||||
|
modelNumber.setAdapter( adapter );
|
||||||
|
|
||||||
|
String modelOption = (String) modelNumber.getSelectedItem();
|
||||||
|
store.getReport().getItems().get(0).setMarketplace( modelOption );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateMarketplaces( List<Product> products ){
|
||||||
|
List<String> marketplaces = Collections.singletonList("[ Marketplace ]");
|
||||||
|
if( ! products.isEmpty() ){
|
||||||
|
marketplaces = products.stream().map( Product::getMarketplace ).distinct().collect(Collectors.toList() );
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(), android.R.layout.simple_spinner_dropdown_item, marketplaces.toArray(new String[0] ));
|
||||||
|
markerplace.setAdapter( adapter );
|
||||||
|
//
|
||||||
|
String marketplaceOption = (String) markerplace.getSelectedItem();
|
||||||
|
store.getReport().getItems().get(0).setMarketplace( marketplaceOption );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* initialize views
|
||||||
|
* */
|
||||||
|
private void initializeViews( View view ){
|
||||||
|
leftFab = view.findViewById( R.id.button_left_frag_1 );
|
||||||
|
rightFab = view.findViewById( R.id.button_right_frag_1 );
|
||||||
|
markerplace = view.findViewById( R.id.marketplace );
|
||||||
|
sku = view.findViewById( R.id.sku );
|
||||||
|
modelNumber = view.findViewById( R.id.model_number );
|
||||||
|
title = view.findViewById( R.id.title );
|
||||||
|
color = view.findViewById( R.id.color );
|
||||||
|
size = view.findViewById( R.id.size );
|
||||||
|
boxCarton = view.findViewById( R.id. box_carton );
|
||||||
|
itemPerBox = view.findViewById( R.id.item_per_box );
|
||||||
|
pieces = view.findViewById( R.id.pieces );
|
||||||
|
packagingDetails = view.findViewById( R.id.packaging );
|
||||||
|
boxCartonSelected = view.findViewById( R.id.box_carton_selected );
|
||||||
|
itemPerBoxSelected = view.findViewById( R.id.item_per_box_selected );
|
||||||
|
piecesSelected = view.findViewById( R.id.pieces_selected );
|
||||||
|
fri = view.findViewById( R.id.fri );
|
||||||
|
refri = view.findViewById( R.id.refri );
|
||||||
|
searchSku = view.findViewById( R.id.search_sku_btn );
|
||||||
|
profileName= view.findViewById( R.id.first_step_name );
|
||||||
|
profileImage = view.findViewById( R.id.first_step_profile_image );
|
||||||
|
scanBtn = view.findViewById( R.id.scan_sku_btn );
|
||||||
|
showHistoryBtn = view.findViewById( R.id.button_show_history );
|
||||||
|
}
|
||||||
|
public void onBarcodeScanResult( String result ){
|
||||||
|
if( result != null && ! result.isEmpty() ){
|
||||||
|
apiService.fetchByFnsku( result ).enqueue(
|
||||||
|
new Callback<Product>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<Product> call, Response<Product> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
store.getReport().getItems().get(0).setSku( response.body().getSku() );
|
||||||
|
sku.setText( response.body().getSku() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<Product> call, Throwable t) {
|
||||||
|
Toast.makeText( getContext(), t.getMessage().toString(), Toast.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openItemHistoryDialog() {
|
||||||
|
LayoutInflater inflater = LayoutInflater.from( getContext() );
|
||||||
|
View dialogView = inflater.inflate( R.layout.item_history, null);
|
||||||
|
// recycler view
|
||||||
|
RecyclerView itemHistoryRecyclerView = dialogView.findViewById( R.id.item_history_recyclerview );
|
||||||
|
LinearLayoutManager layoutManager = new LinearLayoutManager( getContext() );
|
||||||
|
itemHistoryRecyclerView.setLayoutManager( layoutManager );
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder( getContext() );
|
||||||
|
|
||||||
|
// set adapter
|
||||||
|
ItemHistoryAdapter itemHistoryAdapter = new ItemHistoryAdapter( new ArrayList<>());
|
||||||
|
itemHistoryRecyclerView.setAdapter( itemHistoryAdapter );
|
||||||
|
|
||||||
|
builder.setView(dialogView)
|
||||||
|
.setTitle("Item History")
|
||||||
|
.setPositiveButton( "OK",(dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
} )
|
||||||
|
.setNegativeButton("Cancel", (dialog, which) -> {
|
||||||
|
// Handle Cancel button click
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
System.out.println( "SKU" + store.getReport().getItems().get(0).getSku() );
|
||||||
|
if( store.getReport().getItems().get(0).getSku() != null ){
|
||||||
|
apiService.fetchItemsLogs( store.getReport().getItems().get(0).getSku() ).enqueue(
|
||||||
|
new Callback<List<InspectionReportItem>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<InspectionReportItem>> call, Response<List<InspectionReportItem>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
// set adapter
|
||||||
|
System.out.println( response.body() );
|
||||||
|
ItemHistoryAdapter itemHistoryAdapter = new ItemHistoryAdapter( response.body() );
|
||||||
|
itemHistoryRecyclerView.setAdapter( itemHistoryAdapter );
|
||||||
|
itemHistoryAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<InspectionReportItem>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// Show the dialog
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.example.qualitychecker.ui.fragments;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.navigation.NavController;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
|
||||||
|
public class ForthStepFragment extends Fragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|
||||||
|
private NavController navController;
|
||||||
|
private Button leftFab,rightFab;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_forth_step , container, false );
|
||||||
|
leftFab = view.findViewById( R.id.button_left_frag_4 );
|
||||||
|
rightFab = view.findViewById( R.id.button_right_frag_4 );
|
||||||
|
|
||||||
|
// set on click listener
|
||||||
|
leftFab.setOnClickListener( this );
|
||||||
|
rightFab.setOnClickListener( this );
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
navController = Navigation.findNavController( requireView() );
|
||||||
|
if( v.getId() == R.id.button_left_frag_4 ){
|
||||||
|
navController.navigate( R.id.action_forthStepFragment_to_thirdStepFragment );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,165 @@
|
||||||
|
package com.example.qualitychecker.ui.fragments;
|
||||||
|
|
||||||
|
import static android.app.Activity.RESULT_OK;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.app.ActivityCompat;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.navigation.NavController;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiService;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiServiceFactory;
|
||||||
|
import com.example.qualitychecker.models.InspectionCheckPoint;
|
||||||
|
import com.example.qualitychecker.models.InspectionDefect;
|
||||||
|
import com.example.qualitychecker.service.InspectionReportService;
|
||||||
|
import com.example.qualitychecker.store.Store;
|
||||||
|
import com.example.qualitychecker.ui.adapter.CheckPointAdapter;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public class SecondStepFragment extends Fragment
|
||||||
|
implements View.OnClickListener {
|
||||||
|
|
||||||
|
private NavController navController;
|
||||||
|
private Button leftFab,rightFab;
|
||||||
|
private RecyclerView recyclerView;
|
||||||
|
private CheckPointAdapter adapter;
|
||||||
|
private ApiService apiService;
|
||||||
|
private TextView profileName;
|
||||||
|
private ImageView profileImage;
|
||||||
|
private List<InspectionCheckPoint> checkPoints;
|
||||||
|
private List<InspectionDefect> defects;
|
||||||
|
private InspectionReportService inspectionReportService;
|
||||||
|
private Store store;
|
||||||
|
private static final int MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 100;
|
||||||
|
private static final int MY_PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 101;
|
||||||
|
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_second_step , container, false );
|
||||||
|
|
||||||
|
apiService = ApiServiceFactory.getApiService();
|
||||||
|
store = Store.getInstance();
|
||||||
|
inspectionReportService = InspectionReportService.getInstance();
|
||||||
|
checkPoints = new ArrayList<>();
|
||||||
|
defects = new ArrayList<>();
|
||||||
|
leftFab = view.findViewById( R.id.button_left_frag_2 );
|
||||||
|
rightFab = view.findViewById( R.id.button_right_frag_2 );
|
||||||
|
recyclerView = view.findViewById( R.id.check_point_recycler_view );
|
||||||
|
profileName = view.findViewById( R.id.second_profile_name );
|
||||||
|
profileImage = view.findViewById( R.id.second_step_profile_image );
|
||||||
|
recyclerView.setLayoutManager( new LinearLayoutManager( getContext() ) );
|
||||||
|
|
||||||
|
// PERMISSIONS
|
||||||
|
{
|
||||||
|
// Check if permission is not granted
|
||||||
|
if ( ContextCompat.checkSelfPermission( getContext(), Manifest.permission.READ_EXTERNAL_STORAGE )
|
||||||
|
!= PackageManager.PERMISSION_GRANTED) {
|
||||||
|
|
||||||
|
// Permission is not granted, request it
|
||||||
|
ActivityCompat.requestPermissions( getActivity(),
|
||||||
|
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
|
||||||
|
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ContextCompat.checkSelfPermission( getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||||
|
!= PackageManager.PERMISSION_GRANTED) {
|
||||||
|
|
||||||
|
ActivityCompat.requestPermissions(getActivity(),
|
||||||
|
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||||
|
MY_PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
profileName.setText( store.getEmployeePhoto().getName() );
|
||||||
|
Glide.with( getContext() )
|
||||||
|
.load( store.getProfileImage( ) )
|
||||||
|
.into( profileImage );
|
||||||
|
|
||||||
|
adapter = new CheckPointAdapter( store.getReport().getItems().get( 0 ).getCheckPoints(),
|
||||||
|
store.getCheckPoints(),
|
||||||
|
store.getDefects(),
|
||||||
|
inspectionReportService.getDefectTypes(),
|
||||||
|
getContext());
|
||||||
|
recyclerView.setAdapter( adapter );
|
||||||
|
// set on click listener
|
||||||
|
leftFab.setOnClickListener( this );
|
||||||
|
rightFab.setOnClickListener( this );
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
navController = Navigation.findNavController( requireView() );
|
||||||
|
if( v.getId() == R.id.button_left_frag_2 ){
|
||||||
|
navController.navigate( R.id.action_secondStepFragment_to_firstStepFragment );
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.button_right_frag_2 ){
|
||||||
|
navController.navigate( R.id.action_secondStepFragment_to_thirdStepFragment );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onImagePickerResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
if ( resultCode == RESULT_OK && data != null ) {
|
||||||
|
try {
|
||||||
|
Uri selectedImageUri = data.getData();
|
||||||
|
String imagePath = selectedImageUri.getPath();
|
||||||
|
store.getReport().getItems().get( 0 ).getCheckPoints().get( requestCode ).setImagePath( imagePath );
|
||||||
|
store.getReport().getItems().get( 0 ).getCheckPoints().get( requestCode ).setFile( getBytesFromUri( getContext(), selectedImageUri ) );
|
||||||
|
adapter.notifyItemChanged( requestCode );
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] getBytesFromUri(Context context, Uri uri) {
|
||||||
|
if( uri != null ) {
|
||||||
|
try {
|
||||||
|
InputStream inputStream = context.getContentResolver().openInputStream(uri);
|
||||||
|
if (inputStream != null) {
|
||||||
|
ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
|
||||||
|
byte[] buffer = new byte[1024];
|
||||||
|
int len;
|
||||||
|
while ((len = inputStream.read(buffer)) != -1) {
|
||||||
|
byteBuffer.write(buffer, 0, len);
|
||||||
|
}
|
||||||
|
inputStream.close();
|
||||||
|
return byteBuffer.toByteArray();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,291 @@
|
||||||
|
package com.example.qualitychecker.ui.fragments;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.navigation.NavController;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.example.qualitychecker.R;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiService;
|
||||||
|
import com.example.qualitychecker.apiservice.ApiServiceFactory;
|
||||||
|
import com.example.qualitychecker.models.InspectionItemDimension;
|
||||||
|
import com.example.qualitychecker.models.SaveReportCallback;
|
||||||
|
import com.example.qualitychecker.models.VoiceOfCustomer;
|
||||||
|
import com.example.qualitychecker.service.InspectionReportService;
|
||||||
|
import com.example.qualitychecker.store.Store;
|
||||||
|
import com.example.qualitychecker.ui.adapter.DimensionAdapter;
|
||||||
|
import com.example.qualitychecker.ui.adapter.ItemDimensionAdapter;
|
||||||
|
import com.example.qualitychecker.ui.adapter.VocAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
public class ThirdStepFragment extends Fragment implements View.OnClickListener {
|
||||||
|
private NavController navController;
|
||||||
|
private Button backBtn,nextBtn,openDimensionDialog;
|
||||||
|
private TextView profileName;
|
||||||
|
private ImageView profileImage;
|
||||||
|
private InspectionReportService inspectionReportService;
|
||||||
|
private RecyclerView vocRecyclerView,itemDimensionsRecyclerView;
|
||||||
|
private Store store;
|
||||||
|
private Spinner resultSpinner;
|
||||||
|
private ApiService apiService;
|
||||||
|
private EditText generalRemarks;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_third_step , container, false );
|
||||||
|
|
||||||
|
inspectionReportService = InspectionReportService.getInstance();
|
||||||
|
store = Store.getInstance();
|
||||||
|
apiService = ApiServiceFactory.getApiService();
|
||||||
|
|
||||||
|
initializeViews( view );
|
||||||
|
populateViews();
|
||||||
|
setOnClickListeners();
|
||||||
|
vocRecyclerView.setLayoutManager( new LinearLayoutManager( getContext() ) );
|
||||||
|
itemDimensionsRecyclerView.setLayoutManager( new LinearLayoutManager( getContext() ) );
|
||||||
|
|
||||||
|
String asin = store.getReport().getItems().get(0).getAsin();
|
||||||
|
apiService.fetchVocs( asin ).enqueue(
|
||||||
|
new Callback<List<VoiceOfCustomer>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<List<VoiceOfCustomer>> call,
|
||||||
|
Response<List<VoiceOfCustomer>> response) {
|
||||||
|
if( response.isSuccessful() && response.body() != null ){
|
||||||
|
VocAdapter adapter = new VocAdapter( response.body(), getContext() );
|
||||||
|
vocRecyclerView.setAdapter( adapter );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<List<VoiceOfCustomer>> call, Throwable t) {
|
||||||
|
System.out.println( t.getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
ItemDimensionAdapter adapter = new ItemDimensionAdapter( store.getReport().getItems().get(0).getDimensions() );
|
||||||
|
itemDimensionsRecyclerView.setAdapter( adapter );
|
||||||
|
|
||||||
|
generalRemarks.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
store.getReport().setGeneralRemarks( s.toString() );
|
||||||
|
} catch ( Exception e ){
|
||||||
|
store.getReport().setGeneralRemarks( "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
navController = Navigation.findNavController( requireView() );
|
||||||
|
if( v.getId() == R.id.button_left_frag_3 ){
|
||||||
|
navController.navigate( R.id.action_thirdStepFragment_to_secondStepFragment );
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.button_right_frag_3 ){
|
||||||
|
saveReportDialog();
|
||||||
|
}
|
||||||
|
if( v.getId() == R.id.button_open_dimension ){
|
||||||
|
openDimensionDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveReportDialog(){
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder( getContext() );
|
||||||
|
builder.setTitle("So you want to save report?")
|
||||||
|
.setPositiveButton( "Save",(dialog, which) -> {
|
||||||
|
inspectionReportService.saveReport(store.getReport(), new SaveReportCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Toast.makeText( getContext(), "Report saved Successfully", Toast.LENGTH_LONG ).show();
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable throwable) {
|
||||||
|
Toast.makeText( getContext(), throwable.getMessage(), Toast.LENGTH_LONG ).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.setNegativeButton("Cancel", (dialog, which) -> {
|
||||||
|
// Handle Cancel button click
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
// Show the dialog
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void openDimensionDialog() {
|
||||||
|
LayoutInflater inflater = LayoutInflater.from( getContext() );
|
||||||
|
View dialogView = inflater.inflate( R.layout.dimension_dialog, null);
|
||||||
|
// recycler view
|
||||||
|
RecyclerView dimensionRecyclerView = dialogView.findViewById( R.id.dimension_recycler_view );
|
||||||
|
LinearLayoutManager layoutManager = new LinearLayoutManager( getContext() );
|
||||||
|
dimensionRecyclerView.setLayoutManager( layoutManager );
|
||||||
|
// set adapter
|
||||||
|
DimensionAdapter dimensionAdapter = new DimensionAdapter( store.getDimensions(),
|
||||||
|
store.getDimensionList(),
|
||||||
|
store.getItemUnits() );
|
||||||
|
dimensionRecyclerView.setAdapter( dimensionAdapter );
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder( getContext() );
|
||||||
|
builder.setView(dialogView)
|
||||||
|
.setTitle("Select Dimensions")
|
||||||
|
.setPositiveButton( "Save",(dialog, which) -> {
|
||||||
|
calculateDimensions();
|
||||||
|
dialog.dismiss();
|
||||||
|
} )
|
||||||
|
.setNegativeButton("Cancel", (dialog, which) -> {
|
||||||
|
// Handle Cancel button click
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
Button addItemBtn = dialogView.findViewById( R.id.add_dimension_item );
|
||||||
|
addItemBtn.setOnClickListener(v -> {
|
||||||
|
int position = store.getDimensions().size();
|
||||||
|
store.getDimensions().add( new InspectionItemDimension() );
|
||||||
|
dimensionAdapter.notifyItemInserted( position );
|
||||||
|
dimensionRecyclerView.smoothScrollToPosition( position );
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Show the dialog
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
dialog.show();
|
||||||
|
// After show, clear the flags and set the soft input mode
|
||||||
|
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||||
|
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateViews(){
|
||||||
|
|
||||||
|
profileName.setText( store.getEmployeePhoto().getName() );
|
||||||
|
Glide.with( getContext() )
|
||||||
|
.load( store.getProfileImage( ) )
|
||||||
|
.into( profileImage );
|
||||||
|
|
||||||
|
generalRemarks.setText( store.getReport().getGeneralRemarks() );
|
||||||
|
|
||||||
|
ArrayAdapter<String> adapter = new ArrayAdapter( getContext(),
|
||||||
|
android.R.layout.simple_spinner_item,
|
||||||
|
inspectionReportService.getReportResult() );
|
||||||
|
resultSpinner.setAdapter( adapter );
|
||||||
|
|
||||||
|
String defaultSelection = store.getReport().getReportResult();
|
||||||
|
int defaultIndexResultIndex = inspectionReportService.getReportResult().indexOf( defaultSelection );
|
||||||
|
resultSpinner.setSelection( defaultIndexResultIndex );
|
||||||
|
|
||||||
|
resultSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String result = parent.getItemAtPosition( position ).toString();
|
||||||
|
store.getReport().setReportResult( result );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void calculateDimensions(){
|
||||||
|
List<InspectionItemDimension> dimensions = store.getDimensions();
|
||||||
|
List<InspectionItemDimension> newDimensions = new ArrayList<>();
|
||||||
|
// calculations for averaging
|
||||||
|
Map<String,List<InspectionItemDimension>> typeToDimensionsMap =
|
||||||
|
dimensions.stream().collect(Collectors.groupingBy( InspectionItemDimension::getType) );
|
||||||
|
|
||||||
|
for( Map.Entry<String,List<InspectionItemDimension>> entry : typeToDimensionsMap.entrySet() ){
|
||||||
|
float required = 0f;
|
||||||
|
float actual = 0f;
|
||||||
|
float difference =0f;
|
||||||
|
String unit = null;
|
||||||
|
float size = entry.getValue().size();
|
||||||
|
|
||||||
|
for( InspectionItemDimension dimen : entry.getValue() ){
|
||||||
|
required += dimen.getRequired();
|
||||||
|
actual += dimen.getActual();
|
||||||
|
difference += dimen.getDifference();
|
||||||
|
if( unit == null ){
|
||||||
|
unit = dimen.getUnit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// average
|
||||||
|
required /= size;
|
||||||
|
actual /= size;
|
||||||
|
difference /= size;
|
||||||
|
|
||||||
|
InspectionItemDimension newDimen = new InspectionItemDimension(
|
||||||
|
entry.getKey(),
|
||||||
|
actual,
|
||||||
|
required,
|
||||||
|
difference,
|
||||||
|
unit
|
||||||
|
);
|
||||||
|
newDimensions.add( newDimen );
|
||||||
|
}
|
||||||
|
store.getReport().getItems().get(0).setDimensions( newDimensions );
|
||||||
|
ItemDimensionAdapter adapter = new ItemDimensionAdapter( store.getReport().getItems().get(0).getDimensions() );
|
||||||
|
itemDimensionsRecyclerView.setAdapter( adapter );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeViews( View view ){
|
||||||
|
backBtn = view.findViewById( R.id.button_left_frag_3 );
|
||||||
|
nextBtn = view.findViewById( R.id.button_right_frag_3 );
|
||||||
|
openDimensionDialog = view.findViewById( R.id.button_open_dimension );
|
||||||
|
profileImage = view.findViewById( R.id.third_step_profile_image );
|
||||||
|
profileName = view.findViewById( R.id.third_profile_name );
|
||||||
|
vocRecyclerView = view.findViewById( R.id.voc_recyclerview );
|
||||||
|
resultSpinner = view.findViewById( R.id.result_spinner );
|
||||||
|
generalRemarks = view.findViewById( R.id.general_remarks );
|
||||||
|
itemDimensionsRecyclerView = view.findViewById( R.id.item_dimensions_recyclerview );
|
||||||
|
}
|
||||||
|
private void setOnClickListeners(){
|
||||||
|
nextBtn.setOnClickListener( this );
|
||||||
|
backBtn.setOnClickListener( this );
|
||||||
|
openDimensionDialog.setOnClickListener( this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
|
android:fromXDelta="-100%p"
|
||||||
|
android:toXDelta="0"
|
||||||
|
android:duration="300"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
|
android:fromXDelta="100%p"
|
||||||
|
android:toXDelta="0"
|
||||||
|
android:duration="300"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
|
android:fromXDelta="0"
|
||||||
|
android:toXDelta="-100%p"
|
||||||
|
android:duration="300"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<translate
|
||||||
|
android:fromXDelta="0"
|
||||||
|
android:toXDelta="100%p"
|
||||||
|
android:duration="300"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#AA000000"/>
|
||||||
|
<corners android:radius="12dp"/>
|
||||||
|
</shape>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#FF0000"/> <!-- Background color -->
|
||||||
|
<corners android:radius="20dp"/> <!-- Corner radius -->
|
||||||
|
</shape>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,170 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#4CAF50"/> <!-- Background color -->
|
||||||
|
<corners android:radius="20dp"/> <!-- Corner radius -->
|
||||||
|
</shape>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#FF6200EE"/>
|
||||||
|
<corners android:radius="24dp"/>
|
||||||
|
</shape>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M9.5,6.5v3h-3v-3H9.5M11,5H5v6h6V5L11,5zM9.5,14.5v3h-3v-3H9.5M11,13H5v6h6V13L11,13zM17.5,6.5v3h-3v-3H17.5M19,5h-6v6h6V5L19,5zM13,13h1.5v1.5H13V13zM14.5,14.5H16V16h-1.5V14.5zM16,13h1.5v1.5H16V13zM13,16h1.5v1.5H13V16zM14.5,17.5H16V19h-1.5V17.5zM16,16h1.5v1.5H16V16zM17.5,14.5H19V16h-1.5V14.5zM17.5,17.5H19V19h-1.5V17.5zM22,7h-2V4h-3V2h5V7zM22,22v-5h-2v3h-3v2H22zM2,22h5v-2H4v-3H2V22zM2,2v5h2V4h3V2H2z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,73 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="225.36101dp" android:viewportHeight="227" android:viewportWidth="554" android:width="550dp">
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M251.64,198.78V183.84H254v14.94Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M259.74,188.21v10.57h-2.38V183.84h1.94l8.46,10.79V183.86h2.36v14.92h-2.05Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M273.5,198.78L273.5,183.84h5.3a7.46,7.46 0,0 1,4 1,6.25 6.25,0 0,1 2.43,2.69 8.47,8.47 0,0 1,0.83 3.76,8.25 8.25,0 0,1 -0.9,4 6.42,6.42 0,0 1,-2.53 2.61,7.71 7.71,0 0,1 -3.86,0.93ZM283.69,191.29a6.39,6.39 0,0 0,-0.58 -2.78,4.64 4.64,0 0,0 -1.66,-1.9 4.86,4.86 0,0 0,-2.65 -0.69h-2.92v10.77h2.92a4.73,4.73 0,0 0,2.67 -0.71,4.6 4.6,0 0,0 1.65,-1.94A6.41,6.41 0,0 0,283.69 191.29Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M294.8,198.88a6.69,6.69 0,0 1,-3 -0.61,5.28 5.28,0 0,1 -2,-1.66 7.11,7.11 0,0 1,-1.09 -2.4,10.8 10.8,0 0,1 -0.35,-2.8v-7.57h2.38v7.57a9.27,9.27 0,0 0,0.2 2,5.31 5.31,0 0,0 0.66,1.72 3.37,3.37 0,0 0,1.24 1.19,3.81 3.81,0 0,0 1.94,0.45 3.88,3.88 0,0 0,2 -0.45,3.33 3.33,0 0,0 1.25,-1.22 5.43,5.43 0,0 0,0.68 -1.72,9.72 9.72,0 0,0 0.2,-2v-7.57h2.38v7.57a11.16,11.16 0,0 1,-0.37 2.89,7.06 7.06,0 0,1 -1.14,2.39 5.12,5.12 0,0 1,-2 1.61A6.81,6.81 0,0 1,294.8 198.88Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M313.23,187.35a2.71,2.71 0,0 0,-0.6 -0.49,5.61 5.61,0 0,0 -0.95,-0.49 8.61,8.61 0,0 0,-1.18 -0.38,5.66 5.66,0 0,0 -1.31,-0.15 3.64,3.64 0,0 0,-2.19 0.54,1.78 1.78,0 0,0 -0.71,1.51 1.6,1.6 0,0 0,0.39 1.13,2.84 2.84,0 0,0 1.24,0.68c0.55,0.17 1.23,0.36 2.05,0.55a14.89,14.89 0,0 1,2.64 0.86,4.34 4.34,0 0,1 1.7,1.32 3.61,3.61 0,0 1,0.6 2.18,4.07 4.07,0 0,1 -0.43,1.93 3.71,3.71 0,0 1,-1.19 1.33,5.5 5.5,0 0,1 -1.74,0.76 8.52,8.52 0,0 1,-2.13 0.25,10.48 10.48,0 0,1 -2.22,-0.24 10.34,10.34 0,0 1,-2.1 -0.69,10 10,0 0,1 -1.87,-1.11l1.1,-2a4.08,4.08 0,0 0,0.78 0.6,9.06 9.06,0 0,0 1.21,0.62 9.63,9.63 0,0 0,1.49 0.5,7 7,0 0,0 1.65,0.2 4,4 0,0 0,2.16 -0.49,1.61 1.61,0 0,0 0.75,-1.43 1.54,1.54 0,0 0,-0.5 -1.19,4 4,0 0,0 -1.41,-0.76c-0.61,-0.21 -1.34,-0.42 -2.2,-0.63a13.13,13.13 0,0 1,-2.46 -0.86,3.61 3.61,0 0,1 -1.47,-1.21 3.36,3.36 0,0 1,-0.49 -1.91,4.27 4.27,0 0,1 0.71,-2.49 4.32,4.32 0,0 1,1.95 -1.52,7 7,0 0,1 2.75,-0.52 8.65,8.65 0,0 1,1.93 0.22,8.74 8.74,0 0,1 1.7,0.6 6.92,6.92 0,0 1,1.4 0.87Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M328.13,185.92h-5v12.86h-2.38V185.92h-5v-2.08h12.33Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M330.13,198.78L330.13,183.84h6.5a4.09,4.09 0,0 1,1.85 0.42,4.83 4.83,0 0,1 1.46,1.11 5.42,5.42 0,0 1,1 1.57,4.76 4.76,0 0,1 0.35,1.76 5,5 0,0 1,-0.36 1.9,4.55 4.55,0 0,1 -1,1.55 3.92,3.92 0,0 1,-1.55 0.94l3.51,5.69h-2.65l-3.24,-5.2L332.5,193.58v5.2ZM332.5,191.5h4.11a1.82,1.82 0,0 0,1.15 -0.39,2.62 2.62,0 0,0 0.8,-1 3.21,3.21 0,0 0,0.3 -1.39,2.89 2.89,0 0,0 -0.35,-1.41 2.84,2.84 0,0 0,-0.87 -1,2 2,0 0,0 -1.16,-0.37h-4Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M344,198.78V183.84h2.38v14.94Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M360,196.69v2.09H349.76V183.84h10.05v2.08h-7.68v4.27h6.67v1.94h-6.67v4.56Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M371.11,187.35a2.31,2.31 0,0 0,-0.6 -0.49,5.89 5.89,0 0,0 -0.94,-0.49 8.61,8.61 0,0 0,-1.18 -0.38,5.81 5.81,0 0,0 -1.32,-0.15 3.59,3.59 0,0 0,-2.18 0.54,1.79 1.79,0 0,0 -0.72,1.51 1.56,1.56 0,0 0,0.4 1.13,2.86 2.86,0 0,0 1.23,0.68c0.55,0.17 1.24,0.36 2.05,0.55a14.36,14.36 0,0 1,2.64 0.86,4.31 4.31,0 0,1 1.71,1.32 3.61,3.61 0,0 1,0.6 2.18,4.19 4.19,0 0,1 -0.43,1.93 3.8,3.8 0,0 1,-1.19 1.33,5.66 5.66,0 0,1 -1.75,0.76 8.52,8.52 0,0 1,-2.13 0.25,10.48 10.48,0 0,1 -2.22,-0.24A10.76,10.76 0,0 1,363 198a9.63,9.63 0,0 1,-1.86 -1.11l1.09,-2a4.08,4.08 0,0 0,0.78 0.6,9.71 9.71,0 0,0 1.21,0.62 10.14,10.14 0,0 0,1.5 0.5,7 7,0 0,0 1.65,0.2 4,4 0,0 0,2.15 -0.49,1.61 1.61,0 0,0 0.75,-1.43 1.53,1.53 0,0 0,-0.49 -1.19,4 4,0 0,0 -1.41,-0.76c-0.61,-0.21 -1.35,-0.42 -2.2,-0.63a12.88,12.88 0,0 1,-2.46 -0.86,3.71 3.71,0 0,1 -1.48,-1.21 3.44,3.44 0,0 1,-0.48 -1.91,4.27 4.27,0 0,1 0.7,-2.49 4.32,4.32 0,0 1,1.95 -1.52,7 7,0 0,1 2.76,-0.52 8.56,8.56 0,0 1,1.92 0.22,9.08 9.08,0 0,1 1.71,0.6 7.21,7.21 0,0 1,1.4 0.87Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M379.47,191.47a10.71,10.71 0,0 1,0.88 -4.21,34.27 34.27,0 0,1 2.17,-4.26l1.77,0.75a16.31,16.31 0,0 0,-0.84 1.45c-0.3,0.59 -0.59,1.25 -0.88,2a14.37,14.37 0,0 0,-0.69 2.2,9.35 9.35,0 0,0 -0.27,2.18 9.87,9.87 0,0 0,0.72 3.56,24 24,0 0,0 1.89,3.8l-1.68,0.89a23.48,23.48 0,0 1,-1.59 -2.72,15.52 15.52,0 0,1 -1.08,-2.8A10.08,10.08 0,0 1,379.47 191.47Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M386.56,198.78L386.56,183.84h6.27a4.09,4.09 0,0 1,1.85 0.42,5 5,0 0,1 2.78,4.44 5.18,5.18 0,0 1,-0.56 2.35,4.77 4.77,0 0,1 -1.57,1.82 4,4 0,0 1,-2.38 0.71h-4v5.2ZM388.93,191.5h3.88a1.93,1.93 0,0 0,1.15 -0.37,2.45 2.45,0 0,0 0.8,-1 3.37,3.37 0,0 0,0.3 -1.44,2.89 2.89,0 0,0 -0.34,-1.44 2.49,2.49 0,0 0,-0.87 -1,2.1 2.1,0 0,0 -1.15,-0.35h-3.77Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M399.43,198.78L399.43,183.84h6.51a4.09,4.09 0,0 1,1.85 0.42,4.83 4.83,0 0,1 1.46,1.11 5.42,5.42 0,0 1,1 1.57,4.76 4.76,0 0,1 0.35,1.76 5,5 0,0 1,-0.36 1.9,4.55 4.55,0 0,1 -1,1.55 3.92,3.92 0,0 1,-1.55 0.94l3.51,5.69L408.5,198.78l-3.24,-5.2h-3.45v5.2ZM401.81,191.5h4.11a1.82,1.82 0,0 0,1.15 -0.39,2.62 2.62,0 0,0 0.8,-1 3.21,3.21 0,0 0,0.3 -1.39,2.89 2.89,0 0,0 -0.35,-1.41 2.84,2.84 0,0 0,-0.87 -1,2 2,0 0,0 -1.16,-0.37h-4Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M413.34,198.78V183.84h2.38v14.94Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M420,183.84l4.53,12 4.48,-12h2.48l-5.87,14.94H423.4l-5.89,-14.94Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M437.65,183.84h2.23l5.8,14.94L443.2,198.78l-1.46,-4.06h-6l-1.47,4.06h-2.48ZM441.11,192.97 L438.76,186.42L436.4,193Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M458.5,185.92h-5v12.86h-2.38V185.92h-5v-2.08H458.5Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M470.74,196.69v2.09H460.5V183.84h10.05v2.08h-7.68v4.27h6.67v1.94h-6.67v4.56Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M476.91,191.47a10.08,10.08 0,0 1,-0.4 2.8,16.36 16.36,0 0,1 -1.09,2.8 26.65,26.65 0,0 1,-1.58 2.72l-1.71,-0.89a23.22,23.22 0,0 0,1.9 -3.8,10.06 10.06,0 0,0 0.71,-3.56 9.89,9.89 0,0 0,-0.26 -2.18,15.62 15.62,0 0,0 -0.7,-2.2c-0.28,-0.71 -0.58,-1.37 -0.88,-2s-0.57,-1.07 -0.81,-1.45l1.79,-0.75a37,37 0,0 1,2.15 4.26A10.89,10.89 0,0 1,476.91 191.47Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M479,198.78v-2.7h1.92v2.7Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M489.09,198.78V183.84h2.38v12.85h8v2.09Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M510.26,185.92h-5v12.86h-2.37V185.92h-5v-2.08h12.33Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M512.26,198.78L512.26,183.84h5.3a7.48,7.48 0,0 1,4 1,6.38 6.38,0 0,1 2.43,2.69 8.46,8.46 0,0 1,0.82 3.76,8.37 8.37,0 0,1 -0.89,4 6.39,6.39 0,0 1,-2.54 2.61,7.67 7.67,0 0,1 -3.85,0.93ZM522.44,191.29a6.25,6.25 0,0 0,-0.58 -2.78,4.57 4.57,0 0,0 -1.66,-1.9 4.8,4.8 0,0 0,-2.64 -0.69h-2.92v10.77h2.92a4.69,4.69 0,0 0,2.66 -0.71,4.55 4.55,0 0,0 1.66,-1.94A6.56,6.56 0,0 0,522.44 191.29Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M526.78,198.78v-2.7h1.91v2.7Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#ccb596" android:pathData="M247.05,107.18l-26.33,0l0,69.01l-20,0l0,-69.01l-26.45,0l0,-17.56l72.78,0l0,17.56z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M347.24,176.1v-85h36.3a24.92,24.92 0,0 1,11.2 2.52,28.58 28.58,0 0,1 8.74,6.59 31.6,31.6 0,0 1,5.75 9.22,27.39 27.39,0 0,1 2.1,10.42 29.78,29.78 0,0 1,-2 10.78,30.91 30.91,0 0,1 -5.51,9.22 26,26 0,0 1,-8.56 6.47,25.56 25.56,0 0,1 -11.14,2.39L366.89,148.71L366.89,176.1ZM366.89,131.55h16.05a7.6,7.6 0,0 0,6 -3c1.67,-2 2.51,-4.91 2.51,-8.74a15.17,15.17 0,0 0,-0.78 -5.15,10.4 10.4,0 0,0 -2.09,-3.59 8,8 0,0 0,-3 -2.1,9.08 9.08,0 0,0 -3.35,-0.66L366.89,108.31Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M480.91,91.06h17.73l31,85L509.54,176.06l-6.59,-19L476.48,157.06l-6.47,19L449.89,176.06ZM499.72,143.53 L489.78,113.46 479.59,143.53Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M168.26,116.3l0,-26.88l-42.22,-22.44l0,16.92l42.22,32.4z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:fillType="evenOdd" android:pathData="M332.87,142.66c-2,-1.25 -4,-2.6 -6,-3.95a1.39,1.39 0,0 1,-0.49 -1c-0.23,-3.36 -0.43,-6.72 -0.57,-10.08a1.9,1.9 0,0 1,0.54 -1.34c1.81,-1.61 3.68,-3.16 5.56,-4.71a2.79,2.79 0,0 0,0.87 -3.7l-0.06,-0.12 -1.23,-2.56c-0.46,-0.94 -0.88,-1.88 -1.37,-2.8a2.75,2.75 0,0 0,-3.28 -1.47c-2.33,0.5 -4.68,0.94 -7,1.48a1.71,1.71 0,0 1,-1.76 -0.54c-2.36,-2.2 -4.82,-4.31 -7.2,-6.48a1.89,1.89 0,0 1,-0.61 -1.29c0.16,-2.42 0.4,-4.84 0.65,-7.26a3.08,3.08 0,0 0,-2 -3.32c-1.85,-0.7 -3.73,-1.36 -5.62,-2A3,3 0,0 0,299.63 93c-1.25,2 -2.5,4 -3.84,5.87a2.24,2.24 0,0 1,-1.51 0.75c-1.07,0.08 -2.13,0.15 -3.2,0.21s-2.14,-0.13 -3.2,-0.21a2.24,2.24 0,0 1,-1.51 -0.75C285,97 283.77,95 282.52,93a3,3 0,0 0,-3.71 -1.44c-1.89,0.6 -3.76,1.26 -5.62,2a3.07,3.07 0,0 0,-2 3.32c0.25,2.42 0.49,4.84 0.65,7.26a2,2 0,0 1,-0.62 1.29c-2.38,2.17 -4.83,4.28 -7.2,6.48a1.71,1.71 0,0 1,-1.76 0.54c-2.32,-0.54 -4.66,-1 -7,-1.48a2.77,2.77 0,0 0,-3.29 1.47c-0.48,0.92 -0.91,1.86 -1.36,2.8s-0.83,1.7 -1.24,2.56l-0.06,0.12a2.78,2.78 0,0 0,0.88 3.7c1.87,1.55 3.74,3.1 5.56,4.71a1.89,1.89 0,0 1,0.53 1.34c-0.14,3.36 -0.34,6.72 -0.56,10.08a1.47,1.47 0,0 1,-0.49 1c-2,1.35 -3.94,2.7 -6,3.95a3.15,3.15 0,0 0,-1.61 4c0.56,1.71 1.17,3.41 1.79,5.11 0.69,1.88 1.79,2.47 3.77,2.24q3.5,-0.37 7,-0.6a1.8,1.8 0,0 1,1.2 0.56q3.35,3.69 6.6,7.45a1.72,1.72 0,0 1,0.47 1.23c-0.43,2.38 -0.92,4.76 -1.47,7.12a3,3 0,0 0,1.56 3.64q2.64,1.36 5.36,2.59a3,3 0,0 0,3.75 -0.91c1.53,-1.89 3.05,-3.78 4.65,-5.6a2,2 0,0 1,1.47 -0.47c2.42,0.1 4.83,0.24 7.25,0.4 2.41,-0.16 4.83,-0.3 7.24,-0.4a2.06,2.06 0,0 1,1.48 0.47c1.6,1.82 3.12,3.71 4.65,5.6a3,3 0,0 0,3.75 0.91q2.7,-1.23 5.36,-2.59a3,3 0,0 0,1.56 -3.64c-0.56,-2.36 -1,-4.74 -1.48,-7.12a1.81,1.81 0,0 1,0.47 -1.23q3.27,-3.75 6.61,-7.45a1.78,1.78 0,0 1,1.2 -0.56c2.33,0.15 4.67,0.35 7,0.6 2,0.23 3.07,-0.36 3.77,-2.24 0.62,-1.7 1.22,-3.4 1.78,-5.11a3.15,3.15 0,0 0,-1.6 -4m-28.36,18.79a29.82,29.82 0,1 1,13.87 -39.83,29.78 29.78,0 0,1 -13.87,39.83"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M126.27,88.78v25.93a66.9,66.9 0,0 1,-1.48 14.2,38.74 38.74,0 0,1 -4.67,12 25.14,25.14 0,0 1,-8.26 8.37,22.73 22.73,0 0,1 -12.29,3.18 22.79,22.79 0,0 1,-12.19 -3.07,24.68 24.68,0 0,1 -8.15,-8.26A38.3,38.3 0,0 1,74.56 129a67.6,67.6 0,0 1,-1.48 -14.3V89L32,121.71a101,101 0,0 0,3.6 21.5,65.06 65.06,0 0,0 12.08,23.63 59,59 0,0 0,21.09 16.21q12.81,6 30.83,6 17.37,0 30.2,-5.72a59.14,59.14 0,0 0,21.3 -15.68,63.84 63.84,0 0,0 12.5,-23.63c2.68,-9.11 4,-22.74 4,-22.74Z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M51.01,98.64l-0.73,-25.98l-3.41,0l-0.84,30.17l4.98,-4.19z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M61.67,90.57l-0.69,-35.54l-3.42,0l-0.76,39.65l4.87,-4.11z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M71.99,83.5l-0.3,-10.84l-3.41,0l-0.4,14.32l4.11,-3.48z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#1d1a1b" android:pathData="M42.27,105.32l-2.29,-82.91l-7.07,0l-2.57,92.99l11.93,-10.08z"/>
|
||||||
|
|
||||||
|
<path android:fillColor="#ccb596" android:pathData="M421.91,91.06h19.64v85.04h-19.64z"/>
|
||||||
|
|
||||||
|
</vector>
|
|
@ -0,0 +1,154 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/main"
|
||||||
|
tools:context=".ui.activities.LoginActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="806dp"
|
||||||
|
android:layout_height="1200dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/relativeLayout"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/screen_title"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="35sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.054"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.032" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/profile_image"
|
||||||
|
android:layout_width="93dp"
|
||||||
|
android:layout_height="86dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.367"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.014"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/username_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Ameen ur Rehman"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textStyle="bold|italic"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.325"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/profile_image"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.022" />
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/textView5"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="QC Manager"-->
|
||||||
|
<!-- android:textStyle="italic"-->
|
||||||
|
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||||
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
|
<!-- app:layout_constraintHorizontal_bias="0.386"-->
|
||||||
|
<!-- app:layout_constraintStart_toEndOf="@+id/profile_image"-->
|
||||||
|
<!-- app:layout_constraintTop_toBottomOf="@+id/textView4"-->
|
||||||
|
<!-- app:layout_constraintVertical_bias="0.01" />-->
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="797dp"
|
||||||
|
android:layout_height="1090dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/guide_lne"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Inspection Reports"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/reports_recyclerview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/relativeLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/create_report_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="Create" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/refresh_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/create_report_btn"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/create_report_btn"
|
||||||
|
android:text="Refresh" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/logout_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/refresh_btn"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/refresh_btn"
|
||||||
|
android:text="Logout" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,118 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.activities.LoginActivity">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/txtUsername"
|
||||||
|
android:layout_width="500dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:layout_marginStart="70dp"
|
||||||
|
android:layout_marginEnd="70dp"
|
||||||
|
android:hint="Username"
|
||||||
|
android:textColorHint="#A7A7A7"
|
||||||
|
app:boxStrokeColor="#EAEAEE"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/txtPassword"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.461"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/username"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:textColor="#5B5B5B"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:ignore="TouchTargetSizeCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/txtPassword"
|
||||||
|
android:layout_width="500dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:layout_marginBottom="84dp"
|
||||||
|
android:hint="Password"
|
||||||
|
android:textColorHint="#A7A7A7"
|
||||||
|
app:boxStrokeColor="#EAEAEE"
|
||||||
|
app:endIconMode="password_toggle"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/login_btn"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:textColor="#5B5B5B"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:ignore="TouchTargetSizeCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/login_btn"
|
||||||
|
android:layout_width="513dp"
|
||||||
|
android:layout_height="62dp"
|
||||||
|
android:layout_marginTop="200dp"
|
||||||
|
android:backgroundTint="@color/colorPrimary"
|
||||||
|
android:text="@string/btn_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.626" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/login_btn"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintVertical_bias="0.231" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="679dp"
|
||||||
|
android:layout_height="232dp"
|
||||||
|
android:src="@drawable/utopia_svg_logo"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.504"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.105" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="700dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_marginStart="50dp"
|
||||||
|
android:layout_marginEnd="50dp"
|
||||||
|
android:text="@string/home_title"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="40sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageView"
|
||||||
|
app:layout_constraintVertical_bias="0.079" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
|
||||||
|
<!-- xmlns:app="http://schemas.android.com/apk/res-auto"-->
|
||||||
|
<!-- xmlns:tools="http://schemas.android.com/tools"-->
|
||||||
|
<!-- android:id="@+id/main"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- tools:context=".ui.MainActivity">-->
|
||||||
|
|
||||||
|
<!--</androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||||
|
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/nav_host_fragment"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:defaultNavHost="true"
|
||||||
|
android:layout_above="@id/nav_view"
|
||||||
|
app:navGraph="@navigation/navigation_graph"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/nav_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="@android:color/white">
|
||||||
|
|
||||||
|
<!-- <com.google.android.material.floatingactionbutton.FloatingActionButton-->
|
||||||
|
<!-- android:id="@+id/button_left"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignParentStart="true"-->
|
||||||
|
<!-- android:layout_margin="10dp"-->
|
||||||
|
<!-- android:layout_marginRight="20dp"-->
|
||||||
|
<!-- app:borderWidth="0dp"-->
|
||||||
|
<!-- android:src="@drawable/ic_left"-->
|
||||||
|
<!-- android:tooltipText="Previous"-->
|
||||||
|
<!-- android:clickable="true"-->
|
||||||
|
<!-- android:focusable="true"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <com.google.android.material.floatingactionbutton.FloatingActionButton-->
|
||||||
|
<!-- android:id="@+id/button_right"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignParentEnd="true"-->
|
||||||
|
<!-- android:layout_margin="10dp"-->
|
||||||
|
<!-- android:layout_marginLeft="20dp"-->
|
||||||
|
<!-- app:borderWidth="0dp"-->
|
||||||
|
<!-- android:tooltipText="Next"-->
|
||||||
|
<!-- android:src="@drawable/ic_right"-->
|
||||||
|
<!-- android:clickable="true"-->
|
||||||
|
<!-- android:focusable="true"/>-->
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
|
@ -0,0 +1,109 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:elevation="10dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:layout_marginVertical="4dp">
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:id="@+id/check_point_spinner">
|
||||||
|
|
||||||
|
</Spinner>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="OK"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/check_point_ok"
|
||||||
|
>
|
||||||
|
</CheckBox>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:text="NO"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/check_point_no"
|
||||||
|
>
|
||||||
|
</CheckBox>
|
||||||
|
|
||||||
|
<!-- <ImageButton-->
|
||||||
|
<!-- android:id="@+id/check_point_delete"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:src="@drawable/ic_delete"-->
|
||||||
|
<!-- android:background="@null"-->
|
||||||
|
<!-- android:padding="8dp"/>-->
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="3dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:hint="Remarks"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:id="@+id/check_point_remarks">
|
||||||
|
</EditText>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/selected_image"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:text="image">
|
||||||
|
</TextView>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/image_picker"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/image_picker"
|
||||||
|
android:background="@null"
|
||||||
|
android:padding="8dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:id="@+id/defect_layout">
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:id="@+id/defect_spinner">
|
||||||
|
</Spinner>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:id="@+id/defect_type_spinner">
|
||||||
|
</Spinner>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/dimension_recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/add_dimension_item"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/light_blue"
|
||||||
|
android:text="Add Item"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.908"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/dimension_recycler_view"
|
||||||
|
app:layout_constraintVertical_bias="0.965" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?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="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/dimension_type_spinner">
|
||||||
|
</Spinner>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/dimension_unit_spinner">
|
||||||
|
|
||||||
|
</Spinner>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/required"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
/>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/actual"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/difference"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/dimension_item_delete"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_delete"
|
||||||
|
android:background="@null"
|
||||||
|
android:padding="8dp"/>
|
||||||
|
</LinearLayout>
|
|
@ -0,0 +1,373 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.activities.LoginActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="806dp"
|
||||||
|
android:layout_height="1200dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/relativeLayout"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/screen_title"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="35sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.054"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.032" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/first_step_profile_image"
|
||||||
|
android:layout_width="93dp"
|
||||||
|
android:layout_height="86dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.367"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.014"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/first_step_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textStyle="bold|italic"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.325"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/first_step_profile_image"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.022" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="750dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.119">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="STEP 1 INFO" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 2 Checkpoints" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 3 Dimension"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="800dp"
|
||||||
|
android:layout_height="1000dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<!-- guide lines-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/guide_lne"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Guidelines"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView7"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/guide_line_text"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.067"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/guide_lne"
|
||||||
|
app:layout_constraintVertical_bias="0.008" />
|
||||||
|
</LinearLayout>
|
||||||
|
<!-- inspection checkboxes-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/inspection_type"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Inspection type"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/fri"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:text="FRI"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/refri"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:text="RE-FRI"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Item / SKU Detal"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/sku"
|
||||||
|
android:layout_width="400dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="SKU"
|
||||||
|
android:inputType="text"/>
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/scan_sku_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/scan"
|
||||||
|
android:background="@null"
|
||||||
|
android:padding="8dp"/>
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/search_sku_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_search"
|
||||||
|
android:background="@null"
|
||||||
|
android:padding="8dp"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/model_number"
|
||||||
|
android:layout_width="210dp"
|
||||||
|
android:layout_height="44dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="450dp"
|
||||||
|
android:layout_height="45dp" />
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/marketplace"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="45dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/color"
|
||||||
|
android:layout_width="325dp"
|
||||||
|
android:layout_height="45dp" />
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/size"
|
||||||
|
android:layout_width="325dp"
|
||||||
|
android:layout_height="45dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Item Presented Details"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_margin="16dp" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/box_carton"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Box / Carton "
|
||||||
|
android:inputType="text"/>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/item_per_box"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Packs (Item / box)"
|
||||||
|
android:inputType="text"/>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/pieces"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Pieces"
|
||||||
|
android:inputType="text"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/packaging"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Packaging Details"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:inputType="text"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Item Selected Details"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_margin="16dp" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/box_carton_selected"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Box / Carton "
|
||||||
|
android:inputType="text"/>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/item_per_box_selected"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Packs (Item / box)"
|
||||||
|
android:inputType="text" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/pieces_selected"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Pieces"
|
||||||
|
android:inputType="text"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="General Remarks"-->
|
||||||
|
<!-- android:textColor="@color/black"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- android:layout_margin="16dp" />-->
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/general_remarks"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:hint="General Remarks"-->
|
||||||
|
<!-- android:layout_marginHorizontal="10dp"-->
|
||||||
|
<!-- android:layout_marginVertical="10dp"-->
|
||||||
|
<!-- android:inputType="text"/>-->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/relativeLayout"
|
||||||
|
android:layout_width="805dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_right_frag_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="Next" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_left_frag_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/button_right_frag_1"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_right_frag_1"
|
||||||
|
android:text="Close" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_show_history"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/button_left_frag_1"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_left_frag_1"
|
||||||
|
android:text="History" />
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,186 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.activities.LoginActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="806dp"
|
||||||
|
android:layout_height="1200dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/relativeLayout"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/screen_title"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="35sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.054"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.032" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/profile_image"
|
||||||
|
android:layout_width="93dp"
|
||||||
|
android:layout_height="86dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.367"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.014"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Ameen ur Rehman"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textStyle="bold|italic"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.325"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/profile_image"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.022" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView5"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="QC Manager"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.386"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/profile_image"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView4"
|
||||||
|
app:layout_constraintVertical_bias="0.01" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="750dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.119">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 1 INFO" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 2 Checkpoints" />
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 3 Dimension"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="800dp"
|
||||||
|
android:layout_height="1000dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/guide_lne"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Guidelines"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView7"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/checkpoint_guide_lines"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.067"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/guide_lne"
|
||||||
|
app:layout_constraintVertical_bias="0.008" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/relativeLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_right_frag_4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="Save" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_left_frag_4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/button_right_frag_4"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_right_frag_4"
|
||||||
|
android:text="Back" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,187 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.activities.LoginActivity"
|
||||||
|
android:id="@+id/fragment_tag">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="806dp"
|
||||||
|
android:layout_height="1200dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/relativeLayout"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/screen_title"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="35sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.054"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.032" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/second_step_profile_image"
|
||||||
|
android:layout_width="93dp"
|
||||||
|
android:layout_height="86dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.367"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.014"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/second_profile_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textStyle="bold|italic"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.325"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/second_step_profile_image"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.022" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="750dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.119">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 1 INFO" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="STEP 2 Checkpoints" />
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 3 Dimension"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="800dp"
|
||||||
|
android:layout_height="1000dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/guide_lne"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Guidelines"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView7"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/checkpoint_guide_lines"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.067"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/guide_lne"
|
||||||
|
app:layout_constraintVertical_bias="0.008" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:id="@+id/check_point_recycler_view">
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/relativeLayout"
|
||||||
|
android:layout_width="805dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_right_frag_2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="Next" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_left_frag_2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/button_right_frag_2"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_right_frag_2"
|
||||||
|
android:text="Back" />
|
||||||
|
|
||||||
|
<!-- <Button-->
|
||||||
|
<!-- android:id="@+id/button_add_frag_2"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignBaseline="@id/button_right_frag_2"-->
|
||||||
|
<!-- android:layout_marginEnd="16dp"-->
|
||||||
|
<!-- android:layout_toStartOf="@id/button_left_frag_2"-->
|
||||||
|
<!-- android:text="Add CheckPoint" />-->
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,434 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.activities.LoginActivity">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="806dp"
|
||||||
|
android:layout_height="1200dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/relativeLayout"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.333"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/screen_title"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="35sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.054"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.032" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/third_step_profile_image"
|
||||||
|
android:layout_width="93dp"
|
||||||
|
android:layout_height="86dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.367"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.014"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/third_profile_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textStyle="bold|italic"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.325"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/third_step_profile_image"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.022" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
|
android:layout_width="750dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.119">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 1 INFO" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:text="STEP 2 Checkpoints" />
|
||||||
|
<Button
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="STEP 3 Dimension"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="800dp"
|
||||||
|
android:layout_height="1000dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/guide_lne"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Guidelines"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView7"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/checkpoint_guide_lines"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.067"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/guide_lne"
|
||||||
|
app:layout_constraintVertical_bias="0.008" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_sample"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Dimension"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Unit"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Required"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Actual"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Difference"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:textAlignment="center"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/item_dimensions_recyclerview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:layout_margin="20dp">
|
||||||
|
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_margin="16dp"-->
|
||||||
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/length"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Length"-->
|
||||||
|
<!-- android:textColor="@color/black"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- android:layout_weight="1"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/required_length"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/actual_length"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/difference_length"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_margin="16dp"-->
|
||||||
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/width"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Width"-->
|
||||||
|
<!-- android:textColor="@color/black"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- android:layout_weight="1"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/required_width"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/actual_width"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/difference_width"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
<!-- <LinearLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_margin="16dp"-->
|
||||||
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/drop"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="Drop"-->
|
||||||
|
<!-- android:textColor="@color/black"-->
|
||||||
|
<!-- android:textStyle="bold"-->
|
||||||
|
<!-- android:layout_weight="1"/>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/required_drop"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/actual_drop"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
<!-- <EditText-->
|
||||||
|
<!-- android:id="@+id/difference_drop"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<!-- Text Label -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="Status"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/result_spinner"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:prompt="@string/spinner_title"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="General Remarks"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_margin="10dp" />
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/general_remarks"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="General Remarks"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:inputType="text"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Vocs"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<!-- <Spinner-->
|
||||||
|
<!-- android:id="@+id/result_spinner"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_weight="1"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </Spinner>-->
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/voc_recyclerview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/relativeLayout"
|
||||||
|
android:layout_width="805dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_right_frag_3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="@color/light_blue"
|
||||||
|
android:text="Submit" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_left_frag_3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/button_right_frag_3"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_right_frag_3"
|
||||||
|
android:text="Back" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_open_dimension"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBaseline="@id/button_left_frag_3"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_left_frag_3"
|
||||||
|
android:text="Add Dimensions" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?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="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="4dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/dimension_type">
|
||||||
|
</EditText>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:id="@+id/dimension_unit">
|
||||||
|
|
||||||
|
</EditText>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/dimension_required"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/dimension_actual"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/dimension_difference"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/item_history_recyclerview">
|
||||||
|
|
||||||
|
</androidx.recyclerview.widget.RecyclerView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="16dp"
|
||||||
|
android:layout_margin="5dp">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_history_sku"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="HOME"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="24sp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_history_asin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="ASIN"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:layout_below="@id/item_history_sku"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_history_date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="00-00-0000"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_below="@+id/item_history_sku"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_history_cartons"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Cartons :100"
|
||||||
|
android:layout_below="@+id/item_history_asin"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_history_packs"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Packs :100"
|
||||||
|
android:layout_below="@id/item_history_cartons"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item_history_pieces"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Pieces :100"
|
||||||
|
android:layout_below="@id/item_history_packs"
|
||||||
|
android:textSize="20sp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:elevation="10dp"
|
||||||
|
android:layout_margin="3dp">
|
||||||
|
<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="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/code"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:text="IR-357-0000001"
|
||||||
|
android:layout_weight="1">
|
||||||
|
</TextView>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/created_by"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:text="test.test"
|
||||||
|
android:layout_weight="1">
|
||||||
|
</TextView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/remarks"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="22sp"
|
||||||
|
android:textStyle="bold|italic"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:text="Remarks"
|
||||||
|
android:layout_weight="1">
|
||||||
|
</TextView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:text="Date"
|
||||||
|
android:gravity="start"
|
||||||
|
>
|
||||||
|
</TextView>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<TextView
|
||||||
|
android:paddingVertical="5dp"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:id="@+id/status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:text="Passed"
|
||||||
|
android:gravity="end"
|
||||||
|
>
|
||||||
|
</TextView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView 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="wrap_content"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:elevation="16dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="210dp"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/asin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Asin"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.023"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.05" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/fnsku"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Fnsku"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.023"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.286" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/marketplace"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Markeplace"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.027"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.535" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/health"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="health"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.025"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.742" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/item"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Item Name"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.026"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/voc_item_imageview"
|
||||||
|
android:layout_width="109dp"
|
||||||
|
android:layout_height="115dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.987"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.115"
|
||||||
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:id="@+id/sync_btn"
|
||||||
|
android:title="Refresh"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/logout_btn"
|
||||||
|
android:title="Logout"
|
||||||
|
android:orderInCategory="120"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
</menu>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,98 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/navigation_graph"
|
||||||
|
app:startDestination="@id/firstStepFragment">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- first fragment-->
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/firstStepFragment"
|
||||||
|
android:name="com.example.qualitychecker.ui.fragments.FirstStepFragment"
|
||||||
|
android:label="FirstStepFragment">
|
||||||
|
|
||||||
|
<!--forward navigation animation-->
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_firstStepFragment_to_secondStepFragment"
|
||||||
|
app:destination="@id/secondStepFragment"
|
||||||
|
app:enterAnim="@anim/slide_in_right"
|
||||||
|
app:exitAnim="@anim/slide_out_left"
|
||||||
|
app:popEnterAnim="@anim/slide_in_left"
|
||||||
|
app:popExitAnim="@anim/slide_out_right" />
|
||||||
|
|
||||||
|
<!--back navigation animation-->
|
||||||
|
<!-- <action-->
|
||||||
|
<!-- android:id="@+id/action_dashboardFragment_to_symptonsFragment"-->
|
||||||
|
<!-- app:destination="@id/symptomsFragment"-->
|
||||||
|
<!-- app:enterAnim="@anim/slide_in_left"-->
|
||||||
|
<!-- app:exitAnim="@anim/slide_out_right"-->
|
||||||
|
<!-- app:popEnterAnim="@anim/slide_in_right"-->
|
||||||
|
<!-- app:popExitAnim="@anim/slide_out_left" />-->
|
||||||
|
</fragment>
|
||||||
|
|
||||||
|
<!-- second fragment-->
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/secondStepFragment"
|
||||||
|
android:name="com.example.qualitychecker.ui.fragments.SecondStepFragment"
|
||||||
|
android:label="SecondStepFragment">
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_secondStepFragment_to_thirdStepFragment"
|
||||||
|
app:destination="@id/thirdStepFragment"
|
||||||
|
app:enterAnim="@anim/slide_in_right"
|
||||||
|
app:exitAnim="@anim/slide_out_left"
|
||||||
|
app:popEnterAnim="@anim/slide_in_left"
|
||||||
|
app:popExitAnim="@anim/slide_out_right"
|
||||||
|
app:popUpTo="@+id/navigation_graph"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_secondStepFragment_to_firstStepFragment"
|
||||||
|
app:destination="@id/firstStepFragment"
|
||||||
|
app:enterAnim="@anim/slide_in_left"
|
||||||
|
app:exitAnim="@anim/slide_out_right"
|
||||||
|
app:popEnterAnim="@anim/slide_in_right"
|
||||||
|
app:popExitAnim="@anim/slide_out_left"
|
||||||
|
app:popUpTo="@+id/navigation_graph"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
</fragment>
|
||||||
|
|
||||||
|
<!-- third fragment-->
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/thirdStepFragment"
|
||||||
|
android:name="com.example.qualitychecker.ui.fragments.ThirdStepFragment"
|
||||||
|
android:label="ThirsStepFragment">
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_thirdStepFragment_to_secondStepFragment"
|
||||||
|
app:destination="@id/secondStepFragment"
|
||||||
|
app:enterAnim="@anim/slide_in_left"
|
||||||
|
app:exitAnim="@anim/slide_out_right"
|
||||||
|
app:popEnterAnim="@anim/slide_in_right"
|
||||||
|
app:popExitAnim="@anim/slide_out_left"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_thirdStepFragment_to_forthStepFragment"
|
||||||
|
app:destination="@id/forthStepFragment"
|
||||||
|
app:enterAnim="@anim/slide_in_right"
|
||||||
|
app:exitAnim="@anim/slide_out_left"
|
||||||
|
app:popEnterAnim="@anim/slide_in_left"
|
||||||
|
app:popExitAnim="@anim/slide_out_right"
|
||||||
|
app:popUpTo="@+id/navigation_graph"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
</fragment>
|
||||||
|
|
||||||
|
<!-- forth fragment-->
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/forthStepFragment"
|
||||||
|
android:name="com.example.qualitychecker.ui.fragments.ForthStepFragment"
|
||||||
|
android:label="ForthFragment">
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_forthStepFragment_to_thirdStepFragment"
|
||||||
|
app:destination="@id/thirdStepFragment"
|
||||||
|
app:enterAnim="@anim/slide_in_left"
|
||||||
|
app:exitAnim="@anim/slide_out_right"
|
||||||
|
app:popEnterAnim="@anim/slide_in_right"
|
||||||
|
app:popExitAnim="@anim/slide_out_left"
|
||||||
|
app:popUpTo="@+id/navigation_graph"
|
||||||
|
app:popUpToInclusive="true" />
|
||||||
|
</fragment>
|
||||||
|
|
||||||
|
</navigation>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Base.Theme.QualityChecker" parent="Theme.Material3.DayNight.NoActionBar">
|
||||||
|
<!-- Customize your dark theme here. -->
|
||||||
|
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
<color name="dark_grey">#424242</color>
|
||||||
|
<color name="colorPrimary">#3F51B5</color>
|
||||||
|
<color name="colorPrimaryDark">#303F9F</color>
|
||||||
|
<color name="colorAccent">#EC0BAC</color>
|
||||||
|
<color name="success">#20830E</color>
|
||||||
|
<color name="red">#FF0000</color>
|
||||||
|
<color name="light_blue">#29DAF1</color>
|
||||||
|
</resources>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<resources>
|
||||||
|
<string name="app_name">QualityChecker</string>
|
||||||
|
<string name="fab_content_description">Add Report</string>
|
||||||
|
<string name="home_title">FINAL AUDIT - QA PROCESS </string>
|
||||||
|
<string name="btn_title">LOGIN</string>
|
||||||
|
<string name="screen_title">FINAL AUDIT PROCESS</string>
|
||||||
|
<string name="guide_line_text">Below you can provide the basic details to initiate the final audit</string>
|
||||||
|
<string name="checkpoint_guide_lines">Below you can provide the packaging details</string>
|
||||||
|
<string name="spinner_title">Report Status</string>
|
||||||
|
</resources>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.QualityChecker" parent="Base.Theme.QualityChecker" />
|
||||||
|
|
||||||
|
<style name="ToolbarPopupTheme" parent="ThemeOverlay.AppCompat.Light">
|
||||||
|
<!-- Customize popup menu background color -->
|
||||||
|
<item name="android:popupBackground">@color/white</item>
|
||||||
|
<!-- Customize popup menu text color -->
|
||||||
|
<item name="android:textColor">@android:color/black</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style name="Widget.App.FloatingActionButton.Rectangular" parent="Widget.MaterialComponents.Button">
|
||||||
|
<item name="shapeAppearance">@style/ShapeAppearance.App.FloatingActionButton.Rectangular</item>
|
||||||
|
<item name="android:minWidth">0dp</item>
|
||||||
|
<item name="android:minHeight">0dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="ShapeAppearance.App.FloatingActionButton.Rectangular" parent="">
|
||||||
|
<item name="cornerSize">0dp</item> <!-- Adjust the corner size as needed -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
</resources>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Sample backup rules file; uncomment and customize as necessary.
|
||||||
|
See https://developer.android.com/guide/topics/data/autobackup
|
||||||
|
for details.
|
||||||
|
Note: This file is ignored for devices older that API 31
|
||||||
|
See https://developer.android.com/about/versions/12/backup-restore
|
||||||
|
-->
|
||||||
|
<full-backup-content>
|
||||||
|
<!--
|
||||||
|
<include domain="sharedpref" path="."/>
|
||||||
|
<exclude domain="sharedpref" path="device.xml"/>
|
||||||
|
-->
|
||||||
|
</full-backup-content>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Sample data extraction rules file; uncomment and customize as necessary.
|
||||||
|
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||||
|
for details.
|
||||||
|
-->
|
||||||
|
<data-extraction-rules>
|
||||||
|
<cloud-backup>
|
||||||
|
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||||
|
<include .../>
|
||||||
|
<exclude .../>
|
||||||
|
-->
|
||||||
|
</cloud-backup>
|
||||||
|
<!--
|
||||||
|
<device-transfer>
|
||||||
|
<include .../>
|
||||||
|
<exclude .../>
|
||||||
|
</device-transfer>
|
||||||
|
-->
|
||||||
|
</data-extraction-rules>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
<base-config cleartextTrafficPermitted="true">
|
||||||
|
<trust-anchors>
|
||||||
|
<!-- Trust preinstalled CAs -->
|
||||||
|
<certificates src="system" />
|
||||||
|
</trust-anchors>
|
||||||
|
</base-config>
|
||||||
|
</network-security-config>
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.example.qualitychecker;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
public class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
public void addition_isCorrect() {
|
||||||
|
assertEquals(4, 2 + 2);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
plugins {
|
||||||
|
alias(libs.plugins.androidApplication) apply false
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Project-wide Gradle settings.
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. For more details, visit
|
||||||
|
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app's APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
# Enables namespacing of each library's R class so that its R class includes only the
|
||||||
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
|
# thereby reducing the size of the R class for that library
|
||||||
|
android.nonTransitiveRClass=true
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue