From 17eb1d06e104bc1cd93498fe3a3eaecf14c9d734 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 12 十一月 2020 13:57:35 +0800
Subject: [PATCH] 1. 修复现场整改时,问题状态是‘问题审核通过’而不是“整改未审核”的问题; 2. 修改任意拍照界面的多图片展示方式为Glide,减少内存溢出的可能性; 3. 新增图片类型枚举类,罗列原有的图片类型,并新增“铭牌”和“监测设备”; 4. 修复导航功能可能导致空指针的问题; 5. 任意拍界面新增按分类拍摄功能; 6. 修复现场整改界面打开崩溃问题;
---
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt | 127 ++++++++++++-----
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraViewModel.kt | 40 ++++-
app/src/main/java/cn/flightfeather/thirdapp/activity/ProblemDetailActivity.java | 2
app/src/main/java/cn/flightfeather/thirdapp/model/enumreation/MediaFileType.kt | 16 ++
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt | 14 +
app/src/main/res/layout/dialog_camera_2.xml | 72 ++++++++++
app/src/main/java/cn/flightfeather/thirdapp/adapter/PhotoListAdapter.java | 29 ++-
.idea/misc.xml | 2
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuChangeActivity.kt | 1
.idea/gradle.xml | 1
.idea/compiler.xml | 6
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuNewGitActivity.kt | 6
app/src/main/res/layout/dialog_camera.xml | 81 ++++++++--
app/build.gradle | 4
14 files changed, 310 insertions(+), 91 deletions(-)
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..61a9130
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <bytecodeTargetLevel target="1.8" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 98104f9..e4fe364 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -17,6 +17,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
+ <option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 994aca9..7d375ca 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -44,7 +44,7 @@
</value>
</option>
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="SvnBranchConfigurationManager">
<option name="myConfigurationMap">
<map>
diff --git a/app/build.gradle b/app/build.gradle
index ef003ed..ec3eab6 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,8 +13,8 @@
applicationId "cn.flightfeather.thirdapp"
minSdkVersion 19
targetSdkVersion 28
- versionCode 20
- versionName "1.1.14.02"
+ versionCode 21
+ versionName "1.1.14.04"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
renderscriptTargetApi 25
renderscriptSupportModeEnabled true
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/activity/ProblemDetailActivity.java b/app/src/main/java/cn/flightfeather/thirdapp/activity/ProblemDetailActivity.java
index cc22e7c..c6bb099 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/activity/ProblemDetailActivity.java
+++ b/app/src/main/java/cn/flightfeather/thirdapp/activity/ProblemDetailActivity.java
@@ -941,7 +941,7 @@
sw_change.setVisibility(View.GONE);
tv_problemChange.setText("宸叉暣鏀�");
problemlistVoCurrent.setIschanged(true);
- problemlistVoCurrent.setExtension3(Domain.PROBLEM_CHECK_PASS);
+ problemlistVoCurrent.setExtension3(Domain.CHANGE_UNCHECKED);
problemlistVoCurrent.setRemark(application.getCurrentUser().getAcountname());
} else if (type == InspectionDetailActivity.PROBLEM_RECHECK) {
sw_recheck.setVisibility(View.GONE);
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/adapter/PhotoListAdapter.java b/app/src/main/java/cn/flightfeather/thirdapp/adapter/PhotoListAdapter.java
index 9676ee4..a4d5a50 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/adapter/PhotoListAdapter.java
+++ b/app/src/main/java/cn/flightfeather/thirdapp/adapter/PhotoListAdapter.java
@@ -42,23 +42,30 @@
@Override
public void onBindViewHolder(PhotoListHolder holder, int position) {
Mediafile mediafile = mediafileList.get(position);
+
+ if (mediafile.getGuid() == null) {
+ Glide.with(context)
+ .load(R.drawable.icon_add_photo)
+ .into(holder.iv_photo);
+ } else {
// String url = CommonApplication.getInstance().ROOT_URL_RELEASE_IMAGE + mediafile.getExtension1() + mediafile.getGuid() + ".jpg";
// Glide.with(context).asDrawable().load(url).override(100,100).skipMemoryCache(true).diskCacheStrategy(DiskCacheStrategy.ALL).into(holder.iv_photo);
- File file = new File(Environment.getExternalStorageDirectory(),mediafile.getPath()+mediafile.getDescription());
- if (file.exists()){
+ File file = new File(Environment.getExternalStorageDirectory(), mediafile.getPath() + mediafile.getDescription());
+ if (file.exists()) {
// SetImageTask task = new SetImageTask(file,holder.iv_photo);
// task.execute();
// String url = CommonApplication.getInstance().ROOT_URL_RELEASE_IMAGE + mediafile.getExtension1() + mediafile.getGuid() + ".jpg";
- Glide.with(context)
- .load(file)
- .placeholder(R.drawable.icon_add_photo_waite)
- .override(100,100)
- .into(holder.iv_photo);
- }else {
- DownloadAndSetImageTask task = new DownloadAndSetImageTask(mediafile,holder.iv_photo,context);
- task.execute();
- Log.e("photolist",position+" no image found");
+ Glide.with(context)
+ .load(file)
+ .placeholder(R.drawable.icon_add_photo_waite)
+ .override(100, 100)
+ .into(holder.iv_photo);
+ } else {
+ DownloadAndSetImageTask task = new DownloadAndSetImageTask(mediafile, holder.iv_photo, context);
+ task.execute();
+ Log.e("photolist", position + " no image found");
+ }
}
}
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/model/enumreation/MediaFileType.kt b/app/src/main/java/cn/flightfeather/thirdapp/model/enumreation/MediaFileType.kt
new file mode 100644
index 0000000..68b41c4
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdapp/model/enumreation/MediaFileType.kt
@@ -0,0 +1,16 @@
+package cn.flightfeather.thirdapp.model.enumreation
+
+/**
+ * @author riku
+ * Date: 2020/10/19
+ */
+enum class MediaFileType(val value: Int, val des: String) {
+ Problem(1, "闂"),
+ TechnicalPrevention(2,"鎶�闃叉帾鏂�"),
+ MonitorDevice(3, "鐩戞祴璁惧"),
+ ManageDevice(4, "娌荤悊璁惧"),
+ RoutineRecord(5, "甯歌璁板綍"),
+ Signature(6, "绛惧瓧"),
+ Nameplate(7, "閾墝"),
+ Others(99,"鍏朵粬")
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
index dbf4b7d..f50135a 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
@@ -684,10 +684,16 @@
//寮�濮嬪鑸�
private fun startNavi() {
- val sourceLatLng = LatLng(viewModel.scene.value?.getLatitude()!!, viewModel.scene.value?.getLongitude()!!)
-
- val amapNavi = AmapNavi(this)
- amapNavi.startNavi(sourceLatLng.latitude, sourceLatLng.longitude)
+ if (viewModel.scene.value != null) {
+ val sourceLatLng = LatLng(
+ viewModel.scene.value!!.latitude,
+ viewModel.scene.value!!.longitude
+ )
+ val amapNavi = AmapNavi(this)
+ amapNavi.startNavi(sourceLatLng.latitude, sourceLatLng.longitude)
+ } else {
+ toast("瀵艰埅鐩墠涓嶅彲鐢紝璇风◢鍚庡啀璇�")
+ }
}
override fun onClick(v: View?) {
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
index c802e61..44ef3d9 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
@@ -7,6 +7,7 @@
import android.os.Bundle
import android.os.Environment
import android.support.v7.widget.GridLayoutManager
+import android.support.v7.widget.RecyclerView
import android.view.View
import cn.flightfeather.thirdapp.R
import cn.flightfeather.thirdapp.activity.PhotoViewerActivity
@@ -16,7 +17,7 @@
import cn.flightfeather.thirdapp.bean.Mediafile
import cn.flightfeather.thirdapp.bean.Scense
import cn.flightfeather.thirdapp.bean.Subtask
-import cn.flightfeather.thirdapp.fragment.InspectionFragment.intToByte
+import cn.flightfeather.thirdapp.model.enumreation.MediaFileType
import cn.flightfeather.thirdapp.module.base.BaseActivity
import cn.flightfeather.thirdapp.module.base.BaseTakePicActivity
import cn.flightfeather.thirdapp.module.base.TAKE_PHOTO
@@ -31,12 +32,18 @@
import java.io.IOException
import java.io.Serializable
import java.util.*
+import kotlin.collections.ArrayList
const val BUSINESS_TYPE_CAMERA = 5
class MenuCameraActivity : BaseActivity() {
override fun getLayoutId(): Int = R.layout.dialog_camera
+ //椤甸潰鏀寔鐨勬媿鎽勫浘鐗囩被鍨�
+ private val typeList = listOf(MediaFileType.RoutineRecord, MediaFileType.Nameplate, MediaFileType.MonitorDevice)
+
+ //褰撳墠閫夋嫨鐨勬媿鐓х被鍨�
+ private var currentType = MediaFileType.RoutineRecord
lateinit var viewModel: MenuCameraViewModel
@@ -57,15 +64,7 @@
lng = intent.getDoubleExtra("lng", 0.0)
initUI()
-
- viewModel.mediaFileList.observe(this, Observer {
- it?.let {
- rv_photo_list.adapter?.notifyDataSetChanged()
-
- val t = "鍏�${it.size}寮犵収鐗�"
- tv_count.text = t
- }
- })
+ initObserver()
inspection?.guid?.let { viewModel.getMediaFile(it) }
}
@@ -88,45 +87,66 @@
}
try {
FileUtil.copyFile(oldFile, newFile)
- putMediaFile(path, fileName, cal)
+ val mf = putMediaFile(path, fileName, cal)
+ addPhoto(mf)
} catch (e: IOException) {
e.printStackTrace()
application.toast("澶嶅埗鏂囦欢澶辫触")
}
}
}
- inspection?.guid?.let { viewModel.getMediaFile(it) }
}
VIEW_PHOTO -> {
//鏌ョ湅涓存椂鎷嶆憚鍥剧墖鍙互鍒犻櫎
data?.getIntExtra("position", -1)?.let {
- viewModel.mediaFileList.value?.removeAt(it)
- rv_photo_list.adapter?.run {
- notifyDataSetChanged()
- }
+ deletePhoto(it)
}
}
}
}
private fun initUI() {
- rv_photo_list.run {
+ typeList.forEach {
+ getDataSet(it).run {
+ initRecyclerView(first.value, second, it)
+ }
+ }
+ fab_problem_list_close.setOnClickListener {
+ finish()
+ }
+ }
+
+ private fun initRecyclerView(dataList: MutableList<Mediafile>?, recyclerView: RecyclerView, type: MediaFileType) {
+ if (dataList==null) return
+ recyclerView.run {
layoutManager = GridLayoutManager(this@MenuCameraActivity, 4)
- adapter = PhotoListAdapter(viewModel.mediaFileList.value, this@MenuCameraActivity)
+ adapter = PhotoListAdapter(dataList, this@MenuCameraActivity)
addOnItemTouchListener(RecyclerItemClickListener(this@MenuCameraActivity, this, object : RecyclerItemClickListener.OnItemClickListener {
override fun onItemClick(view: View?, position: Int) {
- val files = ArrayList<File>()
- for (m in viewModel.mediaFileList.value!!) {
- val f = File(Environment.getExternalStorageDirectory(), m.path + m.description)
- files.add(f)
+ currentType = type
+ //鎷嶇収
+ if (dataList[position].guid == null) {
+ PhotoUtil.pickPhoto2(this@MenuCameraActivity, TAKE_PHOTO, 9)
}
- val intent = Intent(this@MenuCameraActivity, PhotoViewerActivity::class.java)
- .putExtra(PhotoViewerActivity.PARA_FILES, files as Serializable)
- .putExtra("type", PhotoViewerActivity.CAMERA_PHOTO)
- .putExtra("deletable", true)
- .putExtra("position", position)
- .putExtra(PhotoViewerActivity.PARA_MEDIAS, viewModel.mediaFileList.value as Serializable)
- startActivityForResult(intent, VIEW_PHOTO)
+ //鏌ョ湅鍥剧墖
+ else {
+ val files = ArrayList<File>()
+ val medias = ArrayList<Mediafile>()
+ for (m in dataList) {
+ if (m.guid != null) {
+ val f = File(Environment.getExternalStorageDirectory(), m.path + m.description)
+ files.add(f)
+ medias.add(m)
+ }
+ }
+ val intent = Intent(this@MenuCameraActivity, PhotoViewerActivity::class.java)
+ .putExtra(PhotoViewerActivity.PARA_FILES, files as Serializable)
+ .putExtra("type", PhotoViewerActivity.CAMERA_PHOTO)
+ .putExtra("deletable", true)
+ .putExtra("position", position - 1)
+ .putExtra(PhotoViewerActivity.PARA_MEDIAS, medias as Serializable)
+ startActivityForResult(intent, VIEW_PHOTO)
+ }
}
override fun onItemLongClick(view: View?, position: Int) {
@@ -134,17 +154,21 @@
}))
}
+ }
- iv_new_photo.setOnClickListener {
- PhotoUtil.pickPhoto2(this, TAKE_PHOTO, 9)
- }
-
- fab_problem_list_close.setOnClickListener {
- finish()
+ private fun initObserver() {
+ typeList.forEach {
+ getDataSet(it).run {
+ first.observe(this@MenuCameraActivity, Observer {list->
+ list?.let {
+ second.adapter?.notifyDataSetChanged()
+ }
+ })
+ }
}
}
- private fun putMediaFile(path: String, fileName: String, calendar: Calendar) {
+ private fun putMediaFile(path: String, fileName: String, calendar: Calendar):Mediafile {
val mediaFile = Mediafile()
mediaFile.guid = UUIDGenerator.generate16ShortUUID()
mediaFile.iguid = inspection?.guid
@@ -153,8 +177,8 @@
mediaFile.address = "${scene?.cityname ?: ""} + ${scene?.districtname
?: ""} + ${scene?.townname ?: ""} + ${scene?.location ?: ""}"
mediaFile.filetype = 1
- mediaFile.businesstype = "甯歌璁板綍"
- mediaFile.businesstypeid = intToByte(5)
+ mediaFile.businesstype = currentType.des
+ mediaFile.businesstypeid = currentType.value.toByte()
mediaFile.path = path
mediaFile.description = fileName
mediaFile.savetime = Date()
@@ -164,5 +188,32 @@
mediaFile.remark = "鏈笂浼�"
viewModel.putMediaFile(mediaFile)
+
+ return mediaFile
+ }
+
+ private fun addPhoto(mediaFile: Mediafile) {
+ getDataSet(currentType).run {
+ first.value?.add(mediaFile)
+ second.adapter?.run {
+ notifyDataSetChanged()
+ }
+ }
+ }
+
+ private fun deletePhoto(pos: Int) {
+ getDataSet(currentType).run {
+ first.value?.removeAt(pos + 1)//绗竴涓暟鎹负鎷嶇収鎸夐挳
+ second.adapter?.run {
+ notifyDataSetChanged()
+ }
+ }
+ }
+
+ private fun getDataSet(type: MediaFileType) = when (type) {
+ MediaFileType.RoutineRecord -> Pair(viewModel.routineRecordList, rv_photo_list_1)
+ MediaFileType.Nameplate -> Pair(viewModel.nameplateList, rv_photo_list_2)
+ MediaFileType.MonitorDevice -> Pair(viewModel.monitorDeviceList, rv_photo_list_3)
+ else -> Pair(viewModel.routineRecordList, rv_photo_list_1)
}
}
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraViewModel.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraViewModel.kt
index eae0b61..8d93bcd 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraViewModel.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraViewModel.kt
@@ -3,6 +3,7 @@
import android.arch.lifecycle.MutableLiveData
import cn.flightfeather.thirdapp.bean.Mediafile
import cn.flightfeather.thirdapp.common.net.ResultCallBack
+import cn.flightfeather.thirdapp.model.enumreation.MediaFileType
import cn.flightfeather.thirdapp.module.base.BaseViewModel
import cn.flightfeather.thirdapp.repository.InspectionRepository
import cn.flightfeather.thirdapp.repository.ProblemRepository
@@ -16,27 +17,42 @@
private val inspectionRepository = InspectionRepository()
private val problemRepository = ProblemRepository()
- val mediaFileList = MutableLiveData<ArrayList<Mediafile>>().apply { value = ArrayList() }
+ //甯歌璁板綍鍥剧墖
+ val routineRecordList = MutableLiveData<ArrayList<Mediafile>>().apply { value = ArrayList() }
+ //閾墝鍥剧墖
+ val nameplateList = MutableLiveData<ArrayList<Mediafile>>().apply { value = ArrayList() }
+ //鐩戞祴璁惧鍥剧墖
+ val monitorDeviceList = MutableLiveData<ArrayList<Mediafile>>().apply { value = ArrayList() }
+
+ private val dataSet = listOf(
+ Pair(MediaFileType.RoutineRecord, routineRecordList),
+ Pair(MediaFileType.Nameplate, nameplateList),
+ Pair(MediaFileType.MonitorDevice, monitorDeviceList)
+ )
+
/**
* 鑾峰彇浠绘剰鎷嶇収鍥剧墖
*/
fun getMediaFile(inspectionId: String) {
- inspectionRepository.getMediaFile(inspectionId, BUSINESS_TYPE_CAMERA, object : ResultCallBack<ArrayList<Mediafile>> {
- override fun onSuccess(result: ArrayList<Mediafile>?) {
- result?.let {
- mediaFileList.value?.run {
- clear()
- addAll(it)
+ dataSet.forEach {p ->
+ inspectionRepository.getMediaFile(inspectionId, p.first.value, object : ResultCallBack<ArrayList<Mediafile>> {
+ override fun onSuccess(result: ArrayList<Mediafile>?) {
+ result?.let {
+ p.second.value?.run {
+ clear()
+ add(0, Mediafile())//鍦ㄥ垪琛ㄥご娣诲姞鍥剧墖鎷嶆憚鎸夐挳
+ addAll(it)
+ }
+ p.second.value = p.second.value
}
- mediaFileList.value = mediaFileList.value
}
- }
- override fun onFailure() {
+ override fun onFailure() {
- }
+ }
- })
+ })
+ }
}
/**
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuChangeActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuChangeActivity.kt
index 0cfc11d..f2a5c79 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuChangeActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuChangeActivity.kt
@@ -21,7 +21,6 @@
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- EventBus.getDefault().register(this)
viewModel.problemList.observe(this, Observer {
it?.let {
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuNewGitActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuNewGitActivity.kt
index 882a34c..adc2d2a 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuNewGitActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuNewGitActivity.kt
@@ -27,6 +27,10 @@
import cn.flightfeather.thirdapp.util.file.FileUtil
import com.ping.greendao.gen.GittypeDao
import kotlinx.android.synthetic.main.dialog_camera.*
+import kotlinx.android.synthetic.main.dialog_camera.fab_problem_list_close
+import kotlinx.android.synthetic.main.dialog_camera.iv_new_photo
+import kotlinx.android.synthetic.main.dialog_camera.tv_title
+import kotlinx.android.synthetic.main.dialog_camera_2.*
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.Callback
@@ -42,7 +46,7 @@
override fun getImageViews(): MutableList<ImageView> = mutableListOf()
- override fun getLayoutId(): Int = R.layout.dialog_camera
+ override fun getLayoutId(): Int = R.layout.dialog_camera_2
lateinit var viewModel: MenuNewGitViewModel
diff --git a/app/src/main/res/layout/dialog_camera.xml b/app/src/main/res/layout/dialog_camera.xml
index 175d38d..750b503 100644
--- a/app/src/main/res/layout/dialog_camera.xml
+++ b/app/src/main/res/layout/dialog_camera.xml
@@ -10,10 +10,11 @@
android:layout_height="match_parent"
android:layout_marginTop="30dp"
android:layout_marginLeft="12dp"
- android:layout_marginRight="14dp"
+ android:layout_marginRight="12dp"
android:layout_marginBottom="40dp"
app:cardCornerRadius="6dp"
app:cardElevation="7dp">
+
<LinearLayout
android:id="@+id/ll_dialog_problem_list_main"
android:layout_width="match_parent"
@@ -24,29 +25,69 @@
android:paddingRight="16dp"
android:orientation="vertical">
- <TextView
- android:id="@+id/tv_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="18dp"
- android:textColor="@color/primary_text"
- android:text="鐓х墖鍒楄〃"/>
-
<TextView
- android:id="@+id/tv_count"
- android:layout_marginTop="6dp"
+ android:id="@+id/tv_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="18dp"
+ android:textColor="@color/primary_text"
+ android:text="鐓х墖鍒楄〃"/>
+ <android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
- <android.support.v7.widget.RecyclerView
- android:layout_marginTop="6dp"
- android:paddingBottom="8dp"
- android:id="@+id/rv_photo_list"
- android:layout_weight="1"
- android:layout_width="match_parent"
- android:layout_height="0dp">
- </android.support.v7.widget.RecyclerView>
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="20dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ <TextView
+ android:id="@+id/txt_title_1"
+ android:layout_marginTop="6dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="甯歌"/>
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/rv_photo_list_1"
+ android:layout_marginTop="@dimen/dimen2"
+ android:paddingBottom="8dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ </android.support.v7.widget.RecyclerView>
+
+ <TextView
+ android:id="@+id/txt_title_2"
+ android:layout_marginTop="6dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="閾墝"/>
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/rv_photo_list_2"
+ android:layout_marginTop="@dimen/dimen2"
+ android:paddingBottom="8dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ </android.support.v7.widget.RecyclerView>
+
+ <TextView
+ android:id="@+id/txt_title_3"
+ android:layout_marginTop="6dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="璁惧"/>
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/rv_photo_list_3"
+ android:layout_marginTop="@dimen/dimen2"
+ android:paddingBottom="8dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ </android.support.v7.widget.RecyclerView>
+ </LinearLayout>
+ </android.support.v4.widget.NestedScrollView>
+
<ImageView
android:id="@+id/iv_new_photo"
+ android:visibility="gone"
android:layout_gravity="center_horizontal"
android:layout_width="60dp"
android:layout_height="60dp"
diff --git a/app/src/main/res/layout/dialog_camera_2.xml b/app/src/main/res/layout/dialog_camera_2.xml
new file mode 100644
index 0000000..e503c55
--- /dev/null
+++ b/app/src/main/res/layout/dialog_camera_2.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <android.support.v7.widget.CardView
+ android:id="@+id/cv_dialog_problem_list_main"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="30dp"
+ android:layout_marginLeft="12dp"
+ android:layout_marginRight="12dp"
+ android:layout_marginBottom="40dp"
+ app:cardCornerRadius="6dp"
+ app:cardElevation="7dp">
+ <LinearLayout
+ android:id="@+id/ll_dialog_problem_list_main"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingTop="12dp"
+ android:paddingBottom="16dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/tv_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="18dp"
+ android:textColor="@color/primary_text"
+ android:text="鐓х墖鍒楄〃"/>
+
+ <TextView
+ android:id="@+id/tv_count"
+ android:layout_marginTop="6dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ <android.support.v7.widget.RecyclerView
+ android:layout_marginTop="6dp"
+ android:paddingBottom="8dp"
+ android:id="@+id/rv_photo_list"
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="0dp">
+ </android.support.v7.widget.RecyclerView>
+ <ImageView
+ android:id="@+id/iv_new_photo"
+ android:layout_gravity="center_horizontal"
+ android:layout_width="60dp"
+ android:layout_height="60dp"
+ android:src="@drawable/icon_add_photo"
+ android:layout_marginTop="12dp"
+ android:layout_marginBottom="20dp"/>
+
+
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
+ <android.support.design.widget.FloatingActionButton
+ android:src="@drawable/icon_close_white"
+
+ android:id="@+id/fab_problem_list_close"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:fabSize="normal"
+ app:elevation="8dp"
+ app:layout_anchor="@id/cv_dialog_problem_list_main"
+ app:layout_anchorGravity="bottom|center"
+ />
+
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
--
Gitblit v1.9.3