| | |
| | | @ViewInject(R.id.fragment_register_remark)
|
| | | private RegisterRightFieldTextView fragment_register_remark;
|
| | | @ViewInject(R.id.fragment_register_choose_photo)
|
| | | private SimpleDraweeView fragment_register_choose_photo;
|
| | | private ImageView fragment_register_choose_photo;
|
| | | @ViewInject(R.id.fragment_register_update_photo)
|
| | | private ImageView fragment_register_update__photo;
|
| | | private ImageView fragment_register_update_photo;
|
| | | @ViewInject(R.id.fragment_register_id_card_photo)
|
| | | private ImageView fragment_register_id_card_photo;
|
| | | @ViewInject(R.id.fragment_register_linear_layout)
|
| | | private LinearLayout fragment_register_linear_layout;
|
| | |
|
| | | private static final int PICK_IMAGE_REQUEST = 1;
|
| | | private static final int fragment_register_choose_photo_ = 1;
|
| | | private static final int fragment_register_update_photo_ = 2;
|
| | | private static final int fragment_register_id_card_photo_ = 3;
|
| | |
|
| | | private static RegisterFragment instance = new RegisterFragment();
|
| | |
|
| | |
| | | @Override
|
| | | public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
| | | super.onActivityResult(requestCode, resultCode, data);
|
| | |
|
| | | if (requestCode == PICK_IMAGE_REQUEST && resultCode == Activity.RESULT_OK && data != null && data.getData() != null) {
|
| | | if (requestCode == fragment_register_choose_photo_ && resultCode == Activity.RESULT_OK && data != null && data.getData() != null) {
|
| | | Uri uri = data.getData();
|
| | | try {
|
| | | Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri);
|
| | | fragment_register_update__photo.setImageBitmap(bitmap);
|
| | | fragment_register_choose_photo.setImageBitmap(bitmap);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | if (requestCode == fragment_register_update_photo_ && resultCode == Activity.RESULT_OK && data != null && data.getData() != null) {
|
| | | Uri uri = data.getData();
|
| | | try {
|
| | | Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri);
|
| | | fragment_register_update_photo.setImageBitmap(bitmap);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | if (requestCode == fragment_register_id_card_photo_ && resultCode == Activity.RESULT_OK && data != null && data.getData() != null) {
|
| | | Uri uri = data.getData();
|
| | | try {
|
| | | Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri);
|
| | | fragment_register_id_card_photo.setImageBitmap(bitmap);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_register_back)
|
| | | public void fragment_register_back_click(View view) {
|
| | | MainActivity.selectPage(0);
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_register_choose_photo)
|
| | | public void fragment_register_choose_photo_click(View view) {
|
| | | Toast.makeText(getActivity(), "选择人物快照", Toast.LENGTH_SHORT).show();
|
| | | Intent intent = new Intent();
|
| | | intent.setType("image/*");
|
| | | intent.setAction(Intent.ACTION_GET_CONTENT);
|
| | | startActivityForResult(Intent.createChooser(intent, "选择图片"), fragment_register_choose_photo_);
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_register_update_photo)
|
| | |
| | | Intent intent = new Intent();
|
| | | intent.setType("image/*");
|
| | | intent.setAction(Intent.ACTION_GET_CONTENT);
|
| | | startActivityForResult(Intent.createChooser(intent, "选择图片"), PICK_IMAGE_REQUEST);
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_register_back)
|
| | | public void fragment_register_back_click(View view) {
|
| | | MainActivity.selectPage(0);
|
| | | startActivityForResult(Intent.createChooser(intent, "选择图片"), fragment_register_update_photo_);
|
| | | }
|
| | |
|
| | | @OnClick(R.id.fragment_register_id_card_photo)
|
| | | public void fragment_register_id_card_photo_click(View view) {
|
| | | Toast.makeText(getActivity(), "证件快照", Toast.LENGTH_SHORT).show();
|
| | | Intent intent = new Intent();
|
| | | intent.setType("image/*");
|
| | | intent.setAction(Intent.ACTION_GET_CONTENT);
|
| | | startActivityForResult(Intent.createChooser(intent, "选择图片"), fragment_register_id_card_photo_);
|
| | | }
|
| | |
|
| | | @Override
|