1
У меня есть виджет вид, как показано ниже:
public class RemoteNumView extends FrameLayout {
, как называю я использую Roboguice так же, как в RoboActivity? Как показано ниже:roboguice впрыснуть в клиенте
@InjectView(R.id.btn_remote_control_num_0)
private TextView mText;
Полный код:
/**
* Created by bbcv on 13-12-12.
*/
public class RemoteNumView extends FrameLayout {
private IService mService;
@InjectView(R.id.btn_remote_control_num_0)
private TextView mText;
public RemoteNumView(Context context) {
super(context);
///
addView(LayoutInflater.from(context).inflate(R.layout.v_remote_control_fun,null));
}
public RemoteNumView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public RemoteNumView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void setService(IService service){
mService = service;
}
}
Любой человек может помочь?
И закончил с использованием ButterKnife лучшим решением. –