Closed Swordce closed 7 years ago
目前来说 Fragment 布局中的 ImageView 是没法做到的,只能将 Fragment 中的 ImageView 放到 activity 中,或者给 fragment 布局的容器设置 fitSystemWindow 为 false 试试
@Swordce
好的,多谢猴哥 @laobie
@Swordce 我发现你这个用错了,不是传 imageview 进来的,等会我更新下,你再试试是不是好了
@Swordce 最新的版本中有示例代码,你可以看看了
效果图:
界面布局:
<?xml version="1.0" encoding="utf-8"?> <com.zhy.autolayout.AutoLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
</com.zhy.autolayout.AutoLinearLayout>
fragment调用: @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view = inflater.inflate(R.layout.ticket, container, false); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {