-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BaseFragement 无Butterknife和mView对象 #126
Comments
因为我在其他地方已经做了,你使用框架, 你不用担心 bind 的问题, butterknife 是可以正常使用的 |
那请问一下,您是在哪里对butterknife进行绑定和回收的呢 |
恩,好的,太感谢了o( ̄︶ ̄)o |
详细解答在这里,把相同的问题定位在一起 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问为什么不在BaseFragament中使用butterknift
和创建view对象呢,像这样
@nullable
@OverRide
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mInflater = inflater;
if (null == rootView){
rootView = inflater.inflate(getLayoutId(),null);
ButterKnife.bind(this,rootView);
}else {
ViewGroup viewGroup = (ViewGroup) rootView.getParent();
if (null != viewGroup){
viewGroup.removeView(rootView);
}
}
return rootView;
}
The text was updated successfully, but these errors were encountered: