private void initTitleView() {
   titleView = (MyTitleView) findViewById(R.id.title_view);
   titleView.setLeftButton(
       R.mipmap.back_btn,
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           onBackPressed();
         }
       });
   titleView.setTitleName(isEditing ? "添加照片" : "查看照片");
   // 如果是编辑状态并且开启了照相辅助才初始化标题栏右侧相机按钮并隐藏
   if (isEditing && isShowHelper) {
     titleView.setRightButton(
         R.mipmap.camera_nobg,
         new View.OnClickListener() {
           @Override
           public void onClick(View v) {
             showCameraDialog();
           }
         });
   }
   titleView.getIbtRight().setVisibility(View.GONE);
   titleView.setBg("#303F9F");
 }
 @Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   gvIndex = position + 1;
   if (isShowHelper) {
     // 开启了照相辅助后如果点击的index超出了原有的项,直接拍照
     if (gvIndex > itemCount) {
       showCameraDialog();
     } else {
       titleView.setTitleName("拍照辅助");
       titleView.getIbtRight().setVisibility(View.VISIBLE);
       gvDisImg.setVisibility(View.GONE);
       svCameraHelper.setVisibility(View.VISIBLE);
       setSv();
     }
   } else {
     showCameraDialog();
   }
 }
 // 开启了照相辅助后从scrollView跳转到gridView
 private void hideSv() {
   gvDisImg.setVisibility(View.VISIBLE);
   svCameraHelper.setVisibility(View.GONE);
   titleView.setTitleName("添加照片");
   titleView.getIbtRight().setVisibility(View.GONE);
 }