| | |
| | | package cn.com.basic.face.fragment;
|
| | |
|
| | | import android.os.Bundle;
|
| | | import android.support.v4.app.Fragment;
|
| | | import android.support.v4.app.FragmentManager;
|
| | | import android.view.LayoutInflater;
|
| | |
| | | @ViewInject(R.id.fragment_left_right_frame_layout_right)
|
| | | private FrameLayout fragment_left_right_frame_layout_right;
|
| | |
|
| | | @ViewInject(R.id.fragment_device_right_camera1_brand)
|
| | | private EditText fragment_device_right_camera1_brand;
|
| | | @ViewInject(R.id.fragment_device_right_camera1_ip)
|
| | | private EditText fragment_device_right_camera1_ip;
|
| | |
|
| | | private View wifiView;
|
| | | private View lanView;
|
| | | private View schoolView;
|
| | |
| | | fragment_device_left_school_check_box.setChecked(false);
|
| | | fragment_device_left_camera1_check_box.setChecked(false);
|
| | | fragment_device_left_camera2_check_box.setChecked(false);
|
| | | fragment_left_right_frame_layout_right.removeAllViews();
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected void initViews(View view, Bundle savedInstanceState) {
|
| | | super.initViews(view, savedInstanceState);
|
| | | wifiView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_wifi, null);
|
| | | lanView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_lan, null);
|
| | | schoolView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_school, null);
|
| | | camera1View = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_camera1, null);
|
| | | camera2View = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_camera2, null);
|
| | | ViewUtils.inject(this, wifiView);
|
| | | ViewUtils.inject(this, lanView);
|
| | | ViewUtils.inject(this, schoolView);
|
| | | ViewUtils.inject(this, camera1View);
|
| | | ViewUtils.inject(this, camera2View);
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_device_left_wifi_check_box)
|
| | | public void fragment_device_left_wifi_check_box_click(View view) {
|
| | | clearAll();
|
| | | fragment_device_left_wifi_check_box.setChecked(true);
|
| | |
|
| | | fragment_left_right_frame_layout_right.removeAllViews();
|
| | | if (wifiView == null) {
|
| | | wifiView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_wifi, null);
|
| | | }
|
| | | fragment_left_right_frame_layout_right.addView(wifiView);
|
| | | }
|
| | |
|
| | |
| | | public void fragment_device_left_lan_check_box_click(View view) {
|
| | | clearAll();
|
| | | fragment_device_left_lan_check_box.setChecked(true);
|
| | |
|
| | | fragment_left_right_frame_layout_right.removeAllViews();
|
| | | if (lanView == null) {
|
| | | lanView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_lan, null);
|
| | | }
|
| | | fragment_left_right_frame_layout_right.addView(lanView);
|
| | | }
|
| | |
|
| | |
| | | public void fragment_device_left_school_check_box_click(View view) {
|
| | | clearAll();
|
| | | fragment_device_left_school_check_box.setChecked(true);
|
| | |
|
| | | fragment_left_right_frame_layout_right.removeAllViews();
|
| | | if (schoolView == null) {
|
| | | schoolView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_school, null);
|
| | | }
|
| | | fragment_left_right_frame_layout_right.addView(schoolView);
|
| | | }
|
| | |
|
| | |
| | | public void fragment_device_left_camera1_check_box_click(View view) {
|
| | | clearAll();
|
| | | fragment_device_left_camera1_check_box.setChecked(true);
|
| | |
|
| | | fragment_left_right_frame_layout_right.removeAllViews();
|
| | | if (camera1View == null) {
|
| | | camera1View = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_camera1, null);
|
| | | }
|
| | | fragment_left_right_frame_layout_right.addView(camera1View);
|
| | | }
|
| | |
|
| | |
| | | public void fragment_device_left_camera2_check_box_click(View view) {
|
| | | clearAll();
|
| | | fragment_device_left_camera2_check_box.setChecked(true);
|
| | |
|
| | | fragment_left_right_frame_layout_right.removeAllViews();
|
| | | if (camera2View == null) {
|
| | | camera2View = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right_camera2, null);
|
| | | }
|
| | | fragment_left_right_frame_layout_right.addView(camera2View);
|
| | | }
|
| | |
|