| | |
| | | import android.view.LayoutInflater;
|
| | | import android.view.View;
|
| | | import android.widget.CheckBox;
|
| | | import android.widget.RadioButton;
|
| | | import android.widget.RelativeLayout;
|
| | | import android.widget.TextView;
|
| | | import android.widget.Toast;
|
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.R;
|
| | | import cn.com.basic.face.base.LeftRightBaseFragment;
|
| | | import cn.com.basic.face.base.MainActivity;
|
| | |
|
| | | import com.lidroid.xutils.ViewUtils;
|
| | | import com.lidroid.xutils.view.annotation.ViewInject;
|
| | | import com.lidroid.xutils.view.annotation.event.OnClick;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | public class DeviceFragment extends LeftRightBaseFragment {
|
| | | private View mViewLeft,mViewRight;
|
| | | private RelativeLayout mLayoutWifi,mLayoutLandline,mLayoutSchool,mLayoutCamera1,mLayoutCamera2;
|
| | | private TextView mTvWifi,mTvLandline,mTvSchool,mTvCamera1,mTvCamera2;
|
| | | private CheckBox mCheckWifi,mCheckLandline,mCheckSchool,mCheckCamera1,mCheckCamera2;
|
| | | private List<CheckBox> listCheck = new ArrayList<>();
|
| | | public static DeviceFragment newInstance() {
|
| | | return new DeviceFragment();
|
| | |
|
| | | @ViewInject(R.id.fragment_device_left_wifi_check_box)
|
| | | private RadioButton fragment_device_left_wifi_check_box;
|
| | |
|
| | | private static DeviceFragment instance = new DeviceFragment();
|
| | | public static DeviceFragment getInstance() {
|
| | | return instance;
|
| | | }
|
| | |
|
| | | public View addLeftLayout() {
|
| | | mViewLeft = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_left,null);
|
| | | ViewUtils.inject(this, mViewLeft);
|
| | | return mViewLeft;
|
| | | public int[] getLeftRightLayoutIds() {
|
| | | return new int[]{R.layout.fragment_device_left, R.layout.fragment_device_right};
|
| | | }
|
| | |
|
| | | public View addRightLayout() {
|
| | | mViewRight = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_right,null);
|
| | | return mViewRight;
|
| | | }
|
| | |
|
| | |
|
| | | @OnClick(R.id.fragment_device_back)
|
| | | public void back(View view){
|
| | | MainActivity.selectPage(0);
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_device_left_wifi_relative_layout)
|
| | | public void fragment_device_left_wifi_relative_layout_click(View view) {
|
| | | Toast.makeText(MainActivity.getInstance(), "eh", Toast.LENGTH_SHORT).show();
|
| | | fragment_device_left_wifi_check_box.setChecked(!fragment_device_left_wifi_check_box.isSelected());
|
| | | }
|
| | |
|
| | | }
|