1
에 주입? 아래로 :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를 사용하게되었습니다. –