使用Android-PickerView修改item的字型大小(坑)
阿新 • • 發佈:2019-01-08
這裡記錄一個使用Android-PickerView修改字型大小的方法。預設字型大小是20sp,天坑啊。
2、找到lib目錄下的WheelView
3、修改這個bool值
4、然後到xml檔案中修改pickerview_textSize就可以了
需要新增自動導包
xmlns:testsss="http://schemas.android.com/apk/res-auto"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:testsss="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
layout="@layout/include_pickerview_topbar"
android:layout_width="match_parent"
android:layout_height ="@dimen/pickerview_topbar_height" />
<LinearLayout
android:id="@+id/optionspicker"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="horizontal">
<com.bigkoo.pickerview.lib.WheelView
android:id="@+id/options1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
testsss:pickerview_textSize="15sp" />
<com.bigkoo.pickerview.lib.WheelView
android:id="@+id/options2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
testsss:pickerview_textSize="15sp" />
<com.bigkoo.pickerview.lib.WheelView
android:id="@+id/options3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
testsss:pickerview_textSize="15sp" />
</LinearLayout>
</LinearLayout>
總結:繼續踩坑。這個PickerView還是很方便的,繼續深入~