refs #6574 feat:ui

This commit is contained in:
Sergio De la torre 2024-04-04 11:56:13 +02:00
parent 40baca19b5
commit 2be1c44f83
4 changed files with 22 additions and 24 deletions

View File

@ -21,6 +21,7 @@ import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.view.component.CustomDialog
import org.json.JSONObject
import kotlin.math.abs
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class WebFragment(
@ -53,9 +54,16 @@ class WebFragment(
velocityX: Float,
velocityY: Float
): Boolean {
if (velocityX > 100 && velocityY < 2000) {
binding.webView.goBack()
return true
val deltaX = (e2.x - e1?.x!!)
val deltaY = (e2.y - e1.y)
val deltaAbsX = abs(deltaX)
val deltaAbsY = abs(deltaY)
if (deltaAbsX > deltaAbsY) {
if (velocityX > 100 && velocityY < 2000) {
binding.webView.goBack()
return true
}
}
return false
@ -66,7 +74,7 @@ class WebFragment(
super.onViewCreated(view, savedInstanceState)
}
@SuppressLint("ClickableViewAccessibility")
@SuppressLint("ClickableViewAccessibility", "SetJavaScriptEnabled")
private fun setWeb() {
binding.webView.webChromeClient = WebChromeClient()
@ -101,9 +109,9 @@ class WebFragment(
binding.mainToolbar.toolbarTitle.text =
buildString {
append(getString(R.string.item))
append(JSONObject(entryPoint).get("entryPoint").toString())
}
append(getString(R.string.item))
append(JSONObject(entryPoint).get("entryPoint").toString())
}
val listIcons: ArrayList<ImageView> = ArrayList()
val iconPrint = ImageView(context)
@ -143,7 +151,7 @@ class WebFragment(
printAdapter,
PrintAttributes.Builder().build()
).also { printJob ->
println("job printed")
// Save the job object for later status checking
// printJobs += printJob
}

View File

@ -28,14 +28,13 @@ class ItemShelvingLogAdapter(
holder.bind(items[position])
holder.binding.root.setOnClickListener {
val shelvingFk = items[position].shelvingFk
if (!shelvingFk.isNullOrEmpty()) {
if (items[position].shelvingFk.isNullOrEmpty()) {
onPasillerosItemClickListener.onPasillerosItemClickListener(
PasillerosItemVO(
title = holder.binding.root.context.getString(
R.string.titleUbicator
)
), shelvingFk
),items[position].shelvingFk!!
)
}

View File

@ -43,7 +43,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/itemfk"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
@ -57,15 +56,6 @@
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.25"
android:gravity="end"
android:text="@string/parking"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
android:visibility="gone" />
<TextView
android:layout_width="match_parent"

View File

@ -50,12 +50,13 @@
android:id="@+id/layout_icons_actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
android:layout_weight="0.75"
android:orientation="horizontal"
>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_prioridad"
android:layout_width="100dp"
android:layout_width="96dp"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray">