版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wdx_1136346879/article/details/88452863
开始是这么写的
<com.xfs.fsyuncai.ui.balance.payandsendtype.SelfRaiseTimeView
android:layout_below="@+id/line3"
android:id="@+id/self_raise_time_view"
android:layout_width=“match_parent”
android:layout_height=“wrap_content”/>
自定义的LinearLayout也是Liearlayout呀,是有方向的,所以
在布局文件中 添加 android:orientation=“vertical”
<com.xfs.fsyuncai.ui.balance.payandsendtype.SelfRaiseTimeView
android:orientation="vertical"
android:layout_below="@+id/line3"
android:id="@+id/self_raise_time_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
或者 可以在构造方法中添加 setOrientation(VERTICAL);
现在显示布局就完整了.