经测试,在国产手机上(小米API25,华为)中 通过 inflate()
生成的View
View itemView = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false);
xml布局中的根节点的android:layout_margin=""
是不会生效的 ,但是在三星手机(API24)上是有效果的。
经测试,在国产手机上(小米API25,华为)中 通过 inflate()
生成的View
View itemView = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false);
xml布局中的根节点的android:layout_margin=""
是不会生效的 ,但是在三星手机(API24)上是有效果的。
转载于:https://juejin.im/post/5a61b057f265da3e364155d2