Risolta anomalia altezza dialog basket LU

This commit is contained in:
Giuseppe Scorrano 2020-06-08 18:40:02 +02:00
parent d388d1d0a4
commit efb27760e4
6 changed files with 15 additions and 13 deletions

View File

@ -57,6 +57,11 @@ public class DeactivatableViewPager extends ViewPager implements Animation.Anima
height = getMinimumHeight();
}
int displayHeight = (int)(getResources().getDisplayMetrics().heightPixels*0.77);
if(height > displayHeight) height = displayHeight;
int newHeight = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
if (/*getLayoutParams().height != 0 && */heightMeasureSpec != height && height > 0 && height < 100000) {
// animate()

View File

@ -75,6 +75,8 @@ public class DialogBasketLU {
mDialog.setOnShowListener(v -> {
viewPagerAdapter.getViewModel(R.layout.dialog_basket_lu__page2).setOnConfirmClickListener(data -> {
MtbColt mtbColt = (MtbColt) data;

View File

@ -45,7 +45,7 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
@Override
public void onShow() {
this.mBinding.getRoot().requestLayout();
mBinding.constraintLayout.setMaxHeight((int) (mContext.getResources().getDisplayMetrics().heightPixels * 0.75));

View File

@ -60,7 +60,7 @@ public class DialogBasketLU_Page2_ViewModel extends DialogBasketLU_BaseViewModel
@Override
public void onShow() {
this.mBinding.getRoot().getParent().requestLayout();
}
@Override

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/base_root"
@ -13,7 +12,6 @@
app:cardElevation="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -23,8 +21,6 @@
android:paddingEnd="8dp"
android:paddingBottom="16dp">
<TextView
android:id="@+id/title_text"
android:layout_width="match_parent"
@ -37,16 +33,13 @@
android:id="@+id/viewpager"
android:animateLayoutChanges="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
</LinearLayout>
</androidx.cardview.widget.CardView>
</layout>

View File

@ -3,14 +3,15 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.core.widget.NestedScrollView
android:id="@+id/myScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:fillViewport="true">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
@ -26,6 +27,7 @@
android:id="@+id/dialog_basket_lu__mtb_colr_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />