如何在片段中创建对象?是否有可能

时间:2016-12-02 07:29:00

标签: android-fragments

public class Fragmentone<Interface1> extends Fragment{

    public Interface1 Interface;

    @Override
    public View onCreateView(LayoutInflater inflater,
        ViewGroup container, Bundle savedInstanceState) {

        Interface = new Interface1 (this);

        return inflater.inflate(
        R.layout.fragment_two, container, false);
    }
}

显示错误

  

无法实例化Interface1

类型

0 个答案:

没有答案