Bigkoo / Android-PickerView

This is a picker view for android , support linkage effect, timepicker and optionspicker.(时间选择器、省市区三级联动)
Apache License 2.0
13.42k stars 3.44k forks source link

WheelView滚轮控件高度在代码与xml中设置match_parent无效,只有setLineSpacingMultiplier方法设置间距倍数吗?没有提供设置高度的外部方法吗? #1021

Open chen-fuhai opened 1 year ago

chen-fuhai commented 1 year ago

`<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/optionspicker" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/transparent" android:gravity="center" android:minHeight="@dimen/dp_250" android:orientation="horizontal" android:paddingStart="@dimen/dp_20" android:paddingTop="@dimen/dp_25" android:paddingEnd="@dimen/dp_20" android:paddingBottom="@dimen/dp_25">

<com.contrarywind.view.WheelView
    android:id="@+id/options1"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:background="@color/text_red_color" />

<com.contrarywind.view.WheelView
    android:id="@+id/options2"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1" />

<com.contrarywind.view.WheelView
    android:id="@+id/options3"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1" />

`