Android ButterKnife绑定include布局失败
天蓬老师
天蓬老师 2017-04-17 16:50:26
0
3
812
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
大家讲道理

Try filling in the id for Toolbar

伊谢尔伦

You don’t need merge in this case, just use Toolbar directly as the root element of layout_toolbar.xml

阿神

In fact, starting from the principle, you will easily understand that what you want to bind is the control in the include, not the include, so it is natural to define the identification ID for the control, otherwise the object to be bound cannot be identified. And the essence of ButterKnife is to use findViewById. If you manually use the findViewById method, you will first get the include object, and then find the control to be bound by ViewById.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template