自定义TimePicker的title

2018-11-11  本文已影响0人  Spiritium

https://stackoverflow.com/questions/31976707/how-to-set-a-custom-title-on-time-picker

Java代码

        LayoutInflater inflater = this.getLayoutInflater();
        View dialogView = inflater.inflate(R.layout.text_layout, null);
        TextView texts=(TextView) dialogView.findViewById(R.id.textss);
        texts.setText("Start Time");
        tpd.setCustomTitle(dialogView);

XML布局

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="10dp">
<TextView
    android:id="@+id/textss"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
</RelativeLayout>
上一篇 下一篇

猜你喜欢

热点阅读