android 在fragment中获取界面的UI组件
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.wei_xin_fragment, container, false); button = (Button) view.findViewById(R.id.press_button); registerForContextMenu(button); return view; }
本文出自 无忧之路 - 博客园