Skip to content

Commit

Permalink
Add new icon for mirror camera
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Apr 27, 2024
1 parent 70351f4 commit 7ca42fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object MirrorCameraToolRegistration : ToolRegistration {
return Tool(
Tools.MIRROR_CAMERA,
context.getString(R.string.mirror_camera),
R.drawable.ic_camera, // TODO: Get an icon
R.drawable.ic_mirror_camera,
R.id.mirrorCameraFragment,
ToolCategory.Other,
isAvailable = { Camera.hasFrontCamera(it) }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package com.kylecorry.trail_sense.tools.mirror.ui

import android.graphics.Color
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.camera.view.PreviewView
import com.kylecorry.andromeda.core.system.Screen
import com.kylecorry.andromeda.core.ui.Colors.withAlpha
import com.kylecorry.andromeda.fragments.BoundFragment
import com.kylecorry.andromeda.torch.ScreenTorch
import com.kylecorry.trail_sense.databinding.FragmentToolMirrorCameraBinding
Expand All @@ -22,7 +25,7 @@ class ToolMirrorCameraFragment : BoundFragment<FragmentToolMirrorCameraBinding>(

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.camera.setScaleType(PreviewView.ScaleType.FILL_CENTER)
binding.camera.setScaleType(PreviewView.ScaleType.FIT_CENTER)
binding.camera.setShowTorch(false)
}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/drawable/ic_mirror_camera.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- drawable/mirror_rectangle.xml --><vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#ffffff" android:pathData="M8.29 10.28L11.53 7.03L12.59 8.09L9.35 11.34L8.29 10.28M8.7 14.61L14.36 8.95L15.42 10L9.76 15.67L8.7 14.61M18 3V21H6V3H18M20 1H4V23H20V1Z" /></vector>
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_tool_mirror_camera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
android:id="@+id/camera"
android:layout_width="0dp"
android:layout_height="0dp"
android:keepScreenOn="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.8"
Expand Down

0 comments on commit 7ca42fa

Please sign in to comment.