Skip to content

Commit f971584

Browse files
author
Mark Ramos
committed
refactor resources
1 parent 47e3500 commit f971584

23 files changed

+34
-35
lines changed

CameraLibrary/src/main/java/com/markramosonline/cameralibrary/CamModule.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import androidx.fragment.app.Fragment
2727
import androidx.recyclerview.widget.RecyclerView
2828
import com.markramosonline.cameralibrary.adapters.ThumbnailAdapter
2929
import androidx.recyclerview.widget.LinearLayoutManager
30-
import com.markramosonline.cameralibrary.R
3130

3231

3332
import java.io.File
@@ -260,9 +259,9 @@ class CamModule : Fragment() {
260259

261260
// Change button image based on flash state
262261
val flashIcon = if (isFlashOn) {
263-
R.drawable.flash // Replace with your actual "flash on" image
262+
R.drawable.mlr_flash // Replace with your actual "flash on" image
264263
} else {
265-
R.drawable.no_flash // Replace with your actual "flash off" image
264+
R.drawable.mlr_no_flash // Replace with your actual "flash off" image
266265
}
267266

268267
imgFlashButton.setImageResource(flashIcon)

CameraLibrary/src/main/res/drawable/camera_shutter.xml

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@drawable/mlr_open_lens" android:state_selected="true"></item>
4+
<item android:drawable="@drawable/mlr_shutter" android:state_pressed="true"></item>
5+
<item android:drawable="@drawable/mlr_open_lens"></item>
6+
</selector>

CameraLibrary/src/main/res/layout-land/fragment_camera.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
android:id="@+id/closeCameraButton"
3030
android:layout_width="@dimen/_52sdp"
3131
android:layout_height="@dimen/_52sdp"
32-
android:src="@drawable/ic_arrow_back_black_24dp"
33-
android:background="@drawable/circular_button"
32+
android:src="@drawable/mlr_ic_arrow_back_black_24dp"
33+
android:background="@drawable/mlr_circular_button"
3434
app:layout_constraintTop_toTopOf="parent"
3535
app:layout_constraintStart_toStartOf="parent"
3636
android:layout_margin="@dimen/_14sdp"
@@ -50,8 +50,8 @@
5050

5151
<ImageButton
5252
android:id="@+id/imgFlashButton"
53-
android:src="@drawable/no_flash"
54-
android:background="@drawable/circular_button"
53+
android:src="@drawable/mlr_no_flash"
54+
android:background="@drawable/mlr_circular_button"
5555
android:layout_width="@dimen/_52sdp"
5656
android:layout_height="@dimen/_52sdp"
5757
android:layout_alignParentEnd="true"
@@ -89,8 +89,8 @@
8989
android:id="@+id/imgCaptureButton"
9090
android:layout_width="@dimen/_52sdp"
9191
android:layout_height="@dimen/_52sdp"
92-
android:src="@drawable/camera_shutter"
93-
android:background="@drawable/circular_button"
92+
android:src="@drawable/mlr_camera_shutter"
93+
android:background="@drawable/mlr_circular_button"
9494
app:layout_constraintBottom_toBottomOf="parent"
9595
app:layout_constraintStart_toStartOf="parent"
9696
app:layout_constraintTop_toTopOf="parent"
@@ -117,8 +117,8 @@
117117
android:id="@+id/imgCaptureCounterButton"
118118
android:layout_width="@dimen/_52sdp"
119119
android:layout_height="@dimen/_52sdp"
120-
android:src="@drawable/floppy_drive"
121-
android:background="@drawable/circular_button"
120+
android:src="@drawable/mlr_floppy_drive"
121+
android:background="@drawable/mlr_circular_button"
122122
app:layout_constraintBottom_toBottomOf="parent"
123123
app:layout_constraintStart_toStartOf="parent"
124124
android:layout_marginBottom="@dimen/_14sdp"
@@ -137,7 +137,7 @@
137137
tools:text="0"
138138
android:textSize="16sp"
139139
android:textStyle="bold"
140-
android:background="@drawable/circle_badge"
140+
android:background="@drawable/mlr_circle_badge"
141141
android:padding="8dp"
142142
android:textColor="@color/white"
143143
app:layout_constraintStart_toStartOf="@+id/imgCaptureCounterButton"

CameraLibrary/src/main/res/layout/fragment_camera.xml

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
android:id="@+id/closeCameraButton"
3030
android:layout_width="@dimen/_52sdp"
3131
android:layout_height="@dimen/_52sdp"
32-
android:src="@drawable/ic_arrow_back_black_24dp"
33-
android:background="@drawable/circular_button"
32+
android:src="@drawable/mlr_ic_arrow_back_black_24dp"
33+
android:background="@drawable/mlr_circular_button"
3434
app:layout_constraintTop_toTopOf="parent"
3535
app:layout_constraintStart_toStartOf="parent"
3636
android:layout_margin="@dimen/_14sdp"
@@ -50,8 +50,8 @@
5050

5151
<ImageButton
5252
android:id="@+id/imgFlashButton"
53-
android:src="@drawable/no_flash"
54-
android:background="@drawable/circular_button"
53+
android:src="@drawable/mlr_no_flash"
54+
android:background="@drawable/mlr_circular_button"
5555
android:layout_width="@dimen/_52sdp"
5656
android:layout_height="@dimen/_52sdp"
5757
android:layout_alignParentEnd="true"
@@ -89,8 +89,8 @@
8989
android:id="@+id/imgCaptureButton"
9090
android:layout_width="@dimen/_52sdp"
9191
android:layout_height="@dimen/_52sdp"
92-
android:src="@drawable/camera_shutter"
93-
android:background="@drawable/circular_button"
92+
android:src="@drawable/mlr_camera_shutter"
93+
android:background="@drawable/mlr_circular_button"
9494
app:layout_constraintBottom_toBottomOf="parent"
9595
app:layout_constraintStart_toStartOf="parent"
9696
android:layout_margin="@dimen/_14sdp"
@@ -116,8 +116,8 @@
116116
android:id="@+id/imgCaptureCounterButton"
117117
android:layout_width="@dimen/_52sdp"
118118
android:layout_height="@dimen/_52sdp"
119-
android:src="@drawable/floppy_drive"
120-
android:background="@drawable/circular_button"
119+
android:src="@drawable/mlr_floppy_drive"
120+
android:background="@drawable/mlr_circular_button"
121121
app:layout_constraintBottom_toBottomOf="parent"
122122
app:layout_constraintEnd_toEndOf="parent"
123123
android:layout_marginBottom="@dimen/_14sdp"
@@ -136,7 +136,7 @@
136136
tools:text="0"
137137
android:textSize="16sp"
138138
android:textStyle="bold"
139-
android:background="@drawable/circle_badge"
139+
android:background="@drawable/mlr_circle_badge"
140140
android:padding="8dp"
141141
android:textColor="@color/white"
142142
app:layout_constraintStart_toStartOf="@+id/imgCaptureCounterButton"

CameraLibrary/src/main/res/layout/item_thumbnail.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
android:layout_width="@dimen/_32sdp"
3838
android:layout_height="@dimen/_32sdp"
3939
android:visibility="invisible"
40-
android:src="@drawable/ic_delete_"
40+
android:src="@drawable/mlr_ic_delete_"
4141
app:layout_constraintEnd_toEndOf="parent"
4242
app:layout_constraintTop_toTopOf="parent" />
4343
</androidx.constraintlayout.widget.ConstraintLayout>

CameraLibrary/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128

129129
<!-- Custom dialog style -->
130130
<style name="CustomDialog" parent="Theme.AppCompat.Dialog">
131-
<item name="android:windowBackground">@drawable/round_corner</item>
131+
<item name="android:windowBackground">@drawable/mlr_round_corner</item>
132132
<item name="android:layout_width">match_parent</item>
133133
<item name="android:layout_height">wrap_content</item>
134134
<item name="buttonBarStyle">@style/CustomDialogButtonBar</item>

app/src/main/res/layout/cam_results.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
android:layout_width="@dimen/_32sdp"
2222
android:layout_height="@dimen/_32sdp"
2323
android:visibility="visible"
24-
android:src="@drawable/ic_delete_"
24+
android:src="@drawable/mlr_ic_delete_"
2525
app:layout_constraintEnd_toEndOf="parent"
2626
app:layout_constraintTop_toTopOf="parent" />
2727
</androidx.constraintlayout.widget.ConstraintLayout>

gradle/libs.versions.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[versions]
2-
agp = "8.9.0"
2+
agp = "8.9.1"
33
kotlin = "2.0.21"
4-
coreKtx = "1.10.1"
4+
coreKtx = "1.15.0"
55
junit = "4.13.2"
6-
junitVersion = "1.1.5"
6+
junitVersion = "1.2.1"
77
espressoCore = "3.6.1"
88
appcompat = "1.7.0"
99
material = "1.12.0"
10-
activity = "1.8.0"
10+
activity = "1.10.1"
1111
constraintlayout = "2.2.1"
12-
cameraCore = "1.4.1"
12+
cameraCore = "1.4.2"
1313
glideVersion = "4.16.0"
1414

1515
[libraries]

0 commit comments

Comments
 (0)