| | |
| | | |
| | | return view; |
| | | } |
| | | |
| | | |
| | | |
| | | private void initView(View view) { |
| | | mRecy = (RecyclerView) view.findViewById(R.id.recy); |
| | | ((MainActivity)_mActivity).btn_return.setVisibility(View.VISIBLE); |
| | |
| | | mAdapter.setOnItemClickListener(new OnItemClickListener() { |
| | | @Override |
| | | public void onItemClick(int position, View view) { |
| | | Toast.makeText(_mActivity, position+"", Toast.LENGTH_SHORT).show(); |
| | | if (getParentFragment() instanceof BaseSettingFragment){ |
| | | ((BaseSettingFragment)getParentFragment()).start(ShopFragment.newInstance(items.get(position))); |
| | | switch (position){ |
| | | case 0: |
| | | if (getParentFragment() instanceof BaseSettingFragment){ |
| | | ((BaseSettingFragment)getParentFragment()).start(ShopFragment.newInstance(items.get(position))); |
| | | } |
| | | break; |
| | | case 1: |
| | | Toast.makeText(_mActivity, "蓝牙扫描", Toast.LENGTH_SHORT).show(); |
| | | if (getParentFragment() instanceof BaseSettingFragment){ |
| | | ((BaseSettingFragment)getParentFragment()).start( BleScanFragment.newInstance()); |
| | | } |
| | | |
| | | break; |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |