关于继承Fragment的事

来源:互联网 发布:戴尔公司待遇 知乎 编辑:程序博客网 时间:2024/06/06 15:52

如果想要获取Fragment内的控件 可在onCreateView()方法中得到

比如

View view = inflater.inflate(R.layout.quantity,container,false);
bt_quantity =(Button)view.findViewById(R.id.bt_quantity);



如果Fragment中需要用到参数为activity类型的 方法  

   可用getActivity() 作为参数

比如

LocationManagerProxy.getInstance(getActivity());

1 0