refs #6574 feat:ui
This commit is contained in:
parent
40baca19b5
commit
2be1c44f83
|
@ -21,6 +21,7 @@ import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
import kotlin.math.abs
|
||||||
|
|
||||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||||
class WebFragment(
|
class WebFragment(
|
||||||
|
@ -53,11 +54,18 @@ class WebFragment(
|
||||||
velocityX: Float,
|
velocityX: Float,
|
||||||
velocityY: Float
|
velocityY: Float
|
||||||
): Boolean {
|
): Boolean {
|
||||||
|
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) {
|
if (velocityX > 100 && velocityY < 2000) {
|
||||||
binding.webView.goBack()
|
binding.webView.goBack()
|
||||||
return true
|
return true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +74,7 @@ class WebFragment(
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility", "SetJavaScriptEnabled")
|
||||||
private fun setWeb() {
|
private fun setWeb() {
|
||||||
|
|
||||||
binding.webView.webChromeClient = WebChromeClient()
|
binding.webView.webChromeClient = WebChromeClient()
|
||||||
|
@ -143,7 +151,7 @@ class WebFragment(
|
||||||
printAdapter,
|
printAdapter,
|
||||||
PrintAttributes.Builder().build()
|
PrintAttributes.Builder().build()
|
||||||
).also { printJob ->
|
).also { printJob ->
|
||||||
|
println("job printed")
|
||||||
// Save the job object for later status checking
|
// Save the job object for later status checking
|
||||||
// printJobs += printJob
|
// printJobs += printJob
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,14 +28,13 @@ class ItemShelvingLogAdapter(
|
||||||
holder.bind(items[position])
|
holder.bind(items[position])
|
||||||
holder.binding.root.setOnClickListener {
|
holder.binding.root.setOnClickListener {
|
||||||
|
|
||||||
val shelvingFk = items[position].shelvingFk
|
if (items[position].shelvingFk.isNullOrEmpty()) {
|
||||||
if (!shelvingFk.isNullOrEmpty()) {
|
|
||||||
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
title = holder.binding.root.context.getString(
|
title = holder.binding.root.context.getString(
|
||||||
R.string.titleUbicator
|
R.string.titleUbicator
|
||||||
)
|
)
|
||||||
), shelvingFk
|
),items[position].shelvingFk!!
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
|
||||||
android:text="@string/itemfk"
|
android:text="@string/itemfk"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
@ -57,15 +56,6 @@
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
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
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -50,12 +50,13 @@
|
||||||
android:id="@+id/layout_icons_actions"
|
android:id="@+id/layout_icons_actions"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="0.75"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/textinputlayout_prioridad"
|
android:id="@+id/textinputlayout_prioridad"
|
||||||
android:layout_width="100dp"
|
android:layout_width="96dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColorHint="@android:color/darker_gray">
|
android:textColorHint="@android:color/darker_gray">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue