动态和资料页面高度调整
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
package com.yizhuan.erban.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
|
||||
/**
|
||||
* @author jack
|
||||
* @Description
|
||||
@@ -31,8 +35,10 @@ public class ContentWrapViewPager extends ViewPager {
|
||||
child.measure(widthMeasureSpec,
|
||||
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
|
||||
int h = child.getMeasuredHeight();
|
||||
if (h > height) //采用最大的view的高度。
|
||||
height = h;
|
||||
if(i==0){
|
||||
height=h;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
|
||||
|
@@ -296,7 +296,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_secondary_radius_10"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_60"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintVertical_bias="0"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_skill">
|
||||
|
Reference in New Issue
Block a user