From 504ec3847d15c3284b9aa9cead36d5b2b76cc408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Hern=C3=A1ndez?= Date: Mon, 25 Jul 2022 09:17:19 -0500 Subject: [PATCH] rename UI --- .../easycameraandgallery/CameraActivity.kt | 11 +++++------ .../gallery/GalleryAdapter.kt | 6 +++--- ...m_checkbox.xml => custom_checkbox_camera.xml} | 6 +++--- ...ent_bottom.xml => gradient_bottom_camera.xml} | 0 ...{gradient_top.xml => gradient_top_camera.xml} | 0 ...ine_camera_rear_24.xml => ic_camera_back.xml} | 0 ...ic_camera.xml => ic_capture_photo_camera.xml} | 0 ...baseline_check_24.xml => ic_check_select.xml} | 0 .../{ic_checked.xml => ic_checked_camera.xml} | 0 ...lash_auto_24.xml => ic_flash_auto_camera.xml} | 0 ..._flash_off_24.xml => ic_flash_off_camera.xml} | 0 ...ne_flash_on_24.xml => ic_flash_on_camera.xml} | 0 ...e_camera_front_24.xml => ic_front_camera.xml} | 0 ...seline_image_24.xml => ic_gallery_camera.xml} | 0 ...{ic_unchecked.xml => ic_unchecked_camera.xml} | 0 .../src/main/res/layout/activity_camera.xml | 16 ++++++++-------- ...ker_list.xml => image_picker_list_camera.xml} | 2 +- 17 files changed, 20 insertions(+), 21 deletions(-) rename EasyCameraAndGallery/src/main/res/drawable/{custom_checkbox.xml => custom_checkbox_camera.xml} (60%) rename EasyCameraAndGallery/src/main/res/drawable/{gradient_bottom.xml => gradient_bottom_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{gradient_top.xml => gradient_top_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_camera_rear_24.xml => ic_camera_back.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_camera.xml => ic_capture_photo_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_check_24.xml => ic_check_select.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_checked.xml => ic_checked_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_flash_auto_24.xml => ic_flash_auto_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_flash_off_24.xml => ic_flash_off_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_flash_on_24.xml => ic_flash_on_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_camera_front_24.xml => ic_front_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_baseline_image_24.xml => ic_gallery_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/drawable/{ic_unchecked.xml => ic_unchecked_camera.xml} (100%) rename EasyCameraAndGallery/src/main/res/layout/{image_picker_list.xml => image_picker_list_camera.xml} (95%) diff --git a/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/CameraActivity.kt b/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/CameraActivity.kt index 782d16e..b04fe6a 100644 --- a/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/CameraActivity.kt +++ b/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/CameraActivity.kt @@ -47,7 +47,6 @@ import java.io.File import java.text.SimpleDateFormat import java.util.* import kotlin.math.abs -import kotlin.math.log import kotlin.math.max import kotlin.math.min @@ -160,23 +159,23 @@ class CameraActivity : AppCompatActivity() { private fun caseFlashMode(){ when(flashMode){ ImageCapture.FLASH_MODE_OFF ->{ - binding.ibFlashCamera.setImageResource(R.drawable.ic_baseline_flash_off_24) + binding.ibFlashCamera.setImageResource(R.drawable.ic_flash_off_camera) } ImageCapture.FLASH_MODE_ON -> { - binding.ibFlashCamera.setImageResource(R.drawable.ic_baseline_flash_on_24) + binding.ibFlashCamera.setImageResource(R.drawable.ic_flash_on_camera) } ImageCapture.FLASH_MODE_AUTO -> { - binding.ibFlashCamera.setImageResource(R.drawable.ic_baseline_flash_auto_24) + binding.ibFlashCamera.setImageResource(R.drawable.ic_flash_auto_camera) } } } private fun enableFrontCamera(isFront : Boolean) { if (isFront){ - binding.ibFrontCamera.setImageResource(R.drawable.ic_baseline_camera_rear_24) + binding.ibFrontCamera.setImageResource(R.drawable.ic_camera_back) }else{ - binding.ibFrontCamera.setImageResource(R.drawable.ic_baseline_camera_front_24) + binding.ibFrontCamera.setImageResource(R.drawable.ic_front_camera) } } diff --git a/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/gallery/GalleryAdapter.kt b/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/gallery/GalleryAdapter.kt index e68b9dd..c5b06f7 100644 --- a/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/gallery/GalleryAdapter.kt +++ b/EasyCameraAndGallery/src/main/java/dev/ahrsoft/easycameraandgallery/gallery/GalleryAdapter.kt @@ -5,11 +5,11 @@ import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide -import dev.ahrsoft.easycameraandgallery.databinding.ImagePickerListBinding +import dev.ahrsoft.easycameraandgallery.databinding.ImagePickerListCameraBinding class GalleryAdapter(private val context : Context, private val imageList : List) : RecyclerView.Adapter() { - class GalleryHolder(private val binding: ImagePickerListBinding) : RecyclerView.ViewHolder(binding.root){ + class GalleryHolder(private val binding: ImagePickerListCameraBinding) : RecyclerView.ViewHolder(binding.root){ fun bind(context: Context,imageModel: ImageModel){ with(binding){ Glide.with(context) @@ -23,7 +23,7 @@ class GalleryAdapter(private val context : Context, private val imageList : List override fun getItemCount(): Int = imageList.size override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GalleryHolder { - val itembinding = ImagePickerListBinding.inflate(LayoutInflater.from(parent.context),parent,false) + val itembinding = ImagePickerListCameraBinding.inflate(LayoutInflater.from(parent.context),parent,false) return GalleryHolder(itembinding) } diff --git a/EasyCameraAndGallery/src/main/res/drawable/custom_checkbox.xml b/EasyCameraAndGallery/src/main/res/drawable/custom_checkbox_camera.xml similarity index 60% rename from EasyCameraAndGallery/src/main/res/drawable/custom_checkbox.xml rename to EasyCameraAndGallery/src/main/res/drawable/custom_checkbox_camera.xml index 7b4091a..8439c2d 100644 --- a/EasyCameraAndGallery/src/main/res/drawable/custom_checkbox.xml +++ b/EasyCameraAndGallery/src/main/res/drawable/custom_checkbox_camera.xml @@ -2,11 +2,11 @@ + android:drawable="@drawable/ic_checked_camera"/> + android:drawable="@drawable/ic_checked_camera"/> + android:drawable="@drawable/ic_unchecked_camera"/> \ No newline at end of file diff --git a/EasyCameraAndGallery/src/main/res/drawable/gradient_bottom.xml b/EasyCameraAndGallery/src/main/res/drawable/gradient_bottom_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/gradient_bottom.xml rename to EasyCameraAndGallery/src/main/res/drawable/gradient_bottom_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/gradient_top.xml b/EasyCameraAndGallery/src/main/res/drawable/gradient_top_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/gradient_top.xml rename to EasyCameraAndGallery/src/main/res/drawable/gradient_top_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_camera_rear_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_camera_back.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_camera_rear_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_camera_back.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_camera.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_capture_photo_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_camera.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_capture_photo_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_check_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_check_select.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_check_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_check_select.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_checked.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_checked_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_checked.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_checked_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_flash_auto_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_flash_auto_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_flash_auto_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_flash_auto_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_flash_off_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_flash_off_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_flash_off_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_flash_off_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_flash_on_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_flash_on_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_flash_on_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_flash_on_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_camera_front_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_front_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_camera_front_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_front_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_baseline_image_24.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_gallery_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_baseline_image_24.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_gallery_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/drawable/ic_unchecked.xml b/EasyCameraAndGallery/src/main/res/drawable/ic_unchecked_camera.xml similarity index 100% rename from EasyCameraAndGallery/src/main/res/drawable/ic_unchecked.xml rename to EasyCameraAndGallery/src/main/res/drawable/ic_unchecked_camera.xml diff --git a/EasyCameraAndGallery/src/main/res/layout/activity_camera.xml b/EasyCameraAndGallery/src/main/res/layout/activity_camera.xml index 64174fe..8e38dbf 100644 --- a/EasyCameraAndGallery/src/main/res/layout/activity_camera.xml +++ b/EasyCameraAndGallery/src/main/res/layout/activity_camera.xml @@ -12,7 +12,7 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginTop="16dp" - android:src="@drawable/ic_baseline_camera_front_24" + android:src="@drawable/ic_front_camera" android:background="@android:color/transparent" android:padding="10dp" android:elevation="9dp" @@ -25,7 +25,7 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginEnd="16dp" - android:src="@drawable/ic_baseline_flash_auto_24" + android:src="@drawable/ic_flash_auto_camera" android:background="@android:color/transparent" android:elevation="9dp" android:padding="10dp" @@ -41,7 +41,7 @@ android:clickable="true" app:layout_constraintBottom_toTopOf="@+id/rv.gallery.camera" app:layout_constraintEnd_toEndOf="parent" - app:srcCompat="@drawable/ic_baseline_check_24" + app:srcCompat="@drawable/ic_check_select" android:focusable="true" android:visibility="gone"/> @@ -64,7 +64,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" tools:itemCount="8" - tools:listitem="@layout/image_picker_list" + tools:listitem="@layout/image_picker_list_camera" tools:orientation="horizontal" />