File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
java/com/dan/simplerawcamera Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -871,6 +871,14 @@ class CameraActivity : AppCompatActivity() {
871871 updateSliders()
872872 }
873873
874+ mBinding.switch4X.isChecked = false
875+ mBinding.switch4X.setOnCheckedChangeListener { _, isChecked ->
876+ giveHapticFeedback(mBinding.switchSequences)
877+ val scale = if (isChecked) 4.0f else 1.0f
878+ mBinding.surfaceView.scaleX = scale
879+ mBinding.surfaceView.scaleY = scale
880+ }
881+
874882 mOrientationEventListener = object : OrientationEventListener (this , SensorManager .SENSOR_DELAY_NORMAL ) {
875883 override fun onOrientationChanged (orientation : Int ) {
876884 val screenOrientation = (orientation + 45 ) / 90 * 90 // round to 90°
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22
3- <layout xmlns : android =" http://schemas.android.com/apk/res/android"
3+ <layout xmlns : tools =" http://schemas.android.com/tools"
4+ xmlns : android =" http://schemas.android.com/apk/res/android"
45 xmlns : app =" http://schemas.android.com/apk/res-auto" >
56
67 <LinearLayout
259260 android : thumbTint =" @color/white"
260261 android : visibility =" invisible" />
261262
263+ <Switch
264+ android : id =" @+id/switch4X"
265+ android : layout_width =" match_parent"
266+ android : layout_height =" wrap_content"
267+ android : layout_gravity =" center"
268+ android : checked =" false"
269+ android : gravity =" center"
270+ android : showText =" false"
271+ android : text =" View 4x"
272+ android : textAlignment =" center"
273+ android : textColor =" @color/teal_200"
274+ android : textStyle =" bold"
275+ tools : checked =" false" />
276+
262277 <LinearLayout
263278 android : layout_width =" 0dp"
264279 android : layout_height =" 0dp"
You can’t perform that action at this time.
0 commit comments