Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2078d91dd | ||
|
|
b9a669e5e5 |
3
.gitignore
vendored
@@ -10,9 +10,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
/build
|
/build
|
||||||
/captures
|
/captures
|
||||||
/app/google-services.json
|
|
||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
local.properties
|
local.properties
|
||||||
/.idea/misc.xml
|
|
||||||
/.idea/vcs.xml
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
# This file is a template, and might need editing before it works on your project.
|
|
||||||
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
||||||
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
||||||
# This specific template is located at:
|
|
||||||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Android.gitlab-ci.yml
|
|
||||||
|
|
||||||
# Read more about this script on this blog post https://about.gitlab.com/2018/10/24/setting-up-gitlab-ci-for-android-projects/, by Jason Lenny
|
|
||||||
# If you are interested in using Android with FastLane for publishing take a look at the Android-Fastlane template.
|
|
||||||
|
|
||||||
image: eclipse-temurin:17-jdk-jammy
|
|
||||||
|
|
||||||
variables:
|
|
||||||
|
|
||||||
# ANDROID_COMPILE_SDK is the version of Android you're compiling with.
|
|
||||||
# It should match compileSdkVersion.
|
|
||||||
ANDROID_COMPILE_SDK: "34"
|
|
||||||
|
|
||||||
# ANDROID_BUILD_TOOLS is the version of the Android build tools you are using.
|
|
||||||
# It should match buildToolsVersion.
|
|
||||||
ANDROID_BUILD_TOOLS: "33.0.2"
|
|
||||||
|
|
||||||
# It's what version of the command line tools we're going to download from the official site.
|
|
||||||
# Official Site-> https://developer.android.com/studio/index.html
|
|
||||||
# There, look down below at the cli tools only, sdk tools package is of format:
|
|
||||||
# commandlinetools-os_type-ANDROID_SDK_TOOLS_latest.zip
|
|
||||||
# when the script was last modified for latest compileSdkVersion, it was which is written down below
|
|
||||||
ANDROID_SDK_TOOLS: "9477386"
|
|
||||||
|
|
||||||
# Packages installation before running script
|
|
||||||
before_script:
|
|
||||||
- apt-get --quiet update --yes
|
|
||||||
- apt-get --quiet install --yes wget unzip
|
|
||||||
|
|
||||||
# Setup path as android_home for moving/exporting the downloaded sdk into it
|
|
||||||
- export ANDROID_HOME="${PWD}/android-sdk-root"
|
|
||||||
# Create a new directory at specified location
|
|
||||||
- install -d $ANDROID_HOME
|
|
||||||
# Here we are installing androidSDK tools from official source,
|
|
||||||
# (the key thing here is the url from where you are downloading these sdk tool for command line, so please do note this url pattern there and here as well)
|
|
||||||
# after that unzipping those tools and
|
|
||||||
# then running a series of SDK manager commands to install necessary android SDK packages that'll allow the app to build
|
|
||||||
- wget --no-verbose --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip
|
|
||||||
- unzip -q -d "$ANDROID_HOME/cmdline-tools" "$ANDROID_HOME/cmdline-tools.zip"
|
|
||||||
- mv -T "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/tools"
|
|
||||||
- export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/cmdline-tools/tools/bin
|
|
||||||
|
|
||||||
# Nothing fancy here, just checking sdkManager version
|
|
||||||
- sdkmanager --version
|
|
||||||
|
|
||||||
# use yes to accept all licenses
|
|
||||||
- yes | sdkmanager --licenses > /dev/null || true
|
|
||||||
- sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}"
|
|
||||||
- sdkmanager "platform-tools"
|
|
||||||
- sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}"
|
|
||||||
|
|
||||||
# Not necessary, but just for surity
|
|
||||||
- chmod +x ./gradlew
|
|
||||||
|
|
||||||
# Basic android and gradle stuff
|
|
||||||
# Check linting
|
|
||||||
lintDebug:
|
|
||||||
interruptible: true
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- app/lint/reports/lint-results-debug.html
|
|
||||||
expose_as: "lint-report"
|
|
||||||
when: always
|
|
||||||
|
|
||||||
# Make Project
|
|
||||||
assembleDebug:
|
|
||||||
interruptible: true
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- ./gradlew assembleDebug
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- app/build/outputs/
|
|
||||||
|
|
||||||
# Run all tests, if any fails, interrupt the pipeline(fail it)
|
|
||||||
debugTests:
|
|
||||||
needs: [lintDebug, assembleDebug]
|
|
||||||
interruptible: true
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- ./gradlew -Pci --console=plain :app:testDebug
|
|
||||||
5
.idea/gradle.xml
generated
@@ -4,16 +4,17 @@
|
|||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="GRADLE" />
|
||||||
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleHome" value="$USER_HOME$/andriod studio gradle/gradle-7.3" />
|
<option name="gradleHome" value="$USER_HOME$/andriod studio gradle/gradle-7.3" />
|
||||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
<option name="gradleJvm" value="Embedded JDK" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveExternalAnnotations" value="false" />
|
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
2
.idea/kotlinc.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.8.22" />
|
<option name="version" value="1.8.21" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
3
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
1496
Login_Feature.patch
3
app/.gitignore
vendored
@@ -1,2 +1 @@
|
|||||||
/build
|
/build
|
||||||
/google-services*
|
|
||||||
@@ -5,19 +5,18 @@ plugins {
|
|||||||
id 'com.google.gms.google-services'
|
id 'com.google.gms.google-services'
|
||||||
id 'androidx.navigation.safeargs.kotlin'
|
id 'androidx.navigation.safeargs.kotlin'
|
||||||
id 'kotlin-kapt'
|
id 'kotlin-kapt'
|
||||||
id 'com.google.firebase.crashlytics'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'in.sminnovations.hposregistration'
|
namespace 'in.sminnovations.hposregistration'
|
||||||
compileSdk 34
|
compileSdk 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "in.sminnovations.hposregistration.iocl"
|
applicationId "in.sminnovations.hposregistration"
|
||||||
minSdk 26
|
minSdk 26
|
||||||
targetSdk 34
|
targetSdk 33
|
||||||
versionCode 8
|
versionCode 1
|
||||||
versionName "1.0.8"
|
versionName "1.0"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -50,21 +49,17 @@ dependencies {
|
|||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||||
|
|
||||||
// firebase
|
//firebase
|
||||||
implementation("com.google.firebase:firebase-crashlytics-ktx")
|
implementation platform('com.google.firebase:firebase-bom:32.1.0')
|
||||||
implementation platform("com.google.firebase:firebase-bom:32.2.2")
|
|
||||||
implementation("com.google.firebase:firebase-analytics-ktx")
|
|
||||||
implementation 'com.google.firebase:firebase-firestore-ktx'
|
implementation 'com.google.firebase:firebase-firestore-ktx'
|
||||||
implementation 'com.google.firebase:firebase-auth-ktx'
|
implementation 'com.google.firebase:firebase-auth-ktx'
|
||||||
implementation 'com.google.firebase:firebase-storage-ktx'
|
implementation 'com.google.firebase:firebase-storage-ktx'
|
||||||
implementation 'com.firebaseui:firebase-ui-firestore:8.0.2'
|
implementation 'com.firebaseui:firebase-ui-firestore:8.0.2'
|
||||||
implementation 'com.google.android.gms:play-services-auth:20.6.0'
|
implementation 'com.google.android.gms:play-services-auth:20.5.0'
|
||||||
implementation 'com.google.firebase:firebase-appdistribution:16.0.0-beta10'
|
|
||||||
implementation("com.google.firebase:firebase-appdistribution-api-ktx:16.0.0-beta10")
|
|
||||||
|
|
||||||
// Coroutines
|
// Coroutines
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
|
||||||
|
|
||||||
// Coroutine Lifecycle Scopes
|
// Coroutine Lifecycle Scopes
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
|
||||||
@@ -76,8 +71,8 @@ dependencies {
|
|||||||
kapt "androidx.hilt:hilt-compiler:1.0.0"
|
kapt "androidx.hilt:hilt-compiler:1.0.0"
|
||||||
|
|
||||||
// Navigation Component
|
// Navigation Component
|
||||||
implementation "androidx.navigation:navigation-fragment-ktx:2.7.0"
|
implementation "androidx.navigation:navigation-fragment-ktx:2.7.0-beta01"
|
||||||
implementation "androidx.navigation:navigation-ui-ktx:2.7.0"
|
implementation "androidx.navigation:navigation-ui-ktx:2.7.0-beta01"
|
||||||
|
|
||||||
// Retrofit + GSON
|
// Retrofit + GSON
|
||||||
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
||||||
@@ -91,15 +86,16 @@ dependencies {
|
|||||||
|
|
||||||
//image
|
//image
|
||||||
implementation 'com.github.bumptech.glide:glide:4.13.2'
|
implementation 'com.github.bumptech.glide:glide:4.13.2'
|
||||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
||||||
|
|
||||||
//Room
|
//Room
|
||||||
implementation "androidx.room:room-ktx:2.6.0-alpha03"
|
implementation "androidx.room:room-ktx:2.6.0-alpha01"
|
||||||
implementation "androidx.room:room-runtime:2.6.0-alpha03"
|
implementation "androidx.room:room-runtime:2.6.0-alpha01"
|
||||||
kapt ("androidx.room:room-compiler:2.6.0-alpha03")
|
kapt ("androidx.room:room-compiler:2.6.0-alpha01")
|
||||||
|
|
||||||
// Barcode scanner
|
// Barcode scanner
|
||||||
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
||||||
|
|
||||||
|
// cropping
|
||||||
|
implementation 'com.github.yalantis:ucrop:2.2.6'
|
||||||
}
|
}
|
||||||
@@ -1,64 +1,81 @@
|
|||||||
{
|
{
|
||||||
"project_info": {
|
"project_info": {
|
||||||
"project_number": "243503501547",
|
"project_number": "650071678820",
|
||||||
"project_id": "iocl-iisc-hpos",
|
"project_id": "hpos-af3cc",
|
||||||
"storage_bucket": "iocl-iisc-hpos.appspot.com"
|
"storage_bucket": "hpos-af3cc.appspot.com"
|
||||||
},
|
},
|
||||||
"client": [
|
"client": [
|
||||||
{
|
{
|
||||||
"client_info": {
|
"client_info": {
|
||||||
"mobilesdk_app_id": "1:243503501547:android:f17de652a3524d047feeae",
|
"mobilesdk_app_id": "1:650071678820:android:7569c1cad4fc99916c6471",
|
||||||
"android_client_info": {
|
"android_client_info": {
|
||||||
"package_name": "com.iocl_iisc.hposqc"
|
"package_name": "in.sminnovations.hposregistration"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth_client": [],
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "650071678820-70kp5jvjda4r5diqch2kn4lc40p4f42g.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "in.sminnovations.hposregistration",
|
||||||
|
"certificate_hash": "7714b9268a81d0cf0fb178b0af8dbb630f8fc70a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
"api_key": [
|
"api_key": [
|
||||||
{
|
{
|
||||||
"current_key": "AIzaSyBPxgcDkZfZMr8cFrkMWkVf1a-MstzWC1k"
|
"current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"services": {
|
"services": {
|
||||||
"appinvite_service": {
|
"appinvite_service": {
|
||||||
"other_platform_oauth_client": []
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"client_info": {
|
"client_info": {
|
||||||
"mobilesdk_app_id": "1:243503501547:android:e1bb0f338c8448dd7feeae",
|
"mobilesdk_app_id": "1:650071678820:android:f96be19e5d43102b6c6471",
|
||||||
"android_client_info": {
|
"android_client_info": {
|
||||||
"package_name": "in.sminnovations.hposregistration.iocl"
|
"package_name": "in.sminnovations.hpostesting"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth_client": [],
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "650071678820-l87dnr0bdj95get0khgnvfv2an1k6ogq.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "in.sminnovations.hpostesting",
|
||||||
|
"certificate_hash": "7714b9268a81d0cf0fb178b0af8dbb630f8fc70a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
"api_key": [
|
"api_key": [
|
||||||
{
|
{
|
||||||
"current_key": "AIzaSyBPxgcDkZfZMr8cFrkMWkVf1a-MstzWC1k"
|
"current_key": "AIzaSyAVdNGCev_AFX0qmuZJF6kxzRzXUTeAW5I"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"services": {
|
"services": {
|
||||||
"appinvite_service": {
|
"appinvite_service": {
|
||||||
"other_platform_oauth_client": []
|
"other_platform_oauth_client": [
|
||||||
}
|
{
|
||||||
}
|
"client_id": "650071678820-to41afi9f0gi5r3k6v7pe1e5p96nupcs.apps.googleusercontent.com",
|
||||||
},
|
"client_type": 3
|
||||||
{
|
}
|
||||||
"client_info": {
|
]
|
||||||
"mobilesdk_app_id": "1:243503501547:android:18b8b33b2dc3776d7feeae",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "in.sminnovations.hpostesting.iocl"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyBPxgcDkZfZMr8cFrkMWkVf1a-MstzWC1k"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
app/proguard-rules.pro
vendored
@@ -18,4 +18,9 @@
|
|||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
|
# ucrop
|
||||||
|
-dontwarn com.yalantis.ucrop**
|
||||||
|
-keep class com.yalantis.ucrop** { *; }
|
||||||
|
-keep interface com.yalantis.ucrop** { *; }
|
||||||
@@ -16,16 +16,16 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
android:icon="@mipmap/hpos_icon"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/hpos_icon_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.HPOSRegistration"
|
android:theme="@style/Theme.HPOSRegistration"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="in.sminnovations.hposregistration.provider"
|
android:authorities="com.example.hposregistration.provider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
</provider>
|
</provider>
|
||||||
<activity
|
<activity
|
||||||
android:name="com.example.hposregistration.ui.activities.MainActivity"
|
android:name="com.example.hposregistration.ui.activities.MainActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
@@ -41,11 +42,11 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.journeyapps.barcodescanner.CaptureActivity"
|
android:name="com.yalantis.ucrop.UCropActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:stateNotNeeded="true"
|
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||||
tools:replace="android:screenOrientation" />
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -41,10 +41,9 @@ class UserListOfflineAdapter(private val view: View) : RecyclerView.Adapter<User
|
|||||||
override fun onBindViewHolder(holder: CompanyViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: CompanyViewHolder, position: Int) {
|
||||||
val userList = differ.currentList[position]
|
val userList = differ.currentList[position]
|
||||||
holder.binding.apply {
|
holder.binding.apply {
|
||||||
userName.text = "Name: ${userList.name}"
|
userName.text = userList.name
|
||||||
userId.text = "Sample ID: ${userList._id}"
|
userId.text = userList._id
|
||||||
timeCreated.text = "Time Created: ${userList.createdAt}"
|
Glide.with(view).load(userList.userImage).into(userImage)
|
||||||
Glide.with(view).load(userList.userImageURL).into(userImage)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,9 @@ class UserListOnlineAdapter(options: FirestoreRecyclerOptions<UserData>, private
|
|||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onBindViewHolder(holder: OrderItemViewHolder, position: Int, model: UserData) {
|
override fun onBindViewHolder(holder: OrderItemViewHolder, position: Int, model: UserData) {
|
||||||
holder.binding.apply {
|
holder.binding.apply {
|
||||||
userName.text = "Name: ${model.name}"
|
userName.text = model.name
|
||||||
userId.text = "Sample ID: ${model._id}"
|
userId.text = model._id
|
||||||
timeCreated.text = "Time Created: ${model.createdAt}"
|
Glide.with(view).load(model.userImage).into(userImage)
|
||||||
Glide.with(view).load(model.userImageURL).into(userImage)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.example.hposregistration.dao
|
||||||
|
|
||||||
|
import androidx.room.TypeConverter
|
||||||
|
import com.example.hposregistration.data.user.UserData
|
||||||
|
import com.google.gson.Gson
|
||||||
|
|
||||||
|
class Converters {
|
||||||
|
private val gson = Gson()
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromString(value: String?): UserData.Location? {
|
||||||
|
return if (value != null) {
|
||||||
|
gson.fromJson(value, UserData.Location::class.java)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun toString(location: UserData.Location?): String? {
|
||||||
|
return if (location != null) {
|
||||||
|
gson.toJson(location)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import androidx.room.TypeConverters
|
|||||||
import com.example.hposregistration.data.user.UserData
|
import com.example.hposregistration.data.user.UserData
|
||||||
|
|
||||||
@Database(entities = [UserData::class], version = 1, exportSchema = false)
|
@Database(entities = [UserData::class], version = 1, exportSchema = false)
|
||||||
|
@TypeConverters(Converters::class)
|
||||||
abstract class MyDatabase : RoomDatabase() {
|
abstract class MyDatabase : RoomDatabase() {
|
||||||
abstract fun userDao(): UserDao
|
abstract fun userDao(): UserDao
|
||||||
}
|
}
|
||||||
@@ -10,37 +10,12 @@ object Constant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun String.mapToGender(): UserData.Gender {
|
fun String.mapToGender(): UserData.Gender {
|
||||||
return if (this.lowercase() == "m" || this.lowercase() == "male") {
|
return if (this.lowercase() == "m"|| this.lowercase() == "male") {
|
||||||
UserData.Gender.MALE
|
UserData.Gender.MALE
|
||||||
} else if (this.lowercase() == "f" || this.lowercase() == "female") {
|
} else if (this.lowercase() == "f"|| this.lowercase() == "female") {
|
||||||
UserData.Gender.FEMALE
|
UserData.Gender.FEMALE
|
||||||
} else {
|
} else {
|
||||||
UserData.Gender.OTHER
|
UserData.Gender.OTHER
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const val USER_ID = "usernameId"
|
|
||||||
|
|
||||||
val STATICID = listOf(
|
|
||||||
"SMIMYSURU",
|
|
||||||
"SMIKODAGU",
|
|
||||||
"SMICHAMARAJA",
|
|
||||||
"SMIREG1",
|
|
||||||
"SMIREG2",
|
|
||||||
"SMIREG3",
|
|
||||||
"SMIREG4",
|
|
||||||
"SMIREG5",
|
|
||||||
"SMIREG6",
|
|
||||||
"SMIREG7",
|
|
||||||
"SMIREG8",
|
|
||||||
"SMIREG9",
|
|
||||||
"SMIREG10",
|
|
||||||
"SMIREG11",
|
|
||||||
"SMIREG12",
|
|
||||||
"SMIREG13",
|
|
||||||
"SMIREG14",
|
|
||||||
"SMIREG15"
|
|
||||||
)
|
|
||||||
|
|
||||||
const val password = "SMI@12345"
|
|
||||||
}
|
}
|
||||||
@@ -7,20 +7,16 @@ import androidx.room.PrimaryKey
|
|||||||
data class UserData(
|
data class UserData(
|
||||||
@PrimaryKey
|
@PrimaryKey
|
||||||
var _id: String = "",
|
var _id: String = "",
|
||||||
var _idSearch: String = "",
|
var AbhaId: String = "",
|
||||||
var abhaId: String = "",
|
var AadharId: String = "",
|
||||||
var abhaIdSearch: String = "",
|
|
||||||
var aadharId: String = "",
|
|
||||||
var aadharIdSearch: String = "",
|
|
||||||
var name: String = "",
|
var name: String = "",
|
||||||
var birthYear: String = "",
|
var birthYear: String = "",
|
||||||
var gender: String = "",
|
var gender: String = "",
|
||||||
var phoneNumber: String = "",
|
var phoneNumber: String = "",
|
||||||
var careOf: String = "",
|
var careOf: String = "",
|
||||||
var maritalStatus: String = "",
|
var maritalStatus: String = "",
|
||||||
var category: String = "",
|
|
||||||
var caste: String = "",
|
var caste: String = "",
|
||||||
var subCaste: String? = "",
|
var subCaste: String = "",
|
||||||
var house: String = "",
|
var house: String = "",
|
||||||
var city: String = "",
|
var city: String = "",
|
||||||
var district: String = "",
|
var district: String = "",
|
||||||
@@ -30,15 +26,25 @@ data class UserData(
|
|||||||
var isUnderMedication: Boolean? = false,
|
var isUnderMedication: Boolean? = false,
|
||||||
var isUnderTransfusion: Boolean? = false,
|
var isUnderTransfusion: Boolean? = false,
|
||||||
var sickleCellHistory: String? = "",
|
var sickleCellHistory: String? = "",
|
||||||
var userImageURL: String = "",
|
var userImage: String = "",
|
||||||
var registeredBy: String? = "",
|
var location: Location? = null,
|
||||||
var createdAt: String? = "",
|
var uploadTime: String? = "",
|
||||||
var registrationCenterName: String? = "",
|
var testStatus: Boolean? = false,
|
||||||
var testStatus: Boolean = false
|
var mobileId: String = "",
|
||||||
|
var deviceId: String = "",
|
||||||
|
var kitSerial: String = "",
|
||||||
|
var csvPath: String = "",
|
||||||
|
var reportPath: String = "",
|
||||||
|
var CenterName: String = ""
|
||||||
){
|
){
|
||||||
enum class Gender {
|
enum class Gender {
|
||||||
MALE,
|
MALE,
|
||||||
FEMALE,
|
FEMALE,
|
||||||
OTHER
|
OTHER
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
data class Location(
|
||||||
|
var latitude: Double? = null,
|
||||||
|
var longitude: Double? = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ package com.example.hposregistration.ui.activities
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.Toast
|
|
||||||
import com.google.firebase.appdistribution.FirebaseAppDistribution
|
|
||||||
import com.google.firebase.appdistribution.FirebaseAppDistributionException
|
|
||||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hposregistration.databinding.ActivityMainBinding
|
import `in`.sminnovations.hposregistration.databinding.ActivityMainBinding
|
||||||
|
|
||||||
@@ -18,46 +14,5 @@ class MainActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
|
|
||||||
// val firebaseAppDistribution = FirebaseAppDistribution.getInstance()
|
|
||||||
// firebaseAppDistribution.updateIfNewReleaseAvailable()
|
|
||||||
// .addOnProgressListener { updateProgress ->
|
|
||||||
//
|
|
||||||
// if (updateProgress.apkBytesDownloaded > 0) {
|
|
||||||
// Toast.makeText(
|
|
||||||
// this,
|
|
||||||
// "${updateProgress.updateStatus}. ${updateProgress.apkBytesDownloaded / 1048576} /${updateProgress.apkFileTotalBytes / 1048576} MB",
|
|
||||||
// Toast.LENGTH_SHORT
|
|
||||||
// ).show()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// .addOnFailureListener { e ->
|
|
||||||
// // (Optional) Handle errors.
|
|
||||||
// if (e is FirebaseAppDistributionException) {
|
|
||||||
// when (e.errorCode) {
|
|
||||||
// FirebaseAppDistributionException.Status.NOT_IMPLEMENTED -> {
|
|
||||||
// // SDK did nothing. This is expected when building for Play.
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// else -> {
|
|
||||||
// // Handle other errors.
|
|
||||||
// Toast.makeText(
|
|
||||||
// this,
|
|
||||||
// "AppDistribution error, status: ${e.errorCode}",
|
|
||||||
// Toast.LENGTH_SHORT
|
|
||||||
// ).show()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// FirebaseCrashlytics.getInstance().recordException(e)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// .addOnSuccessListener {
|
|
||||||
//// Toast.makeText(this, "App Update: Success!", Toast.LENGTH_SHORT).show()
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
package com.example.hposregistration.ui.fragments
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.widget.Toast
|
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import com.example.hposregistration.data.Constant
|
|
||||||
import `in`.sminnovations.hposregistration.R
|
|
||||||
import `in`.sminnovations.hposregistration.databinding.FragmentLoginBinding
|
|
||||||
|
|
||||||
class LoginFragment : Fragment() {
|
|
||||||
|
|
||||||
private var _binding: FragmentLoginBinding? = null
|
|
||||||
private val binding get() = _binding!!
|
|
||||||
private lateinit var sharedPreference: SharedPreferences
|
|
||||||
|
|
||||||
override fun onCreateView(
|
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
|
||||||
savedInstanceState: Bundle?
|
|
||||||
): View {
|
|
||||||
_binding = FragmentLoginBinding.inflate(inflater, container, false)
|
|
||||||
sharedPreference = requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
|
|
||||||
return binding.root
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
||||||
super.onViewCreated(view, savedInstanceState)
|
|
||||||
init()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun init() {
|
|
||||||
if (isUserLoggedIn()) {
|
|
||||||
navigateToUserListFragment()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.btnLogin.setOnClickListener {
|
|
||||||
val loginId = binding.loginId.text.toString()
|
|
||||||
val password = binding.password.text.toString()
|
|
||||||
|
|
||||||
if (loginId.isNotBlank() && password.isNotBlank()) {
|
|
||||||
performLogin(loginId, password)
|
|
||||||
} else {
|
|
||||||
if (loginId.isBlank()) {
|
|
||||||
binding.loginId.error = "Please enter a proper Login ID"
|
|
||||||
}
|
|
||||||
if (password.isBlank()) {
|
|
||||||
binding.password.error = "Please enter a proper password"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun isUserLoggedIn(): Boolean {
|
|
||||||
return sharedPreference.getString(Constant.USER_ID, "")?.isNotBlank() == true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun navigateToUserListFragment() {
|
|
||||||
findNavController().navigate(R.id.action_loginFragment_to_userListFragment)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun performLogin(loginId: String, password: String) {
|
|
||||||
val matchingId = Constant.STATICID.firstOrNull { it == loginId }
|
|
||||||
if (matchingId != null) {
|
|
||||||
if (password == Constant.password) {
|
|
||||||
saveUserId(loginId)
|
|
||||||
navigateToUserListFragment()
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
Toast.makeText(requireContext(), "Wrong Password", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Toast.makeText(requireContext(), "Wrong UserID", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun saveUserId(userId: String) {
|
|
||||||
with(sharedPreference.edit()) {
|
|
||||||
putString(Constant.USER_ID, userId)
|
|
||||||
apply()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroyView() {
|
|
||||||
super.onDestroyView()
|
|
||||||
_binding = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,57 +3,38 @@ package com.example.hposregistration.ui.fragments
|
|||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.SearchView
|
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import com.example.hposregistration.adapters.UserListOfflineAdapter
|
import com.example.hposregistration.adapters.UserListOfflineAdapter
|
||||||
import com.example.hposregistration.adapters.UserListOnlineAdapter
|
import com.example.hposregistration.adapters.UserListOnlineAdapter
|
||||||
import com.example.hposregistration.data.Constant
|
|
||||||
import com.example.hposregistration.data.user.UserData
|
import com.example.hposregistration.data.user.UserData
|
||||||
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
|
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
|
||||||
import com.firebase.ui.firestore.FirestoreRecyclerOptions
|
import com.firebase.ui.firestore.FirestoreRecyclerOptions
|
||||||
import com.google.firebase.firestore.Query
|
|
||||||
import com.google.firebase.firestore.ktx.firestore
|
import com.google.firebase.firestore.ktx.firestore
|
||||||
import com.google.firebase.ktx.Firebase
|
import com.google.firebase.ktx.Firebase
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hposregistration.R
|
import `in`.sminnovations.hposregistration.R
|
||||||
import `in`.sminnovations.hposregistration.databinding.FragmentUserListBinding
|
import `in`.sminnovations.hposregistration.databinding.FragmentUserListBinding
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Date
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class UserListFragment : BaseFragment() {
|
class UserListFragment : BaseFragment() {
|
||||||
private lateinit var userId:String
|
|
||||||
private var district:String ="Mysuru"
|
|
||||||
private var _binding: FragmentUserListBinding? = null
|
private var _binding: FragmentUserListBinding? = null
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
private lateinit var offlineAdapter:UserListOfflineAdapter
|
|
||||||
private val viewModel by viewModels<RegistrationViewModel>()
|
private val viewModel by viewModels<RegistrationViewModel>()
|
||||||
|
|
||||||
private var isOnline = false
|
private var isOnline = false
|
||||||
|
|
||||||
private lateinit var sharedPreference: SharedPreferences
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||||
): View {
|
): View {
|
||||||
_binding = FragmentUserListBinding.inflate(inflater, container, false)
|
_binding = FragmentUserListBinding.inflate(inflater, container, false)
|
||||||
sharedPreference = requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
|
|
||||||
userId = sharedPreference.getString(Constant.USER_ID, "").toString()
|
|
||||||
if(userId=="SMIMYSURU"){
|
|
||||||
district = "Mysuru"
|
|
||||||
}else if(userId=="SMIKODAGU"){
|
|
||||||
district = "Kodagu"
|
|
||||||
}else if(userId=="SMICHAMARAJA"){
|
|
||||||
district = "Chamarajanagar"
|
|
||||||
}
|
|
||||||
setupViews()
|
setupViews()
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
@@ -69,23 +50,12 @@ class UserListFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupViews() {
|
private fun setupViews() {
|
||||||
val pInfo = requireActivity().packageManager.getPackageInfo(
|
|
||||||
requireActivity().packageName, 0
|
|
||||||
)
|
|
||||||
val version = pInfo.versionName
|
|
||||||
binding.appVersion.text = version
|
|
||||||
binding.btnRegisterUser.setOnClickListener {
|
binding.btnRegisterUser.setOnClickListener {
|
||||||
findNavController().navigate(R.id.action_userListFragment_to_registrationFragment)
|
findNavController().navigate(R.id.action_userListFragment_to_registrationFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnLogout.setOnClickListener {
|
|
||||||
logoutUser(requireContext())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init() {
|
private fun init() {
|
||||||
binding.searchUser.isIconified = false
|
|
||||||
|
|
||||||
viewModel.networkStatusLiveData.observe(viewLifecycleOwner) { isNetworkAvailable ->
|
viewModel.networkStatusLiveData.observe(viewLifecycleOwner) { isNetworkAvailable ->
|
||||||
if (isNetworkAvailable) {
|
if (isNetworkAvailable) {
|
||||||
isOnline = isNetworkAvailable
|
isOnline = isNetworkAvailable
|
||||||
@@ -97,70 +67,11 @@ class UserListFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.searchUser.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
|
|
||||||
override fun onQueryTextSubmit(query: String?): Boolean {
|
|
||||||
// Perform the final search
|
|
||||||
if(isOnline){
|
|
||||||
fetchFromServer(query)
|
|
||||||
}else{
|
|
||||||
filterList(query)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onQueryTextChange(newText: String?): Boolean {
|
|
||||||
// Perform search as the user types
|
|
||||||
if(isOnline){
|
|
||||||
fetchFromServer(newText)
|
|
||||||
}else{
|
|
||||||
filterList(newText)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
binding.uploadData.setOnClickListener {
|
binding.uploadData.setOnClickListener {
|
||||||
showUploadDialog(requireContext())
|
showUploadDialog(requireContext())
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
|
||||||
deteleIncompleteRegistration(userDataList)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private fun filterList(query: String?) {
|
|
||||||
val filteredList = viewModel.allUserData.value?.filter { userData ->
|
|
||||||
userData.name.contains(query ?: "", ignoreCase = true)
|
|
||||||
}
|
|
||||||
offlineAdapter.differ.submitList(filteredList)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun logoutUser(context: Context) {
|
|
||||||
val builder = AlertDialog.Builder(context)
|
|
||||||
builder.setTitle("Log Out")
|
|
||||||
builder.setMessage("Do you want to LogOut the Application?")
|
|
||||||
|
|
||||||
// Positive button
|
|
||||||
builder.setPositiveButton("Yes") { dialog, _ ->
|
|
||||||
saveUserId()
|
|
||||||
findNavController().navigate(R.id.action_userListFragment_to_loginFragment)
|
|
||||||
dialog.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Negative button
|
|
||||||
builder.setNegativeButton("No") { dialog, _ ->
|
|
||||||
dialog.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
val dialog = builder.create()
|
|
||||||
dialog.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun saveUserId() {
|
|
||||||
with(sharedPreference.edit()) {
|
|
||||||
putString(Constant.USER_ID, "")
|
|
||||||
apply()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private fun showUploadDialog(context: Context) {
|
private fun showUploadDialog(context: Context) {
|
||||||
val builder = AlertDialog.Builder(context)
|
val builder = AlertDialog.Builder(context)
|
||||||
builder.setTitle("Upload DB Registration")
|
builder.setTitle("Upload DB Registration")
|
||||||
@@ -205,89 +116,19 @@ class UserListFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// private fun fetchFromServer(searchTerm: String? = null) {
|
|
||||||
// binding.noList.visibility = View.GONE
|
|
||||||
// binding.rvOrder.visibility = View.VISIBLE
|
|
||||||
// val dateFormat = SimpleDateFormat("yyyy-MM-dd")
|
|
||||||
// val currentDate = Date()
|
|
||||||
// val today = dateFormat.format(currentDate)
|
|
||||||
//
|
|
||||||
// // Base query to fetch patient data created today
|
|
||||||
// var query = Firebase.firestore.collection("patientData")
|
|
||||||
// .whereGreaterThanOrEqualTo("createdAt", today)
|
|
||||||
// .orderBy("createdAt", Query.Direction.DESCENDING)
|
|
||||||
//
|
|
||||||
// // If a search term is provided, add it to the query
|
|
||||||
// if (!searchTerm.isNullOrEmpty()) {
|
|
||||||
// query = query.whereEqualTo("aadharId", searchTerm)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// query.get().addOnSuccessListener {
|
|
||||||
// if (it.documents.isEmpty() && isOnline) {
|
|
||||||
// binding.emptyRegistrations.visibility = View.VISIBLE
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// val recyclerViewOptions =
|
|
||||||
// FirestoreRecyclerOptions.Builder<UserData>().setQuery(query, UserData::class.java)
|
|
||||||
// .build()
|
|
||||||
// val adapter = UserListOnlineAdapter(recyclerViewOptions, binding.root)
|
|
||||||
// binding.rvOrder.adapter = adapter
|
|
||||||
// adapter.startListening()
|
|
||||||
// }
|
|
||||||
private fun fetchFromServer(searchTerm: String? = null) {
|
|
||||||
binding.noList.visibility = View.GONE
|
|
||||||
binding.rvOrder.visibility = View.VISIBLE
|
|
||||||
val dateFormat = SimpleDateFormat("yyyy-MM-dd")
|
|
||||||
val currentDate = Date()
|
|
||||||
val today = dateFormat.format(currentDate)
|
|
||||||
|
|
||||||
// Base query to fetch patient data created today and from the specified district
|
private fun fetchFromServer() {
|
||||||
var query = Firebase.firestore.collection("patientData")
|
binding.noList.visibility = View.GONE
|
||||||
// .whereGreaterThanOrEqualTo("createdAt", today)
|
binding.rvOrder.visibility = View.VISIBLE
|
||||||
.whereEqualTo("district", district)
|
val query = Firebase.firestore.collection("patientData")
|
||||||
.orderBy("createdAt", Query.Direction.DESCENDING)
|
val recyclerViewOptions =
|
||||||
|
FirestoreRecyclerOptions.Builder<UserData>().setQuery(query, UserData::class.java)
|
||||||
// If a search term is provided, add it to the query
|
.build()
|
||||||
if (!searchTerm.isNullOrEmpty()) {
|
val adapter = UserListOnlineAdapter(recyclerViewOptions, binding.root)
|
||||||
query = query.whereEqualTo("_id", searchTerm)
|
binding.rvOrder.adapter = adapter
|
||||||
|
adapter.startListening()
|
||||||
}
|
}
|
||||||
|
|
||||||
query.get().addOnSuccessListener {
|
|
||||||
if (it.documents.isEmpty() && isOnline) {
|
|
||||||
binding.emptyRegistrations.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val recyclerViewOptions =
|
|
||||||
FirestoreRecyclerOptions.Builder<UserData>().setQuery(query, UserData::class.java)
|
|
||||||
.build()
|
|
||||||
val adapter = UserListOnlineAdapter(recyclerViewOptions, binding.root)
|
|
||||||
binding.rvOrder.adapter = adapter
|
|
||||||
adapter.startListening()
|
|
||||||
}
|
|
||||||
// private fun fetchFromServer() {
|
|
||||||
// binding.noList.visibility = View.GONE
|
|
||||||
// binding.rvOrder.visibility = View.VISIBLE
|
|
||||||
// val dateFormat = SimpleDateFormat("yyyy-MM-dd")
|
|
||||||
// val currentDate = Date()
|
|
||||||
// val today = dateFormat.format(currentDate)
|
|
||||||
// val query = Firebase.firestore.collection("patientData")
|
|
||||||
// .whereGreaterThanOrEqualTo("createdAt", today)
|
|
||||||
// .orderBy("createdAt", Query.Direction.DESCENDING)
|
|
||||||
// query.get().addOnSuccessListener {
|
|
||||||
// if (it.documents.isEmpty() && isOnline) {
|
|
||||||
// binding.emptyRegistrations.visibility = View.VISIBLE
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// val recyclerViewOptions =
|
|
||||||
// FirestoreRecyclerOptions.Builder<UserData>().setQuery(query, UserData::class.java)
|
|
||||||
// .build()
|
|
||||||
// val adapter = UserListOnlineAdapter(recyclerViewOptions, binding.root)
|
|
||||||
// binding.rvOrder.adapter = adapter
|
|
||||||
// adapter.startListening()
|
|
||||||
// }
|
|
||||||
|
|
||||||
private fun fetchFromLocalDB() {
|
private fun fetchFromLocalDB() {
|
||||||
binding.uploadData.visibility = View.GONE
|
binding.uploadData.visibility = View.GONE
|
||||||
viewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
viewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
||||||
@@ -295,7 +136,6 @@ private fun fetchFromServer(searchTerm: String? = null) {
|
|||||||
binding.noList.visibility = View.GONE
|
binding.noList.visibility = View.GONE
|
||||||
binding.rvOrder.visibility = View.VISIBLE
|
binding.rvOrder.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.emptyRegistrations.visibility = View.GONE
|
|
||||||
if (userDataList.isEmpty()) {
|
if (userDataList.isEmpty()) {
|
||||||
binding.noList.visibility = View.VISIBLE
|
binding.noList.visibility = View.VISIBLE
|
||||||
binding.rvOrder.visibility = View.GONE
|
binding.rvOrder.visibility = View.GONE
|
||||||
@@ -303,9 +143,9 @@ private fun fetchFromServer(searchTerm: String? = null) {
|
|||||||
binding.noList.visibility = View.GONE
|
binding.noList.visibility = View.GONE
|
||||||
binding.rvOrder.visibility = View.VISIBLE
|
binding.rvOrder.visibility = View.VISIBLE
|
||||||
deteleIncompleteRegistration(userDataList)
|
deteleIncompleteRegistration(userDataList)
|
||||||
offlineAdapter = UserListOfflineAdapter(binding.root)
|
val adapter = UserListOfflineAdapter(binding.root)
|
||||||
offlineAdapter.differ.submitList(userDataList)
|
adapter.differ.submitList(userDataList)
|
||||||
binding.rvOrder.adapter = offlineAdapter
|
binding.rvOrder.adapter = adapter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -313,7 +153,7 @@ private fun fetchFromServer(searchTerm: String? = null) {
|
|||||||
|
|
||||||
private fun deteleIncompleteRegistration(userDataList: List<UserData>) {
|
private fun deteleIncompleteRegistration(userDataList: List<UserData>) {
|
||||||
userDataList.forEach {
|
userDataList.forEach {
|
||||||
if (it.userImageURL.isEmpty()) {
|
if (it._id.isEmpty()) {
|
||||||
viewModel.deleteById(it._id)
|
viewModel.deleteById(it._id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.example.hposregistration.ui.fragments.registration
|
package com.example.hposregistration.ui.fragments.registration
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@@ -21,15 +19,11 @@ import com.journeyapps.barcodescanner.ScanIntentResult
|
|||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hposregistration.databinding.FragmentAbhaRegistrationBinding
|
import `in`.sminnovations.hposregistration.databinding.FragmentAbhaRegistrationBinding
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import java.time.Instant
|
|
||||||
import java.util.Random
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class AbhaRegistrationFragment : BaseFragment() {
|
class AbhaRegistrationFragment : BaseFragment() {
|
||||||
|
|
||||||
private var _binding: FragmentAbhaRegistrationBinding? = null
|
private var _binding: FragmentAbhaRegistrationBinding? = null
|
||||||
private lateinit var sharedPreference: SharedPreferences
|
|
||||||
|
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
private val viewModel by viewModels<RegistrationViewModel>()
|
private val viewModel by viewModels<RegistrationViewModel>()
|
||||||
@@ -51,8 +45,6 @@ class AbhaRegistrationFragment : BaseFragment() {
|
|||||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||||
): View {
|
): View {
|
||||||
_binding = FragmentAbhaRegistrationBinding.inflate(inflater, container, false)
|
_binding = FragmentAbhaRegistrationBinding.inflate(inflater, container, false)
|
||||||
sharedPreference =
|
|
||||||
requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
|
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,50 +65,42 @@ class AbhaRegistrationFragment : BaseFragment() {
|
|||||||
viewModel.userData.observe(viewLifecycleOwner) { user ->
|
viewModel.userData.observe(viewLifecycleOwner) { user ->
|
||||||
userData = user
|
userData = user
|
||||||
with(binding) {
|
with(binding) {
|
||||||
aadharID.setText(user.aadharId)
|
aadharID.setText(user.AadharId)
|
||||||
etAbhaId.setText(user.abhaId)
|
etAbhaId.setText(user.AbhaId)
|
||||||
etName.setText(user.name)
|
etName.setText(user.name)
|
||||||
centerName.setText(user.registrationCenterName)
|
centerName.setText(user.CenterName)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnProceed.setOnClickListener {
|
binding.btnProceed.setOnClickListener {
|
||||||
val abhaIdInput = binding.etAbhaId.text.toString()
|
val abhaId = binding.etAbhaId.text.toString()
|
||||||
val userName = binding.etName.text.toString()
|
val userName = binding.etName.text.toString()
|
||||||
val aadharIdInput = binding.aadharID.text.toString()
|
val aadharId = binding.aadharID.text.toString()
|
||||||
val centerName = binding.centerName.text.toString()
|
val centerName = binding.centerName.text.toString()
|
||||||
val currentUnixTime = Instant.now().epochSecond
|
|
||||||
|
|
||||||
if (validateInputs(abhaIdInput, aadharIdInput, userName, centerName)) {
|
if (validateInputs(abhaId, aadharId, userName, centerName)) {
|
||||||
userData.apply {
|
userData.apply {
|
||||||
name = userName.lowercase()
|
name = userName
|
||||||
aadharId = aadharIdInput
|
AadharId = aadharId
|
||||||
abhaId = abhaIdInput
|
AbhaId = abhaId
|
||||||
registrationCenterName = centerName
|
CenterName = centerName
|
||||||
// _id = centerName.substring(0, 3).uppercase() + name.substring(0, 4) +
|
_id = aadharId + userName.substring(0, 3).uppercase() + centerName.substring(0, 3).uppercase()
|
||||||
_id = userName.substring(0, 3).uppercase() + generateFourDigitNumber() +centerName.substring(0, 3).uppercase()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.insert(userData)
|
viewModel.insert(userData)
|
||||||
Toast.makeText(requireActivity(),"ID"+userData._id,Toast.LENGTH_SHORT).show()
|
|
||||||
navigateToUserDetailsFragment(userData._id)
|
navigateToUserDetailsFragment(userData._id)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private fun generateFourDigitNumber(): String {
|
|
||||||
val random = Random()
|
|
||||||
val number: Int = 1000 + random.nextInt(9000) // Ensures a 4-digit number
|
|
||||||
return number.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun processScannedData(contents: String) {
|
private fun processScannedData(contents: String) {
|
||||||
try {
|
try {
|
||||||
val obj = JSONObject(contents)
|
val obj = JSONObject(contents)
|
||||||
|
|
||||||
userData.apply {
|
userData.apply {
|
||||||
abhaId = obj.getString("hidn").replace("-", "")
|
AbhaId = obj.getString("hidn").replace("-", "")
|
||||||
name = obj.getString("name")
|
name = obj.getString("name")
|
||||||
birthYear = obj.getString("dob").fetchYOBFromDOB().toString()
|
birthYear = obj.getString("dob").fetchYOBFromDOB().toString()
|
||||||
gender = obj.getString("gender").mapToGender().toString()
|
gender = obj.getString("gender").mapToGender().toString()
|
||||||
@@ -127,7 +111,7 @@ class AbhaRegistrationFragment : BaseFragment() {
|
|||||||
house = obj.getString("address")
|
house = obj.getString("address")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userData.abhaId.isNotEmpty()) {
|
if (userData.AbhaId.isNotEmpty()) {
|
||||||
saveUserDataAsPerAbhaId()
|
saveUserDataAsPerAbhaId()
|
||||||
} else {
|
} else {
|
||||||
saveUserDataAsPerAadharId()
|
saveUserDataAsPerAadharId()
|
||||||
@@ -160,7 +144,7 @@ class AbhaRegistrationFragment : BaseFragment() {
|
|||||||
with(binding) {
|
with(binding) {
|
||||||
tvScanMessage.visibility = View.VISIBLE
|
tvScanMessage.visibility = View.VISIBLE
|
||||||
tvScanMessage.text = "You have scanned the Abha ID, need to enter Aadhar ID manually"
|
tvScanMessage.text = "You have scanned the Abha ID, need to enter Aadhar ID manually"
|
||||||
etAbhaId.setText(userData.abhaId)
|
etAbhaId.setText(userData.AbhaId)
|
||||||
etName.setText(userData.name)
|
etName.setText(userData.name)
|
||||||
}
|
}
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
@@ -183,14 +167,14 @@ class AbhaRegistrationFragment : BaseFragment() {
|
|||||||
abhaId: String, aadharId: String, userName: String, centerName: String
|
abhaId: String, aadharId: String, userName: String, centerName: String
|
||||||
): Boolean {
|
): Boolean {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
// if (!checkAbhaIDNumber(abhaId)) {
|
if (!checkAbhaIDNumber(abhaId)) {
|
||||||
// etAbhaId.error = "Invalid Abha ID"
|
etAbhaId.error = "Invalid Abha ID"
|
||||||
// return false
|
return false
|
||||||
// }
|
}
|
||||||
// if (!checkAadharIDNumber(aadharId)) {
|
if (!checkAadharIDNumber(aadharId)) {
|
||||||
// aadharID.error = "Invalid Aadhar ID"
|
aadharID.error = "Invalid Aadhar ID"
|
||||||
// return false
|
return false
|
||||||
// }
|
}
|
||||||
if (!checkUserName(userName)) {
|
if (!checkUserName(userName)) {
|
||||||
etName.error = "Name field can't be empty or less than 3 characters"
|
etName.error = "Name field can't be empty or less than 3 characters"
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package com.example.hposregistration.ui.fragments.registration
|
|||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.app.Activity.RESULT_OK
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
@@ -16,12 +16,14 @@ import android.widget.ImageView
|
|||||||
import androidx.activity.result.ActivityResultLauncher
|
import androidx.activity.result.ActivityResultLauncher
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.example.hposregistration.data.user.UserData
|
import com.example.hposregistration.data.user.UserData
|
||||||
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
|
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
|
||||||
|
import com.yalantis.ucrop.UCrop
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hposregistration.databinding.FragmentCaptureUserImageBinding
|
import `in`.sminnovations.hposregistration.databinding.FragmentCaptureUserImageBinding
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -70,8 +72,8 @@ class CaptureUserImageFragment : Fragment() {
|
|||||||
viewModel.getUserByID(args.userId)
|
viewModel.getUserByID(args.userId)
|
||||||
viewModel.userData.observe(viewLifecycleOwner) { user ->
|
viewModel.userData.observe(viewLifecycleOwner) { user ->
|
||||||
userData = user
|
userData = user
|
||||||
if (userData.userImageURL.isNotEmpty()) {
|
if (userData.userImage.isNotEmpty()) {
|
||||||
binding.userImage.loadImageFromUri(Uri.parse(user.userImageURL))
|
binding.userImage.loadImageFromUri(Uri.parse(user.userImage))
|
||||||
binding.btnSubmit.isEnabled = true
|
binding.btnSubmit.isEnabled = true
|
||||||
binding.btnSubmit.setOnClickListener {
|
binding.btnSubmit.setOnClickListener {
|
||||||
navigate()
|
navigate()
|
||||||
@@ -82,7 +84,7 @@ class CaptureUserImageFragment : Fragment() {
|
|||||||
|
|
||||||
private fun setupCameraLauncher() {
|
private fun setupCameraLauncher() {
|
||||||
cameraLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
|
cameraLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
|
||||||
if (result.resultCode == Activity.RESULT_OK && result.data != null) {
|
if (result.resultCode == RESULT_OK && result.data != null) {
|
||||||
val thumbnail: Bitmap = result.data!!.extras!!.get("data") as Bitmap
|
val thumbnail: Bitmap = result.data!!.extras!!.get("data") as Bitmap
|
||||||
val uri: Uri = saveImageToInternalStorage(thumbnail)
|
val uri: Uri = saveImageToInternalStorage(thumbnail)
|
||||||
uri.let {
|
uri.let {
|
||||||
@@ -122,9 +124,42 @@ class CaptureUserImageFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun submitImage(uri: Uri) {
|
private fun submitImage(uri: Uri) {
|
||||||
userData.userImageURL = uri.toString()
|
|
||||||
viewModel.insert(userData)
|
val cropLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
|
||||||
navigate()
|
if (result.resultCode == RESULT_OK && result.data != null) {
|
||||||
|
val resultUri: Uri? = UCrop.getOutput(result.data!!)
|
||||||
|
binding.userImage.loadImageFromUri(Uri.parse(resultUri.toString()))
|
||||||
|
} else if (result.resultCode == UCrop.RESULT_ERROR) {
|
||||||
|
val cropError: Throwable? = UCrop.getError(result.data!!)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// val cropIntent: Intent = // Create your crop intent here
|
||||||
|
// cropLauncher.launch(cropIntent)
|
||||||
|
|
||||||
|
|
||||||
|
// userData.userImage = uri.toString()
|
||||||
|
// viewModel.insert(userData)
|
||||||
|
// navigate()
|
||||||
|
var sourceUri = uri
|
||||||
|
var destinationUri = uri
|
||||||
|
val maxWidth = 160
|
||||||
|
val maxHeight = 90
|
||||||
|
|
||||||
|
// val context = getContext().getA
|
||||||
|
UCrop.of(sourceUri, destinationUri)
|
||||||
|
.withAspectRatio(9F, 16F)
|
||||||
|
.withMaxResultSize(maxWidth, maxHeight)
|
||||||
|
.start(requireActivity())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
if (resultCode == RESULT_OK && requestCode == UCrop.REQUEST_CROP) {
|
||||||
|
val resultUri: Uri? = data?.let { UCrop.getOutput(it) }
|
||||||
|
binding.userImage.loadImageFromUri(Uri.parse(resultUri.toString()))
|
||||||
|
} else if (resultCode == UCrop.RESULT_ERROR) {
|
||||||
|
val cropError: Throwable? = data?.let { UCrop.getError(it) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun navigate() {
|
private fun navigate() {
|
||||||
@@ -177,14 +212,14 @@ class CaptureUserImageFragment : Fragment() {
|
|||||||
requestPermissionLauncher.launch(permissions)
|
requestPermissionLauncher.launch(permissions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun ImageView.loadImageFromUri(uri: Uri) {
|
||||||
|
Glide.with(this)
|
||||||
|
.load(uri)
|
||||||
|
.into(this)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
_binding = null
|
_binding = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun ImageView.loadImageFromUri(uri: Uri) {
|
|
||||||
Glide.with(this)
|
|
||||||
.load(uri)
|
|
||||||
.into(this)
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.example.hposregistration.ui.fragments.registration
|
package com.example.hposregistration.ui.fragments.registration
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
@@ -12,23 +10,18 @@ import androidx.fragment.app.viewModels
|
|||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.example.hposregistration.data.Constant
|
|
||||||
import com.example.hposregistration.data.user.UserData
|
import com.example.hposregistration.data.user.UserData
|
||||||
import com.example.hposregistration.ui.fragments.BaseFragment
|
import com.example.hposregistration.ui.fragments.BaseFragment
|
||||||
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
|
import com.example.hposregistration.ui.viewmodels.RegistrationViewModel
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import `in`.sminnovations.hposregistration.R
|
import `in`.sminnovations.hposregistration.R
|
||||||
import `in`.sminnovations.hposregistration.databinding.FragmentReviewDetailsRegistrationBinding
|
import `in`.sminnovations.hposregistration.databinding.FragmentReviewDetailsRegistrationBinding
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Calendar
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class ReviewDetailsRegistrationFragment : BaseFragment() {
|
class ReviewDetailsRegistrationFragment : BaseFragment() {
|
||||||
|
|
||||||
private var _binding: FragmentReviewDetailsRegistrationBinding? = null
|
private var _binding: FragmentReviewDetailsRegistrationBinding? = null
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
private lateinit var sharedPreference: SharedPreferences
|
|
||||||
|
|
||||||
private val viewModel by viewModels<RegistrationViewModel>()
|
private val viewModel by viewModels<RegistrationViewModel>()
|
||||||
private val args: ReviewDetailsRegistrationFragmentArgs by navArgs()
|
private val args: ReviewDetailsRegistrationFragmentArgs by navArgs()
|
||||||
@@ -39,8 +32,6 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
|
||||||
): View {
|
): View {
|
||||||
_binding = FragmentReviewDetailsRegistrationBinding.inflate(inflater, container, false)
|
_binding = FragmentReviewDetailsRegistrationBinding.inflate(inflater, container, false)
|
||||||
sharedPreference =
|
|
||||||
requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
|
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,34 +75,27 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
|
|
||||||
viewModel.fireBaseUpload.observe(viewLifecycleOwner) {
|
viewModel.fireBaseUpload.observe(viewLifecycleOwner) {
|
||||||
if (it == "Success") {
|
if (it == "Success") {
|
||||||
Toast.makeText(
|
Toast.makeText(requireContext(), "Registration Done Successfully", Toast.LENGTH_SHORT)
|
||||||
requireContext(),
|
.show()
|
||||||
"Registration Done Successfully",
|
|
||||||
Toast.LENGTH_SHORT
|
|
||||||
).show()
|
|
||||||
navigateToUserListFragment()
|
navigateToUserListFragment()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addDataToFirebase() {
|
private fun addDataToFirebase() {
|
||||||
userData.createdAt = SimpleDateFormat(
|
|
||||||
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
|
||||||
).format(Calendar.getInstance().time)
|
|
||||||
userData.registeredBy = sharedPreference.getString(Constant.USER_ID, "")
|
|
||||||
viewModel.addUserToDatabase(userData)
|
viewModel.addUserToDatabase(userData)
|
||||||
viewModel.deleteById(args.userId)
|
viewModel.deleteById(args.userId)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUserData(userData: UserData) {
|
private fun setUserData(userData: UserData) {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
Glide.with(requireActivity()).load(Uri.parse(userData.userImageURL)).into(userImage)
|
Glide.with(requireActivity()).load(Uri.parse(userData.userImage)).into(userImage)
|
||||||
binding.tvUserID.text = requireContext().getString(R.string.user_id, userData._id)
|
binding.tvUserID.text = requireContext().getString(R.string.user_id, userData._id)
|
||||||
binding.tvAbhaId.text =
|
binding.tvAbhaId.text =
|
||||||
requireContext().getString(R.string.abha_number, userData.abhaId)
|
requireContext().getString(R.string.abha_number, userData.AbhaId)
|
||||||
binding.tvAadharId.text =
|
binding.tvAadharId.text =
|
||||||
requireContext().getString(R.string.aadhar_number_details, userData.aadharId)
|
requireContext().getString(R.string.aadhar_number_details, userData.AadharId)
|
||||||
binding.tvUserName.text = requireContext().getString(R.string.user_name, userData.name.lowercase())
|
binding.tvUserName.text = requireContext().getString(R.string.user_name, userData.name)
|
||||||
binding.tvBirthYear.text =
|
binding.tvBirthYear.text =
|
||||||
requireContext().getString(R.string.birth_year_details, userData.birthYear)
|
requireContext().getString(R.string.birth_year_details, userData.birthYear)
|
||||||
binding.tvGender.text =
|
binding.tvGender.text =
|
||||||
@@ -122,14 +106,10 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
requireContext().getString(R.string.care_of_details, userData.careOf)
|
requireContext().getString(R.string.care_of_details, userData.careOf)
|
||||||
binding.tvMaritalStatus.text =
|
binding.tvMaritalStatus.text =
|
||||||
requireContext().getString(R.string.marital_status_details, userData.maritalStatus)
|
requireContext().getString(R.string.marital_status_details, userData.maritalStatus)
|
||||||
binding.tvCategory.text =
|
|
||||||
requireContext().getString(R.string.category_details, userData.category)
|
|
||||||
binding.tvCaste.text =
|
binding.tvCaste.text =
|
||||||
requireContext().getString(R.string.caste_details, userData.caste)
|
requireContext().getString(R.string.caste_details, userData.caste)
|
||||||
if (userData.subCaste != "") {
|
binding.tvSubCaste.text =
|
||||||
binding.tvSubCaste.text =
|
requireContext().getString(R.string.sub_caste_details, userData.subCaste)
|
||||||
requireContext().getString(R.string.sub_caste_details, userData.subCaste)
|
|
||||||
}
|
|
||||||
binding.tvHouse.text =
|
binding.tvHouse.text =
|
||||||
requireContext().getString(R.string.house_details, userData.house)
|
requireContext().getString(R.string.house_details, userData.house)
|
||||||
binding.tvCity.text =
|
binding.tvCity.text =
|
||||||
@@ -141,7 +121,7 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
binding.tvPincode.text =
|
binding.tvPincode.text =
|
||||||
requireContext().getString(R.string.pincode_details, userData.pinCode)
|
requireContext().getString(R.string.pincode_details, userData.pinCode)
|
||||||
binding.centerName.text =
|
binding.centerName.text =
|
||||||
requireContext().getString(R.string.centre_name, userData.registrationCenterName)
|
requireContext().getString(R.string.centre_name, userData.CenterName)
|
||||||
if (userData.isUnderMedication!!) {
|
if (userData.isUnderMedication!!) {
|
||||||
binding.tvIsUnderMedication.text = requireContext().getString(
|
binding.tvIsUnderMedication.text = requireContext().getString(
|
||||||
R.string.is_patient_under_any_medication_details, "Yes"
|
R.string.is_patient_under_any_medication_details, "Yes"
|
||||||
@@ -155,7 +135,7 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
binding.tvIsUnderTransfusion.text = requireContext().getString(
|
binding.tvIsUnderTransfusion.text = requireContext().getString(
|
||||||
R.string.is_patient_undergoing_any_blood_transfusion_details, "Yes"
|
R.string.is_patient_undergoing_any_blood_transfusion_details, "Yes"
|
||||||
)
|
)
|
||||||
} else {
|
}else{
|
||||||
binding.tvIsUnderTransfusion.text = requireContext().getString(
|
binding.tvIsUnderTransfusion.text = requireContext().getString(
|
||||||
R.string.is_patient_undergoing_any_blood_transfusion_details, "No"
|
R.string.is_patient_undergoing_any_blood_transfusion_details, "No"
|
||||||
)
|
)
|
||||||
@@ -165,7 +145,7 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
R.string.sickle_cell_family_history, "No"
|
R.string.sickle_cell_family_history, "No"
|
||||||
)
|
)
|
||||||
|
|
||||||
} else {
|
}else{
|
||||||
binding.tvSickleCellFamilyHistory.text = requireContext().getString(
|
binding.tvSickleCellFamilyHistory.text = requireContext().getString(
|
||||||
R.string.sickle_cell_family_history, userData.sickleCellHistory
|
R.string.sickle_cell_family_history, userData.sickleCellHistory
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
@@ -55,29 +56,18 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
private fun autoFillUserData(user: UserData) {
|
private fun autoFillUserData(user: UserData) {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
user.birthYear.let { etYob.setText(it) }
|
user.birthYear.let { etYob.setText(it) }
|
||||||
user.gender.let {
|
user.gender.let { etGenderBlock.setText(it, false) }
|
||||||
when (it) {
|
|
||||||
"Male" -> {
|
|
||||||
male.isChecked = true
|
|
||||||
}
|
|
||||||
"Female" -> {
|
|
||||||
female.isChecked = true
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
other.isChecked = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
user.phoneNumber.let { etMobile.setText(it) }
|
user.phoneNumber.let { etMobile.setText(it) }
|
||||||
user.careOf.let { etCareof.setText(it) }
|
user.careOf.let { etCareof.setText(it) }
|
||||||
user.maritalStatus.let { etIsMarried.setText(it, false) }
|
user.maritalStatus.let { etIsMarried.setText(it, false) }
|
||||||
user.caste.let { etCaste.setText(it) }
|
user.caste.let { etCategory.setText(it, false) }
|
||||||
user.category.let { etCategory.setText(it, false) }
|
|
||||||
user.subCaste.let { etSubCaste.setText(it) }
|
user.subCaste.let { etSubCaste.setText(it) }
|
||||||
user.house.let { etHouse.setText(it) }
|
user.house.let { etHouse.setText(it) }
|
||||||
user.city.let { etCity.setText(it) }
|
user.city.let { etCity.setText(it) }
|
||||||
user.district.let { etDistrict.setText(it, false) }
|
user.district.let { etDistrict.setText(it) }
|
||||||
|
user.state.let { etState.setText(it) }
|
||||||
user.pinCode.let { etPincode.setText(it) }
|
user.pinCode.let { etPincode.setText(it) }
|
||||||
|
user.bloodGroup.let { etBloodGroup.setText(it, false) }
|
||||||
user.isUnderMedication.let {
|
user.isUnderMedication.let {
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
yes.isChecked = it
|
yes.isChecked = it
|
||||||
@@ -88,24 +78,59 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
yes1.isChecked = it
|
yes1.isChecked = it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// user.sickleCellHistory.let{
|
||||||
|
// if (it != null) {
|
||||||
|
// if (binding.etFamilyHistory.isVisible) {
|
||||||
|
// binding.etFamilyHistory.setText(it)
|
||||||
|
// yes1history.isChecked = true
|
||||||
|
// }else{
|
||||||
|
// no1history.isChecked = true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// user.isUnderMedication.let {
|
||||||
|
// if (it != null) {
|
||||||
|
// yes.isChecked = it
|
||||||
|
// }
|
||||||
|
// }
|
||||||
user.sickleCellHistory.let {
|
user.sickleCellHistory.let {
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
yes1history.isChecked = true
|
yes1history.isChecked = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// user.sickleCellHistory.let{
|
||||||
|
// if (it != null) {
|
||||||
|
// if(yes1history.isChecked){
|
||||||
|
// yes1history.isChecked = true
|
||||||
|
// }else if(no1history.isChecked){
|
||||||
|
// no1history.isChecked
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
if (yes1history.isChecked) {
|
if (yes1history.isChecked) {
|
||||||
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
||||||
|
|
||||||
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
binding.tilFamilyHistory.visibility = View.GONE
|
binding.tilFamilyHistory.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.yes1history.setOnClickListener {
|
binding.yes1history.setOnClickListener {
|
||||||
binding.tilFamilyHistory.visibility =
|
binding.tilFamilyHistory.visibility =
|
||||||
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
||||||
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
binding.no1history.setOnClickListener {
|
binding.no1history.setOnClickListener {
|
||||||
binding.tilFamilyHistory.visibility =
|
binding.tilFamilyHistory.visibility =
|
||||||
if (binding.no1history.isChecked) View.GONE else View.VISIBLE
|
if (binding.no1history.isChecked) View.GONE else View.VISIBLE
|
||||||
@@ -136,29 +161,28 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
private fun verifyUserDetails(): Boolean {
|
private fun verifyUserDetails(): Boolean {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
val yob = etYob.text.toString()
|
val yob = etYob.text.toString()
|
||||||
if (yob.isEmpty() || yob.toInt() <= 1900 || yob.toInt() > 2020) {
|
if (yob.isEmpty() || yob.toInt() <= 1900 || yob.toInt() > 2023) {
|
||||||
etYob.error = "Please enter a valid birth year between 1900 and 2020"
|
etYob.error = "Please enter a valid birth year between 1900 and 2023"
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
userData.birthYear = yob
|
userData.birthYear = yob
|
||||||
}
|
}
|
||||||
|
|
||||||
if (male.isChecked) {
|
val gender = etGenderBlock.text.toString()
|
||||||
userData.gender = "Male"
|
if (gender.isEmpty()) {
|
||||||
} else if (female.isChecked) {
|
etGenderBlock.error = "Please enter your gender"
|
||||||
userData.gender = "Female"
|
return false
|
||||||
} else {
|
} else {
|
||||||
userData.gender = "Other"
|
userData.gender = gender
|
||||||
}
|
}
|
||||||
|
|
||||||
val mobile = etMobile.text.toString()
|
val mobile = etMobile.text.toString()
|
||||||
userData.phoneNumber = mobile
|
if (mobile.isEmpty() || mobile.length != 10) {
|
||||||
// if (mobile.isEmpty() || mobile.length != 10) {
|
etMobile.error = "Please enter a valid 10-digit mobile number"
|
||||||
// etMobile.error = "Please enter a valid 10-digit mobile number"
|
return false
|
||||||
// return false
|
} else {
|
||||||
// } else {
|
userData.phoneNumber = mobile
|
||||||
// userData.phoneNumber = mobile
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
val careOf = etCareof.text.toString()
|
val careOf = etCareof.text.toString()
|
||||||
if (careOf.isEmpty()) {
|
if (careOf.isEmpty()) {
|
||||||
@@ -178,22 +202,17 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
|
|
||||||
val category = etCategory.text.toString()
|
val category = etCategory.text.toString()
|
||||||
if (category.isEmpty()) {
|
if (category.isEmpty()) {
|
||||||
etCategory.error = "Please enter your category"
|
etCategory.error = "Please enter your caste"
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
userData.category = category
|
userData.caste = category
|
||||||
}
|
|
||||||
|
|
||||||
val caste = etCaste.text.toString()
|
|
||||||
if (caste.isEmpty()) {
|
|
||||||
etCaste.error = "Please enter your caste"
|
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
userData.caste = caste
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val subCaste = etSubCaste.text.toString()
|
val subCaste = etSubCaste.text.toString()
|
||||||
if (subCaste.isNotEmpty()) {
|
if (subCaste.isEmpty()) {
|
||||||
|
etSubCaste.error = "Please enter your sub caste"
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
userData.subCaste = subCaste
|
userData.subCaste = subCaste
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,6 +256,13 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
userData.pinCode = pincode
|
userData.pinCode = pincode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val bloodGroup = etBloodGroup.text.toString()
|
||||||
|
if (bloodGroup.isEmpty()) {
|
||||||
|
etBloodGroup.error = "Please enter your blood group"
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
userData.bloodGroup = bloodGroup
|
||||||
|
}
|
||||||
userData.isUnderMedication = yes.isChecked
|
userData.isUnderMedication = yes.isChecked
|
||||||
userData.isUnderTransfusion = yes1.isChecked
|
userData.isUnderTransfusion = yes1.isChecked
|
||||||
userData.sickleCellHistory = yes1history.isChecked.toString()
|
userData.sickleCellHistory = yes1history.isChecked.toString()
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ import com.example.hposregistration.data.user.UserData
|
|||||||
import com.google.firebase.storage.FirebaseStorage
|
import com.google.firebase.storage.FirebaseStorage
|
||||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Calendar
|
|
||||||
import java.util.Date
|
|
||||||
import java.util.Locale
|
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@HiltViewModel
|
@HiltViewModel
|
||||||
@@ -32,7 +28,7 @@ class RegistrationViewModel @Inject constructor(
|
|||||||
val fireBaseUpload = MutableLiveData<String>()
|
val fireBaseUpload = MutableLiveData<String>()
|
||||||
|
|
||||||
fun addUserToDatabase(userData: UserData) = viewModelScope.launch {
|
fun addUserToDatabase(userData: UserData) = viewModelScope.launch {
|
||||||
val file = Uri.parse(userData.userImageURL)
|
val file = Uri.parse(userData.userImage)
|
||||||
val storageRef = FirebaseStorage.getInstance().reference
|
val storageRef = FirebaseStorage.getInstance().reference
|
||||||
val imageRef = storageRef.child("${userData._id}/${file.lastPathSegment}")
|
val imageRef = storageRef.child("${userData._id}/${file.lastPathSegment}")
|
||||||
|
|
||||||
@@ -43,7 +39,7 @@ class RegistrationViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
imageRef.downloadUrl
|
imageRef.downloadUrl
|
||||||
}.addOnSuccessListener { uri ->
|
}.addOnSuccessListener { uri ->
|
||||||
userData.userImageURL = uri.toString()
|
userData.userImage = uri.toString()
|
||||||
addDataToFirebase(userData)
|
addDataToFirebase(userData)
|
||||||
}.addOnFailureListener { exception ->
|
}.addOnFailureListener { exception ->
|
||||||
|
|
||||||
@@ -67,15 +63,6 @@ class RegistrationViewModel @Inject constructor(
|
|||||||
get() = _networkStatusLiveData
|
get() = _networkStatusLiveData
|
||||||
|
|
||||||
fun insert(userData: UserData) = viewModelScope.launch {
|
fun insert(userData: UserData) = viewModelScope.launch {
|
||||||
val currentDate = Date()
|
|
||||||
val dateFormat = SimpleDateFormat("yyyyMMdd")
|
|
||||||
val partition = dateFormat.format(currentDate)
|
|
||||||
userData._idSearch = partition + userData._id
|
|
||||||
userData.abhaIdSearch = partition + userData.abhaId
|
|
||||||
userData.aadharIdSearch = partition + userData.aadharId
|
|
||||||
userData.createdAt = SimpleDateFormat(
|
|
||||||
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
|
||||||
).format(Calendar.getInstance().time)
|
|
||||||
mainRepository.insert(userData)
|
mainRepository.insert(userData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
30
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@@ -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>
|
||||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -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>
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<vector android:autoMirrored="true" android:height="24dp"
|
|
||||||
android:tint="@color/red" android:viewportHeight="24"
|
|
||||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<path android:fillColor="@color/red" android:pathData="M17,7l-1.41,1.41L18.17,11H8v2h10.17l-2.58,2.58L17,17l5,-5zM4,5h8V3H4c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h8v-2H4V5z"/>
|
|
||||||
</vector>
|
|
||||||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 25 KiB |
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="com.example.hposregistration.ui.fragments.registration.AbhaRegistrationFragment">
|
tools:context=".ui.fragments.registration.AbhaRegistrationFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
style="@style/title1"
|
style="@style/title1"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
@@ -32,7 +31,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/scan_now"
|
android:text="@string/scan_now"
|
||||||
android:visibility="gone"
|
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
app:backgroundTint="@color/primary_light"
|
app:backgroundTint="@color/primary_light"
|
||||||
app:cornerRadius="100dp"
|
app:cornerRadius="100dp"
|
||||||
@@ -47,7 +45,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_scan_now">
|
app:layout_constraintTop_toBottomOf="@id/btn_scan_now">
|
||||||
@@ -96,7 +93,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:text="Enter Details to proceed\n(ABHA and Aadhar are optional)"
|
android:text="@string/enter_abha_number_manualy"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
app:layout_constraintTop_toBottomOf="@id/seperator1" />
|
||||||
|
|
||||||
@@ -114,7 +111,6 @@
|
|||||||
android:id="@+id/et_name"
|
android:id="@+id/et_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLength="24"
|
|
||||||
android:hint="@string/person_s_name" />
|
android:hint="@string/person_s_name" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
@@ -172,9 +168,9 @@
|
|||||||
android:id="@+id/centerName"
|
android:id="@+id/centerName"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLength="24"
|
|
||||||
android:hint="@string/center_name"
|
android:hint="@string/center_name"
|
||||||
android:inputType="text" />
|
android:inputType="text"
|
||||||
|
android:maxLength="12" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -194,7 +190,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/proceed"
|
android:text="@string/proceed"
|
||||||
android:textColor="@color/white"
|
|
||||||
app:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -206,7 +201,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/btnProceed">
|
app:layout_constraintTop_toBottomOf="@id/btnProceed">
|
||||||
@@ -253,7 +247,6 @@
|
|||||||
style="@style/title1"
|
style="@style/title1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:text="@string/create_abha_id_card"
|
android:text="@string/create_abha_id_card"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -262,7 +255,6 @@
|
|||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_click_here"
|
android:id="@+id/btn_click_here"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/click_here"
|
android:text="@string/click_here"
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="24dp">
|
android:padding="24dp"
|
||||||
|
tools:context=".ui.fragments.registration.CaptureUserImageFragment">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
|
|||||||
@@ -1,145 +0,0 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
tools:context="com.example.hposregistration.ui.fragments.LoginFragment">
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_title"
|
|
||||||
style="@style/title1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:text="@string/login"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:src="@drawable/smi_logo"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/imageView2"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView2"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:src="@drawable/sickle_cell_gov_logo"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/imageView"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/et_aadharID"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/loginId"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/login_id"
|
|
||||||
android:inputType="textCapCharacters"
|
|
||||||
android:maxLength="12" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/et_centerName"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/et_aadharID">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/password"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/password"
|
|
||||||
android:inputType="text"
|
|
||||||
android:maxLength="12" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnLogin"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:text="@string/login"
|
|
||||||
app:cornerRadius="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/et_centerName" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/errorMessageCL"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#80000000"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/itemErrorMessage"
|
|
||||||
layout="@layout/item_error_message"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/progressBarCL"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#80000000"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<ProgressBar
|
|
||||||
android:id="@+id/progressBar"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:indeterminateDrawable="@drawable/progressbar_costume_view"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:context="com.example.hposregistration.ui.fragments.registration.ReviewDetailsRegistrationFragment">
|
tools:context=".ui.fragments.registration.ReviewDetailsRegistrationFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -125,16 +125,6 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvCareOf" />
|
app:layout_constraintTop_toBottomOf="@id/tvCareOf" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvCategory"
|
|
||||||
style="@style/title1_1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvMaritalStatus" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvCaste"
|
android:id="@+id/tvCaste"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
@@ -143,7 +133,7 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvCategory" />
|
app:layout_constraintTop_toBottomOf="@id/tvMaritalStatus" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSubCaste"
|
android:id="@+id/tvSubCaste"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="com.example.hposregistration.ui.fragments.registration.UserDetailsRegistrationFragment">
|
tools:context=".ui.fragments.registration.UserDetailsRegistrationFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -48,39 +48,27 @@
|
|||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<RadioGroup
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/gender"
|
android:id="@+id/til_gender"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:orientation="horizontal"
|
android:layout_marginTop="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/til_yob">
|
app:layout_constraintTop_toBottomOf="@id/til_yob">
|
||||||
|
|
||||||
<RadioButton
|
<AutoCompleteTextView
|
||||||
android:id="@+id/male"
|
android:id="@+id/et_gender_block"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:hint="@string/gender"
|
||||||
android:checked="true"
|
android:inputType="none"
|
||||||
android:text="@string/male"
|
android:labelFor="@id/til_gender"
|
||||||
android:textSize="16sp" />
|
app:simpleItems="@array/gender" />
|
||||||
|
|
||||||
<RadioButton
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:id="@+id/female"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/female"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/other"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/other"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/til_mobile"
|
android:id="@+id/til_mobile"
|
||||||
@@ -91,7 +79,7 @@
|
|||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/gender">
|
app:layout_constraintTop_toBottomOf="@id/til_gender">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/et_mobile"
|
android:id="@+id/et_mobile"
|
||||||
@@ -159,31 +147,13 @@
|
|||||||
android:id="@+id/et_category"
|
android:id="@+id/et_category"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/category"
|
android:hint="@string/caste"
|
||||||
android:inputType="none"
|
android:inputType="none"
|
||||||
android:labelFor="@id/til_is_married"
|
android:labelFor="@id/til_category"
|
||||||
app:simpleItems="@array/category" />
|
app:simpleItems="@array/category" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/til_caste"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="24dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/til_category">
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/et_Caste"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/caste" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/til_subCaste"
|
android:id="@+id/til_subCaste"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
@@ -193,7 +163,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/til_caste">
|
app:layout_constraintTop_toBottomOf="@id/til_category">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/et_subCaste"
|
android:id="@+id/et_subCaste"
|
||||||
@@ -230,7 +200,7 @@
|
|||||||
android:id="@+id/et_house"
|
android:id="@+id/et_house"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Address" />
|
android:hint="@string/house" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
@@ -252,25 +222,23 @@
|
|||||||
android:hint="@string/city_town" />
|
android:hint="@string/city_town" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/til_district"
|
android:id="@+id/til_district"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/til_city">
|
app:layout_constraintTop_toBottomOf="@id/til_city">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/et_district"
|
android:id="@+id/et_district"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/district"
|
android:hint="@string/district" />
|
||||||
android:inputType="none"
|
|
||||||
android:labelFor="@id/til_district"
|
|
||||||
app:simpleItems="@array/district" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
@@ -289,7 +257,6 @@
|
|||||||
android:id="@+id/et_state"
|
android:id="@+id/et_state"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Karnataka"
|
|
||||||
android:hint="@string/state" />
|
android:hint="@string/state" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
@@ -327,38 +294,37 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/til_pincode" />
|
app:layout_constraintTop_toBottomOf="@id/til_pincode" />
|
||||||
|
|
||||||
|
|
||||||
<!-- <com.google.android.material.textfield.TextInputLayout-->
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
<!-- android:id="@+id/til_blood_group"-->
|
android:id="@+id/til_blood_group"
|
||||||
<!-- style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"-->
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
<!-- android:layout_width="match_parent"-->
|
android:layout_width="match_parent"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:layout_marginHorizontal="24dp"-->
|
android:layout_marginHorizontal="24dp"
|
||||||
<!-- android:layout_marginTop="16dp"-->
|
android:layout_marginTop="16dp"
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@id/tv_title3">-->
|
app:layout_constraintTop_toBottomOf="@id/tv_title3">
|
||||||
|
|
||||||
<!-- <AutoCompleteTextView-->
|
<AutoCompleteTextView
|
||||||
<!-- android:id="@+id/et_blood_group"-->
|
android:id="@+id/et_blood_group"
|
||||||
<!-- android:layout_width="match_parent"-->
|
android:layout_width="match_parent"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:hint="@string/blood_group"-->
|
android:hint="@string/blood_group"
|
||||||
<!-- android:inputType="none"-->
|
android:inputType="none"
|
||||||
<!-- android:labelFor="@id/til_blood_group"-->
|
android:labelFor="@id/til_blood_group"
|
||||||
<!-- app:simpleItems="@array/blood_group" />-->
|
app:simpleItems="@array/blood_group" />
|
||||||
|
|
||||||
<!-- </com.google.android.material.textfield.TextInputLayout>-->
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cb_item1"
|
android:id="@+id/cb_item1"
|
||||||
style="@style/title1_2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/is_patient_under_any_medication"
|
android:text="@string/is_patient_under_any_medication"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_title3" />
|
app:layout_constraintTop_toBottomOf="@id/til_blood_group" />
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/radioGroup"
|
android:id="@+id/radioGroup"
|
||||||
@@ -388,7 +354,6 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cb_item2"
|
android:id="@+id/cb_item2"
|
||||||
style="@style/title1_2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
@@ -423,7 +388,6 @@
|
|||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cb_item3"
|
android:id="@+id/cb_item3"
|
||||||
style="@style/title1_2"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
|
|||||||
@@ -1,34 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="24dp"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:context="com.example.hposregistration.ui.fragments.UserListFragment">
|
tools:context=".ui.fragments.UserListFragment"
|
||||||
<LinearLayout
|
android:padding="24dp">
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/fragment_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/app_version"
|
|
||||||
style="@style/title2"
|
|
||||||
android:layout_width="57dp"
|
|
||||||
android:layout_height="15dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="1.0.4"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.017"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
@@ -40,29 +17,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/emptyRegistrations"
|
|
||||||
style="@style/title1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/empty_registrations"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noList"
|
android:id="@+id/noList"
|
||||||
style="@style/title1"
|
style="@style/title1"
|
||||||
android:layout_width="wrap_content"
|
android:visibility="gone"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/internet_is_not_available_and_there_is_no_data_available_in_local_db"
|
android:text="@string/internet_is_not_available_and_there_is_no_data_available_in_local_db"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/red"
|
android:textColor="@color/red"
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -70,34 +33,14 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/uploadData"
|
android:id="@+id/uploadData"
|
||||||
android:layout_width="30dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="50dp"
|
||||||
android:layout_margin="5dp"
|
|
||||||
android:src="@drawable/upload_data"
|
android:src="@drawable/upload_data"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/btnLogout"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:src="@drawable/ic_logout"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/uploadData"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
|
||||||
|
|
||||||
<SearchView
|
|
||||||
android:id="@+id/searchUser"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"/>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_order"
|
android:id="@+id/rv_order"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -106,21 +49,19 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/searchUser"
|
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||||
tools:listitem="@layout/user_item_view" />
|
tools:listitem="@layout/user_item_view"/>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/btnRegisterUser"
|
android:id="@+id/btnRegisterUser"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:backgroundTint="@color/primary"
|
|
||||||
android:contentDescription="@string/register_user"
|
|
||||||
android:src="@drawable/ic_add"
|
|
||||||
app:elevation="1dp"
|
app:elevation="1dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:src="@drawable/ic_add"
|
||||||
|
android:backgroundTint="@color/primary"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:contentDescription="@string/register_user" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,94 +1,60 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/userCard"
|
android:id="@+id/newPaperCard"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
app:cardBackgroundColor="@color/primary_light"
|
||||||
|
app:cardCornerRadius="25dp"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:padding="12dp">
|
||||||
app:cardBackgroundColor="@color/primary_light"
|
|
||||||
app:cardCornerRadius="25dp"
|
|
||||||
app:cardElevation="0dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/userImage"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/userName"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="12dp">
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/userImage" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/userImage"
|
android:id="@+id/userId"
|
||||||
android:layout_width="100dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:fontFamily="@font/poppins_bold"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:layout_marginTop="16dp"
|
||||||
tools:src="@drawable/ic_qr_code_scanner" />
|
android:gravity="center"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/userName" />
|
||||||
|
|
||||||
<TextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/userName"
|
|
||||||
style="@style/title1_1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="14sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/userImage"
|
|
||||||
tools:text="Name: MohamedKaif" />
|
|
||||||
|
|
||||||
<TextView
|
</androidx.cardview.widget.CardView>
|
||||||
android:id="@+id/userId"
|
|
||||||
style="@style/title1_1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="14sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/userName"
|
|
||||||
tools:text="UserID: MohamedKaif" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/timeCreated"
|
|
||||||
style="@style/title1_1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="14sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/userId"
|
|
||||||
tools:text="time" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/teststatus"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/title1_1"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:gravity="start"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="14sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/userImage"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/timeCreated"
|
|
||||||
tools:text="Test Status: Completed"/>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/hpos_icon_background"/>
|
|
||||||
<foreground android:drawable="@mipmap/hpos_icon_foreground"/>
|
|
||||||
</adaptive-icon>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/hpos_icon_background"/>
|
|
||||||
<foreground android:drawable="@mipmap/hpos_icon_foreground"/>
|
|
||||||
</adaptive-icon>
|
|
||||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -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>
|
||||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@@ -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>
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
@@ -3,7 +3,7 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main_nav_graph"
|
android:id="@+id/main_nav_graph"
|
||||||
app:startDestination="@id/loginFragment">
|
app:startDestination="@id/userListFragment">
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/registrationFragment"
|
android:id="@+id/registrationFragment"
|
||||||
@@ -26,11 +26,6 @@
|
|||||||
<action
|
<action
|
||||||
android:id="@+id/action_userListFragment_to_registrationFragment"
|
android:id="@+id/action_userListFragment_to_registrationFragment"
|
||||||
app:destination="@id/registrationFragment" />
|
app:destination="@id/registrationFragment" />
|
||||||
<action
|
|
||||||
android:id="@+id/action_userListFragment_to_loginFragment"
|
|
||||||
app:destination="@id/loginFragment"
|
|
||||||
app:popUpTo="@id/main_nav_graph"
|
|
||||||
app:popUpToInclusive="true"/>
|
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/profileFragment"
|
android:id="@+id/profileFragment"
|
||||||
@@ -81,16 +76,4 @@
|
|||||||
app:argType="string"
|
app:argType="string"
|
||||||
android:defaultValue="null" />
|
android:defaultValue="null" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/loginFragment"
|
|
||||||
android:name="com.example.hposregistration.ui.fragments.LoginFragment"
|
|
||||||
android:label="fragment_login"
|
|
||||||
tools:layout="@layout/fragment_login" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_loginFragment_to_userListFragment"
|
|
||||||
app:destination="@id/userListFragment"
|
|
||||||
app:popUpTo="@id/main_nav_graph"
|
|
||||||
app:popUpToInclusive="true"/>
|
|
||||||
</fragment>
|
|
||||||
</navigation>
|
</navigation>
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="hpos_icon_background">#FFFFFF</color>
|
|
||||||
</resources>
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<string name="birth_year">Birth Year</string>
|
<string name="birth_year">Birth Year</string>
|
||||||
<string name="marital_status">Select Marital status</string>
|
<string name="marital_status">Select Marital status</string>
|
||||||
<string name="father_s_husband_s_name">Father\'s/Husband\'s Name</string>
|
<string name="father_s_husband_s_name">Father\'s/Husband\'s Name</string>
|
||||||
<string name="caste">Caste</string>
|
<string name="caste">Select Caste</string>
|
||||||
<string name="person_s_address_details">Person\'s Address Details</string>
|
<string name="person_s_address_details">Person\'s Address Details</string>
|
||||||
<string name="district">District</string>
|
<string name="district">District</string>
|
||||||
<string name="city_town">City / Town</string>
|
<string name="city_town">City / Town</string>
|
||||||
@@ -41,21 +41,20 @@
|
|||||||
<string name="review">Review</string>
|
<string name="review">Review</string>
|
||||||
<string name="blood_group">Select Blood Group</string>
|
<string name="blood_group">Select Blood Group</string>
|
||||||
<string name="house">House</string>
|
<string name="house">House</string>
|
||||||
<string name="is_patient_under_any_medication">Have you been under medication for Sickle Cell in the past three months?</string>
|
<string name="is_patient_under_any_medication">Is user under any medication or treatment?</string>
|
||||||
<string name="is_patient_undergoing_any_blood_transfusion">Have you undergone any Blood transfusions in the Past three months ?</string>
|
<string name="is_patient_undergoing_any_blood_transfusion">Is user undergoing any blood transfusion?</string>
|
||||||
|
|
||||||
<string name="user_list">User List</string>
|
<string name="user_list">User List</string>
|
||||||
<string name="register_user">Register User</string>
|
<string name="register_user">Register User</string>
|
||||||
<string name="is_user_having_any_family_history_for_sickle_cell">Is user having any family history for Sickle Cell</string>
|
<string name="is_user_having_any_family_history_for_sickle_cell">Is user having any family history for Sickle Cell</string>
|
||||||
<string name="family_history_of_sickle_cell">Family History of Sickle Cell</string>
|
<string name="family_history_of_sickle_cell">Family History of Sickle Cell</string>
|
||||||
<string name="mobile_number_10_digits">Mobile Number(Optional)</string>
|
<string name="mobile_number_10_digits">Mobile Number (10 digits)</string>
|
||||||
<string name="sub_caste">Sub Caste</string>
|
<string name="sub_caste">Sub Caste</string>
|
||||||
<string name="capture_user_image">Capture User Image</string>
|
<string name="capture_user_image">Capture User Image</string>
|
||||||
<string name="mobile_number">Mobile Number</string>
|
<string name="mobile_number">Mobile Number</string>
|
||||||
<string name="edit">Edit</string>
|
<string name="edit">Edit</string>
|
||||||
<string name="user_details">User Details</string>
|
<string name="user_details">User Details</string>
|
||||||
<string name="internet_is_not_available_and_there_is_no_data_available_in_local_db">Internet is not available and there is no Data available in Local DB</string>
|
<string name="internet_is_not_available_and_there_is_no_data_available_in_local_db">Internet is not available and there is no Data available in Local DB</string>
|
||||||
<string name="empty_registrations">No registrations are available for display</string>
|
|
||||||
<string name="user_id">User ID: %1$s</string>
|
<string name="user_id">User ID: %1$s</string>
|
||||||
<string name="abha_number">Abha Number: %1$s</string>
|
<string name="abha_number">Abha Number: %1$s</string>
|
||||||
<string name="aadhar_number_details">Aadhar Number: %1$s</string>
|
<string name="aadhar_number_details">Aadhar Number: %1$s</string>
|
||||||
@@ -65,7 +64,6 @@
|
|||||||
<string name="phone_number_details">Mobile Number: %1$s</string>
|
<string name="phone_number_details">Mobile Number: %1$s</string>
|
||||||
<string name="care_of_details">Father\'s/Husband\'s Name: %1$s</string>
|
<string name="care_of_details">Father\'s/Husband\'s Name: %1$s</string>
|
||||||
<string name="marital_status_details">Marital Status: %1$s</string>
|
<string name="marital_status_details">Marital Status: %1$s</string>
|
||||||
<string name="category_details">Category: %1$s</string>
|
|
||||||
<string name="caste_details">Caste: %1$s</string>
|
<string name="caste_details">Caste: %1$s</string>
|
||||||
<string name="sub_caste_details">Sub Caste: %1$s</string>
|
<string name="sub_caste_details">Sub Caste: %1$s</string>
|
||||||
<string name="house_details">House: %1$s</string>
|
<string name="house_details">House: %1$s</string>
|
||||||
@@ -80,60 +78,15 @@
|
|||||||
<string name="is_any_sickle">Is Any Sickle cell History: %1$s</string>
|
<string name="is_any_sickle">Is Any Sickle cell History: %1$s</string>
|
||||||
<string name="sickle_cell_family_history">Sickle cell Family History: %1$s</string>
|
<string name="sickle_cell_family_history">Sickle cell Family History: %1$s</string>
|
||||||
<string name="center_name">Center Name</string>
|
<string name="center_name">Center Name</string>
|
||||||
<string name="login_id">Login ID</string>
|
|
||||||
<string name="password">Password</string>
|
|
||||||
<string name="login">Login</string>
|
|
||||||
<string name="_2">Category</string>
|
|
||||||
<string name="category">Category</string>
|
|
||||||
<string name="male">Male</string>
|
|
||||||
<string name="female">Female</string>
|
|
||||||
<string name="other">Other</string>
|
|
||||||
|
|
||||||
|
|
||||||
<string-array name="category">
|
<string-array name="category">
|
||||||
<item>NT-A</item>
|
<item>GEN</item>
|
||||||
<item>NT-B</item>
|
|
||||||
<item>NT-C</item>
|
|
||||||
<item>NT-D</item>
|
|
||||||
<item>OBC</item>
|
<item>OBC</item>
|
||||||
<item>OPEN</item>
|
|
||||||
<item>OTHER</item>
|
|
||||||
<item>SBC</item>
|
|
||||||
<item>SC</item>
|
<item>SC</item>
|
||||||
<item>ST</item>
|
<item>ST</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="caste">
|
|
||||||
<item>AHIR</item>
|
|
||||||
<item>BARAI</item>
|
|
||||||
<item>BRAHMAN</item>
|
|
||||||
<item>BUDDHIST</item>
|
|
||||||
<item>CHAMBHAR</item>
|
|
||||||
<item>CHAMAR</item>
|
|
||||||
<item>DEWANGAN</item>
|
|
||||||
<item>DHIWAR</item>
|
|
||||||
<item>FULMALI</item>
|
|
||||||
<item>GOND</item>
|
|
||||||
<item>JAIN</item>
|
|
||||||
<item>KOLI</item>
|
|
||||||
<item>KOSHTI</item>
|
|
||||||
<item>KUMBHAR</item>
|
|
||||||
<item>KUNBI</item>
|
|
||||||
<item>LOHAR</item>
|
|
||||||
<item>MALI</item>
|
|
||||||
<item>MANNA</item>
|
|
||||||
<item>MAHAR</item>
|
|
||||||
<item>MOURYA</item>
|
|
||||||
<item>MUSLIM</item>
|
|
||||||
<item>NAVI</item>
|
|
||||||
<item>OTHER</item>
|
|
||||||
<item>PAWAR</item>
|
|
||||||
<item>PARDESI</item>
|
|
||||||
<item>SHAHU</item>
|
|
||||||
<item>SONAR</item>
|
|
||||||
<item>TELI</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="marital_status">
|
<string-array name="marital_status">
|
||||||
<item>Married</item>
|
<item>Married</item>
|
||||||
<item>Single</item>
|
<item>Single</item>
|
||||||
@@ -156,10 +109,5 @@
|
|||||||
<item>Female</item>
|
<item>Female</item>
|
||||||
<item>Other</item>
|
<item>Other</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="district">
|
|
||||||
<item>Mysuru</item>
|
|
||||||
<item>Kodagu</item>
|
|
||||||
<item>Chamarajanagar</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '8.4.0' apply false
|
id 'com.android.application' version '8.0.2' apply false
|
||||||
id 'com.android.library' version '8.4.0' apply false
|
id 'com.android.library' version '8.0.2' apply false
|
||||||
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
|
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
|
||||||
id 'androidx.navigation.safeargs' version '2.7.0-beta02' apply false
|
id 'androidx.navigation.safeargs' version '2.7.0-beta01' apply false
|
||||||
id 'com.google.dagger.hilt.android' version '2.46' apply false
|
id 'com.google.dagger.hilt.android' version '2.46' apply false
|
||||||
id "com.google.gms.google-services" version "4.3.15" apply false
|
id "com.google.gms.google-services" version "4.3.15" apply false
|
||||||
id 'com.google.firebase.crashlytics' version "2.9.8" apply false
|
|
||||||
}
|
}
|
||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Wed Jul 12 14:05:11 IST 2023
|
#Wed Jun 14 15:14:47 IST 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ dependencyResolutionManagement {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {url "https://jitpack.io"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = "HPOS Registration"
|
rootProject.name = "HPOS Registration"
|
||||||
|
|||||||