美文网首页
自定义TimePicker的title

自定义TimePicker的title

作者: Spiritium | 来源:发表于2018-11-11 20:01 被阅读0次

    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>
    

    相关文章

      网友评论

          本文标题:自定义TimePicker的title

          本文链接:https://www.haomeiwen.com/subject/kkrffqtx.html