refs #6284 feat:update and review xml

This commit is contained in:
Sergio De la torre 2024-02-27 09:44:17 +01:00
parent 1bfb376e19
commit cb80d58006
8 changed files with 27 additions and 29 deletions

View File

@ -7,6 +7,7 @@ import android.os.Handler
import android.os.Looper import android.os.Looper
import es.verdnatura.dataStore.DataStoreLocal import es.verdnatura.dataStore.DataStoreLocal
import es.verdnatura.di.viewModelModule import es.verdnatura.di.viewModelModule
import es.verdnatura.domain.ConstAndValues
import es.verdnatura.domain.RestClient import es.verdnatura.domain.RestClient
import es.verdnatura.domain.SalixService import es.verdnatura.domain.SalixService
import es.verdnatura.domain.VerdnaturaService import es.verdnatura.domain.VerdnaturaService
@ -16,6 +17,7 @@ import es.verdnatura.presentation.common.LoginListener
import es.verdnatura.presentation.common.MainActivityListener import es.verdnatura.presentation.common.MainActivityListener
import es.verdnatura.presentation.common.SignListener import es.verdnatura.presentation.common.SignListener
import es.verdnatura.presentation.view.component.CustomDialogMainActivity import es.verdnatura.presentation.view.component.CustomDialogMainActivity
import kotlinx.coroutines.runBlocking
import org.koin.android.ext.koin.androidContext import org.koin.android.ext.koin.androidContext
import org.koin.core.context.loadKoinModules import org.koin.core.context.loadKoinModules
import org.koin.core.context.startKoin import org.koin.core.context.startKoin
@ -65,9 +67,12 @@ class MobileApplication : Application(), InteceptorListener {
loadKoinModules(moduleList) loadKoinModules(moduleList)
} }
var restClient = RestClient(this, this)
silex = restClient.restClient runBlocking { dataStoreApp.editDataStoreKey(ConstAndValues.BASEURLSALIX,ConstAndValues.BASE_URL_SALIX) }
val restClient = RestClient(this, this)
salix = restClient.salixClient salix = restClient.salixClient
silex = restClient.restClient
} }
@ -77,7 +82,6 @@ class MobileApplication : Application(), InteceptorListener {
fun messageToast(isError: Boolean, message: String) { fun messageToast(isError: Boolean, message: String) {
val playSound = when (isError) { val playSound = when (isError) {
null -> null
false -> mpok false -> mpok
true -> mperror true -> mperror
} }
@ -111,11 +115,6 @@ class MobileApplication : Application(), InteceptorListener {
fun getLanguage(): String { fun getLanguage(): String {
val settings = this.resources.configuration val settings = this.resources.configuration
return if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { return settings.locales.get(0).language
settings.locales.get(0).language
} else {
@Suppress("DEPRECATION")
settings.locale.language
}
} }
} }

View File

@ -34,6 +34,7 @@
app:layout_constraintTop_toBottomOf="@id/divider" app:layout_constraintTop_toBottomOf="@id/divider"
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu" android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
android:padding="@dimen/navigation_row_min_padding" android:padding="@dimen/navigation_row_min_padding"
android:visibility="gone"
> >
@ -179,7 +180,7 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/ajustess_items" android:id="@+id/setttings_items"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@ -31,7 +31,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
android:visibility="gone"></com.google.android.material.textfield.TextInputLayout> android:visibility="gone">
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/edit_matricula" android:id="@+id/edit_matricula"

View File

@ -196,7 +196,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false" android:clipToPadding="false"
tools:listitem="@layout/item_card_row" /> tools:listitem="@layout/item_card_row" />
</RelativeLayout>> </RelativeLayout>
</LinearLayout> </LinearLayout>

View File

@ -39,7 +39,8 @@
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
app:layout_constraintStart_toStartOf="@id/textview_welcome" app:layout_constraintStart_toStartOf="@id/textview_welcome"
app:layout_constraintTop_toBottomOf="@id/textview_welcome"> app:layout_constraintTop_toBottomOf="@id/textview_welcome"
android:visibility="gone">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/edittext_server" android:id="@+id/edittext_server"
@ -55,7 +56,6 @@
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" /> android:textColorHint="@android:color/darker_gray" />

View File

@ -23,7 +23,7 @@
tool:listitem="@layout/item_pasilleros_main_menu" tool:listitem="@layout/item_pasilleros_main_menu"
android:paddingTop="@dimen/toolbar_height"/> android:paddingTop="@dimen/toolbar_height"/>
' <include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -31,7 +31,6 @@
android:layout_height="0dp" android:layout_height="0dp"
android:foregroundGravity="fill_horizontal|center_horizontal" android:foregroundGravity="fill_horizontal|center_horizontal"
android:isScrollContainer="false" android:isScrollContainer="false"
android:paddingTop="@dimen/toolbar_height"
android:splitMotionEvents="false" android:splitMotionEvents="false"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -39,7 +38,8 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:stackFromEnd="false" app:stackFromEnd="false"
tool:listitem="@layout/item_pasilleros_main_menu" /> tool:listitem="@layout/item_pasilleros_main_menu"/>
<!-- android:paddingTop="@dimen/toolbar_height" -->
<include <include
android:id="@+id/main_toolbar_design" android:id="@+id/main_toolbar_design"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -9,7 +9,6 @@
android:background="@color/verdnatura_black"> android:background="@color/verdnatura_black">
<EditText <EditText
android:id="@+id/scan_input" android:id="@+id/scan_input"
style="@style/ScanLineTextSearch" style="@style/ScanLineTextSearch"
@ -23,8 +22,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/> app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -45,8 +43,7 @@
tools:listitem="@layout/item_article_row_presacador" /> tools:listitem="@layout/item_article_row_presacador" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<include
' <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -55,16 +52,16 @@
<LinearLayout <LinearLayout
android:id="@+id/splash_progress" android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6" android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent">
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView <com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content" android:layout_width="wrap_content"