Project Setup
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -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")
|
||||
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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
|
||||
|
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>
|
||||
@@ -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>
|
||||
@@ -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() {
|
||||
|
||||
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 982 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">My Application</string>
|
||||
</resources>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||