Project Setup

This commit is contained in:
manaknightdev
2023-03-14 00:23:53 +05:30
commit 8ba6156121
97 changed files with 2203 additions and 0 deletions
Vendored
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
Binary file not shown.
@@ -0,0 +1,2 @@
#Fri Mar 10 21:58:28 IST 2023
gradle.version=7.4
Binary file not shown.
Binary file not shown.
View File
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
Generated
+1
View File
@@ -0,0 +1 @@
DealHuntGo
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="Embedded JDK" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
+556
View File
@@ -0,0 +1,556 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="navEditor-manualLayoutAlgorithm2">
<option name="myPositions">
<map>
<entry key="mobile_navigation.xml">
<value>
<LayoutPositions>
<option name="myPositions">
<map>
<entry key="OTPFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="2208" />
<option name="y" value="2013" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_OTPFragment_to_deleteSuccesFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="aboutFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="2013" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="accountFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1476" />
<option name="y" value="2351" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_accountFragment_to_aboutFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_accountFragment_to_inviteFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_accountFragment_to_privacyFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_accountFragment_to_profileFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_accountFragment_to_reportFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_accountFragment_to_settingsFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="ageFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="2369" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="appStartFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="12" />
<option name="y" value="12" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="cameraFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1476" />
<option name="y" value="3437" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_cameraFragment_to_participateSuccessFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="closeAccountFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="2013" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_closeAccountFragment_to_OTPFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="dailyQuestFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1476" />
<option name="y" value="12" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="deleteSuccesFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="2452" />
<option name="y" value="2013" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="fullNameFragment2">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="589" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="genderFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="1301" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="helpFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1476" />
<option name="y" value="1081" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="homeFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1232" />
<option name="y" value="1066" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_homeFragment_to_accountFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_homeFragment_to_cameraFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_homeFragment_to_dailyQuestFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_homeFragment_to_helpFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_homeFragment_to_notificationFragment2">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_homeFragment_to_profileFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_homeFragment_to_searchCouponFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="interestFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="988" />
<option name="y" value="931" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_interestFragment_to_homeFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="inviteFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="3081" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="lastNameFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="945" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="loginFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="500" />
<option name="y" value="1066" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_loginFragment_to_homeFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_loginFragment_to_nameFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="myInterestFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="232" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_myInterestFragment_to_homeFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="nameFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="744" />
<option name="y" value="931" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_nameFragment_to_interestFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="nearYouFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="256" />
<option name="y" value="12" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="notificationFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="2725" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="notificationFragment2">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1476" />
<option name="y" value="725" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="participateSuccessFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="3437" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="privacyFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="2369" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="profileFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="1301" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_profileFragment_to_ageFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_profileFragment_to_closeAccountFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_profileFragment_to_fullNameFragment2">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_profileFragment_to_genderFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_profileFragment_to_lastNameFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_profileFragment_to_myInterestFragment">
<value>
<LayoutPositions />
</value>
</entry>
<entry key="action_profileFragment_to_userNameFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="reportFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="945" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="searchCouponFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1476" />
<option name="y" value="369" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="settingsFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1720" />
<option name="y" value="2725" />
</Point>
</option>
<option name="myPositions">
<map>
<entry key="action_settingsFragment_to_notificationFragment">
<value>
<LayoutPositions />
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="userNameFragment">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="1964" />
<option name="y" value="1657" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
</map>
</option>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
BIN
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
/build
+93
View File
@@ -0,0 +1,93 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
id 'androidx.navigation.safeargs.kotlin'
}
android {
namespace 'com.demotest.app'
compileSdk 33
defaultConfig {
applicationId "com.demotest.app"
minSdk 23
targetSdk 33
versionCode 62
versionName "3.1.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "BASE_URL", "\"https://google.com/\""
}
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${variant.applicationId}-${variant.versionName}.apk"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation 'androidx.annotation:annotation:1.5.0'
//Firebase
//Splash screen
implementation "androidx.core:core-splashscreen:1.0.0"
// Koin
def koin_android_version= "3.3.0"
implementation "io.insert-koin:koin-android:$koin_android_version"
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
// Requests interceptor
implementation "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2"
//Image processing
implementation 'com.github.bumptech.glide:glide:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
//Permissions
implementation 'com.karumi:dexter:6.2.3'
//Loader
implementation "com.github.sakshampruthi:custom-loading-screen:1.16"
implementation 'com.github.simonebortolin:FlowLayoutManager:1.8.0'
implementation 'com.madgag.spongycastle:core:1.54.0.0'
implementation 'com.madgag.spongycastle:prov:1.54.0.0'
implementation 'com.madgag.spongycastle:pkix:1.54.0.0'
implementation 'com.madgag.spongycastle:pg:1.54.0.0'
implementation 'com.airbnb.android:lottie:6.0.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
implementation("com.tbuonomo:dotsindicator:4.3")
}
Binary file not shown.
+20
View File
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.demotest.app",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "com.demotest.app.app-1.0.apk"
}
],
"elementType": "File"
}
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
BIN
View File
Binary file not shown.
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.demotest.app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />/>
<queries>
<package android:name="com.facebook.katana" />
</queries>
<application
android:name=".App"
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:targetApi="s">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
</application>
</manifest>
Binary file not shown.
Binary file not shown.
+33
View File
@@ -0,0 +1,33 @@
package com.demotest.app
import android.app.Application
import com.demotest.app.data.local.prefModule
import com.demotest.app.data.remote.remoteDataSourceModule
import com.google.android.material.color.DynamicColors
import com.demotest.app.di.repoModules
import com.demotest.app.di.viewModules
import com.demotest.app.network.networkModule
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
class App : Application() {
override fun onCreate() {
super.onCreate()
DynamicColors.applyToActivitiesIfAvailable(this)
startKoin {
androidContext(this@App)
modules(koinModules)
}
}
}
val koinModules = listOf(
prefModule,
networkModule,
remoteDataSourceModule,
viewModules,
repoModules
)
@@ -0,0 +1,26 @@
package com.demotest.app
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.NavController
import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
import com.demotest.app.R
import com.demotest.app.databinding.ActivityMainBinding
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private lateinit var navController: NavController
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
//navController = findNavController(R.id.nav_host_fragment_activity_main)
// binding.navView.setupWithNavController(navController)
}
}
@@ -0,0 +1,13 @@
package com.demotest.app.data.local
import android.content.Context
import android.content.SharedPreferences
import org.koin.android.ext.koin.androidContext
import org.koin.dsl.module
val prefModule = module {
single { AppPreferences(androidContext()) }
}
class AppPreferences(context: Context) {
}
@@ -0,0 +1,46 @@
package com.demotest.app.data.local
import android.app.backup.BackupAgentHelper
import android.app.backup.BackupDataInput
import android.app.backup.BackupDataOutput
import android.app.backup.SharedPreferencesBackupHelper
import android.content.Context
import android.os.ParcelFileDescriptor
import android.util.Log
import android.widget.Toast
class MyPrefsBackupAgent(private val context: Context): BackupAgentHelper() {
override fun onCreate() {
val helper = SharedPreferencesBackupHelper(context, "prefs")
addHelper("prefsBackup", helper)
Log.d("shamal","onCreate")
Toast.makeText(this, "onCreate", Toast.LENGTH_SHORT).show()
}
override fun onBackup(
oldState: ParcelFileDescriptor?,
data: BackupDataOutput?,
newState: ParcelFileDescriptor?
) {
super.onBackup(oldState, data, newState)
Toast.makeText(this, "onBackup", Toast.LENGTH_SHORT).show()
Log.d("shamal","onBackup")
}
override fun onRestore(
data: BackupDataInput?,
appVersionCode: Int,
newState: ParcelFileDescriptor?
) {
super.onRestore(data, appVersionCode, newState)
Toast.makeText(this, "onRestore", Toast.LENGTH_SHORT).show()
Log.d("shamal","onRestore")
}
override fun onRestoreFinished() {
super.onRestoreFinished()
Toast.makeText(this, "onRestoreFinished", Toast.LENGTH_SHORT).show()
Log.d("shamal","onRestoreFinished")
}
}
@@ -0,0 +1,21 @@
package com.demotest.app.data.remote
import com.demotest.app.model.ExchangeTestRequest
import com.demotest.app.network.ApiService
import com.demotest.app.network.BaseDataSource
import org.koin.dsl.module
val remoteDataSourceModule = module {
factory { RemoteDataSource(get()) }
}
class RemoteDataSource(
private val apiService: ApiService
) : BaseDataSource() {
suspend fun testConnection(request: ExchangeTestRequest) = getResult {
apiService.testConnection(request)
}
}
@@ -0,0 +1,16 @@
package com.demotest.app.di
import com.demotest.app.app.viewmodels.UserViewModel
import com.demotest.app.repositories.APIRepository
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.module.Module
import org.koin.dsl.module
val viewModules: Module = module {
viewModel { UserViewModel(get()) }
}
val repoModules: Module = module {
single { APIRepository(get()) }
}
@@ -0,0 +1,18 @@
package com.demotest.app.extensions
import android.graphics.Bitmap
import androidx.lifecycle.MutableLiveData
object Constants {
const val PLATFORM = "ANDROID"
const val PARTIAL_PEEK_ID = "one_partial_peek"
const val CONTENT_TYPE = "application/json"
const val APP_UPDATE_REQUEST_CODE = 1230
var isAuthorized: MutableLiveData<Boolean> = MutableLiveData()
var refreshNotifications: MutableLiveData<Boolean> = MutableLiveData()
var hasNewNotification: MutableLiveData<Boolean> = MutableLiveData()
var hasNewDeal: MutableLiveData<Boolean> = MutableLiveData()
var refreshCapturedDeals: MutableLiveData<Boolean> = MutableLiveData()
var userImageLiveData: MutableLiveData<Bitmap?> = MutableLiveData()
var faqUrl: String = ""
}
@@ -0,0 +1,63 @@
package com.demotest.app.extensions
import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import androidx.viewbinding.ViewBinding
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
class FragmentDelegate<T : ViewBinding>(
val fragment: Fragment,
val viewBindingFactory: (View) -> T
) : ReadOnlyProperty<Fragment, T> {
private var binding: T? = null
init {
fragment.lifecycle.addObserver(object : DefaultLifecycleObserver {
val viewLifecycleOwnerLiveDataObserver =
Observer<LifecycleOwner?> {
val viewLifecycleOwner = it ?: return@Observer
viewLifecycleOwner.lifecycle.addObserver(object : DefaultLifecycleObserver {
override fun onDestroy(owner: LifecycleOwner) {
binding = null
}
})
}
override fun onCreate(owner: LifecycleOwner) {
fragment.viewLifecycleOwnerLiveData.observeForever(
viewLifecycleOwnerLiveDataObserver
)
}
override fun onDestroy(owner: LifecycleOwner) {
fragment.viewLifecycleOwnerLiveData.removeObserver(
viewLifecycleOwnerLiveDataObserver
)
}
})
}
override fun getValue(thisRef: Fragment, property: KProperty<*>): T {
val binding = binding
if (binding != null) {
return binding
}
val lifecycle = fragment.viewLifecycleOwner.lifecycle
if (!lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)) {
throw IllegalStateException("Should not attempt to get bindings when Fragment views are destroyed.")
}
return viewBindingFactory(thisRef.requireView()).also { this.binding = it }
}
}
fun <T : ViewBinding> Fragment.viewBinding(viewBindingFactory: (View) -> T) =
FragmentDelegate(this, viewBindingFactory)
@@ -0,0 +1,7 @@
package com.demotest.app.model
data class ErrorResponse(
val code: String,
val message: String,
val success: Boolean
)
@@ -0,0 +1,7 @@
package com.demotest.app.model
data class ExchangeRequest(
val device_id: String,
val public_key: String,
)
@@ -0,0 +1,12 @@
package com.demotest.app.model
data class ExchangeResponse(
val code: String,
val message: String,
val success: Boolean,
val `data`: Data,
) {
data class Data(
val public_key: String,
)
}
@@ -0,0 +1,8 @@
package com.demotest.app.model
data class ExchangeTestRequest(
val device_id: String,
val encrypted_text: String,
val plain_text: String
)
@@ -0,0 +1,7 @@
package com.demotest.app.model
data class ExchangeTestResponse(
val code: String,
val message: String,
val success: Boolean,
)
@@ -0,0 +1,12 @@
package com.demotest.app.network
import com.demotest.app.model.ExchangeTestRequest
import com.demotest.app.model.ExchangeTestResponse
import retrofit2.Response
import retrofit2.http.*
interface ApiService {
@POST("API Name")
suspend fun testConnection(@Body request: ExchangeTestRequest): Response<ExchangeTestResponse>
}
@@ -0,0 +1,31 @@
package com.demotest.app.network
import android.util.Log.e
import com.demotest.app.app.network.Resource
import com.demotest.app.model.ErrorResponse
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import org.koin.core.logger.KOIN_TAG
import retrofit2.Response
abstract class BaseDataSource {
protected suspend fun <T> getResult(call: suspend () -> Response<T>): Resource<T> {
try {
val response = call()
val body = response.body()
if (response.isSuccessful) {
if (body != null) return Resource.success(body)
} else {
val gson = Gson()
val type = object : TypeToken<ErrorResponse>() {}.type
val errorResponse: ErrorResponse? =
gson.fromJson(response.errorBody()!!.charStream(), type)
return Resource.error(errorResponse?.message, body, response.code())
}
} catch (e: Exception) {
e(KOIN_TAG, e.message, e)
return Resource.error(e.message ?: e.toString(), null, 429)
}
return Resource.error(null, null, 429)
}
}
@@ -0,0 +1,29 @@
package com.demotest.app.app.network
data class Resource<out T>(
val status: Status, val data: T?, val message: String?,
val code: Int?
) {
companion object {
fun <T> success(data: T?): Resource<T> {
return Resource(Status.SUCCESS, data, null, null)
}
fun <T> error(msg: String?, data: T?, code: Int?): Resource<T> {
return Resource(Status.ERROR, data, msg, code)
}
fun <T> loading(data: T?): Resource<T> {
return Resource(Status.LOADING, data, null, null)
}
}
}
enum class Status {
SUCCESS,
ERROR,
LOADING
}
@@ -0,0 +1,48 @@
package com.demotest.app.network
import com.demotest.app.BuildConfig
import com.demotest.app.data.local.AppPreferences
import com.demotest.app.extensions.Constants
import com.demotest.app.network.ApiService
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.logging.HttpLoggingInterceptor
import org.koin.dsl.module
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
val networkModule = module {
single { provideRetrofit(get()) }
factory { provideApi(get()) }
}
fun provideRetrofit(pref: AppPreferences): Retrofit {
val interceptor = HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)
val okHttpClient = OkHttpClient().newBuilder()
.callTimeout(1, TimeUnit.MINUTES)
.writeTimeout(1, TimeUnit.MINUTES)
.readTimeout(1, TimeUnit.MINUTES)
.addInterceptor(interceptor)
.addInterceptor(Interceptor { chain ->
val request: Request =
chain.request().newBuilder()
.addHeader("Content-Type", Constants.CONTENT_TYPE)
.addHeader("Authorization", "")
.build()
val response = chain.proceed(request)
if (response.code == 401) Constants.isAuthorized.postValue(false)
response
}).build()
return Retrofit.Builder().baseUrl(BuildConfig.BASE_URL)
.client(okHttpClient)
.addConverterFactory(GsonConverterFactory.create())
.build()
}
fun provideApi(retrofit: Retrofit): ApiService = retrofit.create(ApiService::class.java)
@@ -0,0 +1,24 @@
package com.demotest.app.repositories
import androidx.lifecycle.LiveData
import androidx.lifecycle.liveData
import com.demotest.app.app.network.Resource
import com.demotest.app.data.remote.RemoteDataSource
import com.demotest.app.model.ExchangeTestRequest
import com.demotest.app.model.ExchangeTestResponse
import kotlinx.coroutines.Dispatchers
class APIRepository(
private val remoteDataSource: RemoteDataSource,
) {
fun testConnection(request: ExchangeTestRequest): LiveData<Resource<ExchangeTestResponse>> =
liveData(Dispatchers.IO) {
emit(Resource.loading(null))
val response = remoteDataSource.testConnection(request)
emit(response)
}
}
@@ -0,0 +1,20 @@
package com.demotest.app.ui
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import com.demotest.app.R
import com.demotest.app.databinding.FragmentAppStartBinding
import com.demotest.app.extensions.viewBinding
class AppStartFragment : Fragment(R.layout.fragment_app_start) {
private val binding by viewBinding(FragmentAppStartBinding::bind)
// private val pref by inject<AppPreferences>()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
}
}
@@ -0,0 +1,20 @@
package com.demotest.app.ui
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import com.demotest.app.R
import com.demotest.app.databinding.FragmentHomeBinding
import com.demotest.app.extensions.viewBinding
class HomeFragment : Fragment(R.layout.fragment_home){
private val binding by viewBinding(FragmentHomeBinding::bind)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
}
}
@@ -0,0 +1,11 @@
package com.demotest.app.app.viewmodels
import androidx.lifecycle.ViewModel
import com.demotest.app.repositories.APIRepository
class UserViewModel(
private val repository: APIRepository
) : ViewModel() {
}
BIN
View File
Binary file not shown.
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
@@ -0,0 +1,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>
+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true">
<LinearLayout
android:id="@+id/llBottom"
android:layout_width="match_parent"
android:layout_height="52sp"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
</LinearLayout>
<fragment
android:id="@+id/nav_host_fragment_activity_main"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@+id/llBottom"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/purple">
</androidx.constraintlayout.widget.ConstraintLayout>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraint"
android:layout_width="match_parent"
android:layout_height="?android:actionBarSize"
android:elevation="5sp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,5 @@
<?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" />
</adaptive-icon>
@@ -0,0 +1,5 @@
<?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" />
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mobile_navigation"
app:startDestination="@id/appStartFragment">
<fragment
android:id="@+id/homeFragment"
android:name="com.demotest.app.ui.HomeFragment"
android:label="Home"
tools:layout="@layout/fragment_home">
<argument
android:name="newUser"
app:argType="boolean"
android:defaultValue="false" />
</fragment>
<fragment
android:id="@+id/appStartFragment"
android:name="com.demotest.app.ui.AppStartFragment"
android:label="fragment_app_start"
tools:layout="@layout/fragment_app_start" />
</navigation>
+63
View File
@@ -0,0 +1,63 @@
<resources>
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
<item name="colorPrimary">@color/md_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_light_error</item>
<item name="colorErrorContainer">@color/md_theme_light_errorContainer</item>
<item name="colorOnError">@color/md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_light_background</item>
<item name="colorOnBackground">@color/md_theme_light_onBackground</item>
<item name="colorSurface">@color/md_theme_light_surface</item>
<item name="colorOnSurface">@color/md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorCompany">#0058c9</item>
<item name="colorOnCompany">#ffffff</item>
<item name="colorCompanyContainer">#d9e2ff</item>
<item name="colorOnCompanyContainer">#001944</item>
<item name="harmonizeCompany">false</item>
<item name="colorCompanymain">#0060aa</item>
<item name="colorOnCompanymain">#ffffff</item>
<item name="colorCompanymainContainer">#d3e3ff</item>
<item name="colorOnCompanymainContainer">#001c39</item>
<item name="harmonizeCompanymain">false</item>
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
<item name="android:statusBarColor">@color/black</item>
<!-- Text -->
<item name="android:textColorPrimary">@color/md_theme_light_secondary</item>
<!-- Active thumb color & Active track color(30% transparency) -->
<item name="colorControlActivated">@color/white</item>
<!-- Inactive thumb color -->
<item name="colorSwitchThumbNormal">@color/blue</item>
<!-- Inactive track color(30% transparency) -->
<item name="android:colorForeground">@color/white</item>
</style>
<style name="MyTabLayout" parent="Widget.Design.TabLayout">
<item name="tabTextAppearance">@style/MyTabTextAppearance</item>
</style>
<style name="MyTabTextAppearance" parent="TextAppearance.Design.Tab">
<item name="textAllCaps">false</item>
</style>
</resources>
+12
View File
@@ -0,0 +1,12 @@
<resources>
<attr name="colorCompany" format="color" />
<attr name="colorOnCompany" format="color" />
<attr name="colorCompanyContainer" format="color" />
<attr name="colorOnCompanyContainer" format="color" />
<attr name="harmonizeCompany" format="boolean" />
<attr name="colorCompanymain" format="color" />
<attr name="colorOnCompanymain" format="color" />
<attr name="colorCompanymainContainer" format="color" />
<attr name="colorOnCompanymainContainer" format="color" />
<attr name="harmonizeCompanymain" format="boolean" />
</resources>
+110
View File
@@ -0,0 +1,110 @@
<resources>
<color name="seed">#0075b2</color>
<color name="md_theme_light_primary">#3538CD</color>
<color name="md_theme_light_onPrimary">#FFFFFF</color>
<color name="md_theme_light_primaryContainer">#CDE5FF</color>
<color name="md_theme_light_onPrimaryContainer">#001D32</color>
<color name="md_theme_light_secondary">#30374F</color>
<color name="md_theme_light_onSecondary">#FFFFFF</color>
<color name="md_theme_light_secondaryContainer">#D4E4F6</color>
<color name="md_theme_light_onSecondaryContainer">#0D1D2A</color>
<color name="md_theme_light_tertiary">#3C57B7</color>
<color name="md_theme_light_onTertiary">#FFFFFF</color>
<color name="md_theme_light_tertiaryContainer">#DCE1FF</color>
<color name="md_theme_light_onTertiaryContainer">#001551</color>
<color name="md_theme_light_error">#BA1A1A</color>
<color name="md_theme_light_errorContainer">#FFDAD6</color>
<color name="md_theme_light_onError">#FFFFFF</color>
<color name="md_theme_light_onErrorContainer">#410002</color>
<color name="md_theme_light_background">#F9F9FB</color>
<color name="md_theme_light_onBackground">#1A1C1E</color>
<color name="md_theme_light_surface">#FCFCFF</color>
<color name="md_theme_light_onSurface">#1A1C1E</color>
<color name="md_theme_light_surfaceVariant">#DEE3EB</color>
<color name="md_theme_light_onSurfaceVariant">#42474E</color>
<color name="md_theme_light_outline">#DDDFEA</color>
<color name="md_theme_light_inverseOnSurface">#F0F0F4</color>
<color name="md_theme_light_inverseSurface">#2F3033</color>
<color name="md_theme_light_inversePrimary">#93CCFF</color>
<color name="md_theme_light_shadow">#000000</color>
<color name="md_theme_light_surfaceTint">#006398</color>
<color name="md_theme_light_outlineVariant">#C2C7CE</color>
<color name="md_theme_light_scrim">#000000</color>
<color name="md_theme_dark_primary">#155EEF</color>
<color name="md_theme_dark_onPrimary">#003351</color>
<color name="md_theme_dark_primaryContainer">#004B74</color>
<color name="md_theme_dark_onPrimaryContainer">#CDE5FF</color>
<color name="md_theme_dark_secondary">#B8C8DA</color>
<color name="md_theme_dark_onSecondary">#23323F</color>
<color name="md_theme_dark_secondaryContainer">#394857</color>
<color name="md_theme_dark_onSecondaryContainer">#D4E4F6</color>
<color name="md_theme_dark_tertiary">#B7C4FF</color>
<color name="md_theme_dark_onTertiary">#002681</color>
<color name="md_theme_dark_tertiaryContainer">#203E9E</color>
<color name="md_theme_dark_onTertiaryContainer">#DCE1FF</color>
<color name="md_theme_dark_error">#FFB4AB</color>
<color name="md_theme_dark_errorContainer">#93000A</color>
<color name="md_theme_dark_onError">#690005</color>
<color name="md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="md_theme_dark_background">#1A1C1E</color>
<color name="md_theme_dark_onBackground">#E2E2E5</color>
<color name="md_theme_dark_surface">#1A1C1E</color>
<color name="md_theme_dark_onSurface">#E2E2E5</color>
<color name="md_theme_dark_surfaceVariant">#42474E</color>
<color name="md_theme_dark_onSurfaceVariant">#C2C7CE</color>
<color name="md_theme_dark_outline">#DDDFEA</color>
<color name="md_theme_dark_inverseOnSurface">#1A1C1E</color>
<color name="md_theme_dark_inverseSurface">#E2E2E5</color>
<color name="md_theme_dark_inversePrimary">#006398</color>
<color name="md_theme_dark_shadow">#000000</color>
<color name="md_theme_dark_surfaceTint">#93CCFF</color>
<color name="md_theme_dark_outlineVariant">#42474E</color>
<color name="md_theme_dark_scrim">#000000</color>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
<color name="company">#4284FF</color>
<color name="companymain">#0062AE</color>
<color name="hintColor">#a8aab7</color>
<color name="background">#dddddd</color>
<color name="btnBg">#000A9B</color>
<color name="bgclr">#f5f5f5</color>
<color name="bgsetting">#1F2470</color>
<color name="lgGray">#D0D5DD</color>
<color name="blue">#0612C1</color>
<color name="darkBlue">#050841</color>
<color name="yellow">#FBBC05</color>
<color name="yellow_selected">#F8A629</color>
<color name="backgroundColor">#F9F9FB</color>
<color name="darkBackgroundColor">#232437</color>
<color name="bg_edt">#505050</color>
<color name="grey_font">#e3e3e3</color>
<color name="card_bg">#F0F0F5</color>
<color name="black_semi">#040404</color>
<color name="black_semi_2">#0F0F0F</color>
<color name="light_white">#B4B4B4</color>
<color name="dark_blue">#030B84</color>
<color name="light_blue">#A7AADE</color>
<color name="purple">#9F1AB1</color>
<color name="purple_light_2">#D6BBFB</color>
<color name="green">#008F00</color>
<color name="purple_dark">#6F1877</color>
<color name="purple_text_color">#BA24D5</color>
<color name="purple_dark_extra">#821890</color>
<color name="light_white_2">#F8F9FC</color>
<color name="dark_gray">#5D6B98</color>
<color name="divider_gray_dark">#B9C0D4</color>
<color name="purple_light">#FBE8FF</color>
<color name="text_selected">#071733</color>
<color name="text_un_selected">#667085</color>
<color name="text_un_selected_dark">#4A5578</color>
<color name="gray">#EFF1F5</color>
<color name="setting_bg">#DCDFEA</color>
<color name="invite_color">#111322</color>
<color name="setting_text_color">#404968</color>
<color name="setting_light_color">#DCDFEA</color>
<color name="delete_account_color">#475467</color>
<color name="delete_account_red_color">#D92D20</color>
<color name="one_time_password">#344054</color>
</resources>
+3
View File
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">My Application</string>
</resources>
+63
View File
@@ -0,0 +1,63 @@
<resources>
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
<item name="colorPrimary">@color/md_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_light_error</item>
<item name="colorErrorContainer">@color/md_theme_light_errorContainer</item>
<item name="colorOnError">@color/md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_light_background</item>
<item name="colorOnBackground">@color/md_theme_light_onBackground</item>
<item name="colorSurface">@color/md_theme_light_surface</item>
<item name="colorOnSurface">@color/md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorCompany">#0058c9</item>
<item name="colorOnCompany">#ffffff</item>
<item name="colorCompanyContainer">#d9e2ff</item>
<item name="colorOnCompanyContainer">#001944</item>
<item name="harmonizeCompany">false</item>
<item name="colorCompanymain">#0060aa</item>
<item name="colorOnCompanymain">#ffffff</item>
<item name="colorCompanymainContainer">#d3e3ff</item>
<item name="colorOnCompanymainContainer">#001c39</item>
<item name="harmonizeCompanymain">false</item>
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
<item name="android:statusBarColor">@color/black</item>
<!-- Text -->
<item name="android:textColorPrimary">@color/md_theme_light_secondary</item>
<!-- Active thumb color & Active track color(30% transparency) -->
<item name="colorControlActivated">@color/white</item>
<!-- Inactive thumb color -->
<item name="colorSwitchThumbNormal">@color/blue</item>
<!-- Inactive track color(30% transparency) -->
<item name="android:colorForeground">@color/white</item>
</style>
<style name="MyTabLayout" parent="Widget.Design.TabLayout">
<item name="tabTextAppearance">@style/MyTabTextAppearance</item>
</style>
<style name="MyTabTextAppearance" parent="TextAppearance.Design.Tab">
<item name="textAllCaps">false</item>
</style>
</resources>
BIN
View File
Binary file not shown.
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
+20
View File
@@ -0,0 +1,20 @@
buildscript {
ext {
kotlin_version = '1.8.10'
}
dependencies {
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
repositories {
mavenCentral()
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}
+24
View File
@@ -0,0 +1,24 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.enableJetifier=true
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
#Tue Dec 20 23:08:52 PKT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Vendored Executable
+185
View File
@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
Vendored
+89
View File
@@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+8
View File
@@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Dec 05 23:50:29 IST 2022
sdk.dir=/Users/kapilkumar/Library/Android/sdk
+17
View File
@@ -0,0 +1,17 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "DealHuntGo"
include ':app'