Android Fragment ButterKnife

沒法綁定Fragmentjava

錯誤代碼ide

@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_elec,container,false);
        ButterKnife.bind(this,view);
        return  inflater.inflate(R.layout.fragment_elec,container,false);
    }

正確代碼this

[@Override](https://my.oschina.net/u/1162528)
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_elec,container,false);
        ButterKnife.bind(this,view);
        return view;
    }

==return==.net

地址不同。code

相關文章
相關標籤/搜索