From 17cde0d2d365a354272fd3dd5162bea918d42094 Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 13 四月 2017 11:27:48 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java | 27 +++++++++ VisitFace/DemoForBsk/app/src/main/res/layout/fragment_register.xml | 139 +++++++++++++++++++++++++++++++++++++--------- VisitFace/DemoForBsk/app/src/main/res/drawable/u117.png | 0 VisitFace/DemoForBsk/app/src/main/res/drawable/u45.png | 0 4 files changed, 139 insertions(+), 27 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java index 57fbcb4..a538fa5 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java +++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java @@ -10,6 +10,7 @@ import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; +import android.widget.TextView; import android.widget.Toast; import com.bsk.zhangbo.demoforbsk.R; @@ -71,6 +72,20 @@ private ImageView fragment_register_id_card_photo; @ViewInject(R.id.fragment_register_linear_layout) private LinearLayout fragment_register_linear_layout; + + @ViewInject(R.id.fragment_register_choose_photo_placeholder_image) + private ImageView fragment_register_choose_photo_placeholder_image; + @ViewInject(R.id.fragment_register_update_photo_placeholder_image) + private ImageView fragment_register_update_photo_placeholder_image; + @ViewInject(R.id.fragment_register_id_card_photo_placeholder_image) + private ImageView fragment_register_id_card_photo_placeholder_image; + + @ViewInject(R.id.fragment_register_choose_photo_placeholder_text_view) + private TextView fragment_register_choose_photo_placeholder_text_view; + @ViewInject(R.id.fragment_register_update_photo_placeholder_text_view) + private TextView fragment_register_update_photo_placeholder_text_view; + @ViewInject(R.id.fragment_register_id_card_photo_placeholder_text_view) + private TextView fragment_register_id_card_photo_placeholder_text_view; private static final int fragment_register_choose_photo_ = 1; private static final int fragment_register_update_photo_ = 2; @@ -202,6 +217,10 @@ Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri); fragment_register_choose_photo.setImageBitmap(bitmap); fragment_register_choose_photo_img = bitmap; + + fragment_register_choose_photo_placeholder_image.setVisibility(View.INVISIBLE); + fragment_register_choose_photo_placeholder_text_view.setVisibility(View.INVISIBLE); + } catch (Exception e) { e.printStackTrace(); } @@ -212,6 +231,10 @@ Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri); fragment_register_update_photo.setImageBitmap(bitmap); fragment_register_update_photo_img = bitmap; + + fragment_register_update_photo_placeholder_image.setVisibility(View.INVISIBLE); + fragment_register_update_photo_placeholder_text_view.setVisibility(View.INVISIBLE); + } catch (Exception e) { e.printStackTrace(); } @@ -222,6 +245,10 @@ Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri); fragment_register_id_card_photo.setImageBitmap(bitmap); fragment_register_id_card_photo_img = bitmap; + + fragment_register_id_card_photo_placeholder_image.setVisibility(View.INVISIBLE); + fragment_register_id_card_photo_placeholder_text_view.setVisibility(View.INVISIBLE); + } catch (Exception e) { e.printStackTrace(); } diff --git a/VisitFace/DemoForBsk/app/src/main/res/drawable/u117.png b/VisitFace/DemoForBsk/app/src/main/res/drawable/u117.png new file mode 100644 index 0000000..d8c363f --- /dev/null +++ b/VisitFace/DemoForBsk/app/src/main/res/drawable/u117.png Binary files differ diff --git a/VisitFace/DemoForBsk/app/src/main/res/drawable/u45.png b/VisitFace/DemoForBsk/app/src/main/res/drawable/u45.png new file mode 100644 index 0000000..66e2ec8 --- /dev/null +++ b/VisitFace/DemoForBsk/app/src/main/res/drawable/u45.png Binary files differ diff --git a/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_register.xml b/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_register.xml index eab641c..4456ec6 100644 --- a/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_register.xml +++ b/VisitFace/DemoForBsk/app/src/main/res/layout/fragment_register.xml @@ -58,38 +58,123 @@ </LinearLayout> </RelativeLayout> - <LinearLayout + <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:gravity="center_horizontal" android:orientation="horizontal"> - - <com.facebook.drawee.view.SimpleDraweeView - android:id="@+id/fragment_register_choose_photo" - android:layout_width="147dp" - android:layout_height="206dp" - android:background="@drawable/normal_choose_bcg" - android:gravity="center" - /> - <ImageView - android:id="@+id/fragment_register_update_photo" - android:layout_width="147dp" - android:layout_height="206dp" - android:background="@drawable/normal_choose_bcg" - android:text="鐐瑰嚮涓婁紶鐓х墖" - android:layout_marginLeft="44dp" - android:layout_marginRight="56dp" - android:textSize="@dimen/text_size_normal" - android:textColor="@android:color/white" - android:gravity="center"/> - <ImageView - android:id="@+id/fragment_register_id_card_photo" - android:layout_width="330dp" - android:layout_height="206dp" - android:background="@drawable/normal_choose_bcg" - /> - </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_horizontal" + > + <ImageView + android:id="@+id/fragment_register_choose_photo" + android:layout_width="147dp" + android:layout_height="206dp" + android:background="@drawable/normal_choose_bcg" + android:gravity="center" + /> + <ImageView + android:id="@+id/fragment_register_update_photo" + android:layout_width="147dp" + android:layout_height="206dp" + android:background="@drawable/normal_choose_bcg" + android:text="鐐瑰嚮涓婁紶鐓х墖" + android:layout_marginLeft="44dp" + android:layout_marginRight="56dp" + android:textSize="@dimen/text_size_normal" + android:textColor="@android:color/white" + android:gravity="center" + /> + <ImageView + android:id="@+id/fragment_register_id_card_photo" + android:layout_width="330dp" + android:layout_height="206dp" + android:background="@drawable/normal_choose_bcg" + android:padding="55dp" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_horizontal" + > + <ImageView + android:id="@+id/fragment_register_choose_photo_placeholder_image" + android:layout_width="147dp" + android:layout_height="206dp" + android:background="#07000000" + android:src="@drawable/u45" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:paddingTop="70dp" + /> + <ImageView + android:id="@+id/fragment_register_update_photo_placeholder_image" + android:layout_width="147dp" + android:layout_height="206dp" + android:background="#07000000" + android:text="鐐瑰嚮涓婁紶鐓х墖" + android:layout_marginLeft="44dp" + android:layout_marginRight="56dp" + android:textSize="@dimen/text_size_normal" + android:textColor="@android:color/white" + android:gravity="center" + android:src="@drawable/u45" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:paddingTop="70dp" + /> + <ImageView + android:id="@+id/fragment_register_id_card_photo_placeholder_image" + android:layout_width="330dp" + android:layout_height="206dp" + android:background="@drawable/normal_choose_bcg" + android:src="@drawable/u117" + android:padding="55dp" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_horizontal" + > + <TextView + android:id="@+id/fragment_register_choose_photo_placeholder_text_view" + android:layout_width="147dp" + android:layout_height="206dp" + android:gravity="center" + android:text="閫夋嫨\n浜虹墿鐓х墖" + android:background="#07000000" + android:textSize="@dimen/text_size_big" + android:paddingTop="70dp" + /> + <TextView + android:id="@+id/fragment_register_update_photo_placeholder_text_view" + android:layout_width="147dp" + android:layout_height="206dp" + android:background="#07000000" + android:text="鐐瑰嚮\n涓婁紶鐓х墖" + android:layout_marginLeft="44dp" + android:layout_marginRight="56dp" + android:textSize="@dimen/text_size_big" + android:gravity="center" + android:paddingTop="70dp" + /> + <TextView + android:id="@+id/fragment_register_id_card_photo_placeholder_text_view" + android:layout_width="330dp" + android:layout_height="206dp" + android:background="#07000000" + android:textSize="@dimen/text_size_navigation" + android:text="璇佷欢蹇収" + android:gravity="center|center_vertical" + android:layout_gravity="center_vertical" + /> + </LinearLayout> + </RelativeLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" -- Gitblit v1.8.0