mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-19 21:01:01 +01:00
removing some empty lines here and there
This commit is contained in:
parent
48fc96158d
commit
8f80fcc83f
@ -38,16 +38,10 @@ import com.simplemobiletools.camera.views.FocusCircleView
|
|||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.*
|
import com.simplemobiletools.commons.helpers.*
|
||||||
import com.simplemobiletools.commons.models.Release
|
import com.simplemobiletools.commons.models.Release
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.layout_flash.flash_auto
|
import kotlinx.android.synthetic.main.layout_flash.*
|
||||||
import kotlinx.android.synthetic.main.layout_flash.flash_off
|
import kotlinx.android.synthetic.main.layout_top.*
|
||||||
import kotlinx.android.synthetic.main.layout_flash.flash_on
|
import java.util.concurrent.TimeUnit
|
||||||
import kotlinx.android.synthetic.main.layout_flash.flash_toggle_group
|
|
||||||
import kotlinx.android.synthetic.main.layout_top.change_resolution
|
|
||||||
import kotlinx.android.synthetic.main.layout_top.default_icons
|
|
||||||
import kotlinx.android.synthetic.main.layout_top.settings
|
|
||||||
import kotlinx.android.synthetic.main.layout_top.toggle_flash
|
|
||||||
|
|
||||||
class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, CameraXPreviewListener {
|
class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, CameraXPreviewListener {
|
||||||
private companion object {
|
private companion object {
|
||||||
@ -105,7 +99,6 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
|
|||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun selectPhotoTab(triggerListener: Boolean = false) {
|
private fun selectPhotoTab(triggerListener: Boolean = false) {
|
||||||
|
@ -105,8 +105,9 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
settings_language.text = Locale.getDefault().displayLanguage
|
settings_language.text = Locale.getDefault().displayLanguage
|
||||||
settings_language_holder.beVisibleIf(isTiramisuPlus())
|
settings_language_holder.beVisibleIf(isTiramisuPlus())
|
||||||
|
|
||||||
settings_general_settings_holder.beGoneIf(settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone() && settings_language_holder.isGone())
|
listOf(settings_general_settings_holder, settings_general_settings_label).forEach {
|
||||||
settings_general_settings_label.beGoneIf(settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone() && settings_language_holder.isGone())
|
it.beGoneIf(settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone() && settings_language_holder.isGone())
|
||||||
|
}
|
||||||
|
|
||||||
settings_language_holder.setOnClickListener {
|
settings_language_holder.setOnClickListener {
|
||||||
launchChangeAppLanguageIntent()
|
launchChangeAppLanguageIntent()
|
||||||
|
@ -342,12 +342,12 @@ class CameraXPreview(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun showChangeResolution() {
|
override fun showChangeResolution() {
|
||||||
|
|
||||||
val selectedResolution = if (isPhotoCapture) {
|
val selectedResolution = if (isPhotoCapture) {
|
||||||
imageQualityManager.getUserSelectedResolution(cameraSelector).toResolutionOption()
|
imageQualityManager.getUserSelectedResolution(cameraSelector).toResolutionOption()
|
||||||
} else {
|
} else {
|
||||||
videoQualityManager.getUserSelectedQuality(cameraSelector).toResolutionOption()
|
videoQualityManager.getUserSelectedQuality(cameraSelector).toResolutionOption()
|
||||||
}
|
}
|
||||||
|
|
||||||
val resolutions = if (isPhotoCapture) {
|
val resolutions = if (isPhotoCapture) {
|
||||||
imageQualityManager.getSupportedResolutions(cameraSelector).map { it.toResolutionOption() }
|
imageQualityManager.getSupportedResolutions(cameraSelector).map { it.toResolutionOption() }
|
||||||
} else {
|
} else {
|
||||||
@ -394,6 +394,7 @@ class CameraXPreview(
|
|||||||
} else {
|
} else {
|
||||||
CameraSelector.DEFAULT_FRONT_CAMERA
|
CameraSelector.DEFAULT_FRONT_CAMERA
|
||||||
}
|
}
|
||||||
|
|
||||||
cameraSelector = newCameraSelector
|
cameraSelector = newCameraSelector
|
||||||
config.lastUsedCameraLens = newCameraSelector.toLensFacing()
|
config.lastUsedCameraLens = newCameraSelector.toLensFacing()
|
||||||
startCamera(switching = true)
|
startCamera(switching = true)
|
||||||
@ -437,7 +438,6 @@ class CameraXPreview(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val mediaOutput = mediaOutputHelper.getImageMediaOutput()
|
val mediaOutput = mediaOutputHelper.getImageMediaOutput()
|
||||||
|
|
||||||
if (mediaOutput is MediaOutput.BitmapOutput) {
|
if (mediaOutput is MediaOutput.BitmapOutput) {
|
||||||
imageCapture.takePicture(mainExecutor, object : OnImageCapturedCallback() {
|
imageCapture.takePicture(mainExecutor, object : OnImageCapturedCallback() {
|
||||||
override fun onCaptureSuccess(image: ImageProxy) {
|
override fun onCaptureSuccess(image: ImageProxy) {
|
||||||
|
@ -10,7 +10,6 @@ import android.hardware.camera2.*
|
|||||||
import android.hardware.camera2.params.MeteringRectangle
|
import android.hardware.camera2.params.MeteringRectangle
|
||||||
import android.hardware.camera2.params.StreamConfigurationMap
|
import android.hardware.camera2.params.StreamConfigurationMap
|
||||||
import android.media.ImageReader
|
import android.media.ImageReader
|
||||||
import android.media.MediaActionSound
|
|
||||||
import android.media.MediaRecorder
|
import android.media.MediaRecorder
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/shutter_animation"
|
android:id="@+id/shutter_animation"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -31,6 +30,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<include layout="@layout/layout_top" />
|
<include layout="@layout/layout_top" />
|
||||||
|
|
||||||
<include layout="@layout/layout_flash" />
|
<include layout="@layout/layout_flash" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@ -75,7 +75,6 @@
|
|||||||
|
|
||||||
</com.google.android.material.tabs.TabLayout>
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/toggle_camera"
|
android:id="@+id/toggle_camera"
|
||||||
android:layout_width="@dimen/icon_size"
|
android:layout_width="@dimen/icon_size"
|
||||||
@ -114,7 +113,6 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/shutter"
|
app:layout_constraintTop_toTopOf="@id/shutter"
|
||||||
tools:src="@tools:sample/backgrounds/scenic" />
|
tools:src="@tools:sample/backgrounds/scenic" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/video_rec_curr_timer"
|
android:id="@+id/video_rec_curr_timer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settings_holder"
|
android:id="@+id/settings_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -286,7 +285,5 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user