removing some mipmap icons
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_launcher_name"
|
android:label="@string/app_launcher_name"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
|
@ -121,7 +121,7 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
} else if (intent.action == MediaStore.ACTION_VIDEO_CAPTURE) {
|
} else if (intent.action == MediaStore.ACTION_VIDEO_CAPTURE) {
|
||||||
mIsVideoCaptureIntent = true
|
mIsVideoCaptureIntent = true
|
||||||
hideToggleModeAbout()
|
hideToggleModeAbout()
|
||||||
shutter.setImageDrawable(mRes.getDrawable(R.mipmap.video_rec))
|
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_video_rec))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
mPreview = Preview(this, camera_view, this)
|
mPreview = Preview(this, camera_view, this)
|
||||||
mPreview!!.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
mPreview!!.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
view_holder.addView(mPreview)
|
view_holder.addView(mPreview)
|
||||||
toggle_camera.setImageResource(if (mCurrCamera == Camera.CameraInfo.CAMERA_FACING_BACK) R.mipmap.camera_front else R.mipmap.camera_back)
|
toggle_camera.setImageResource(if (mCurrCamera == Camera.CameraInfo.CAMERA_FACING_BACK) R.drawable.ic_camera_front else R.drawable.ic_camera_back)
|
||||||
|
|
||||||
mFocusRectView = FocusRectView(applicationContext)
|
mFocusRectView = FocusRectView(applicationContext)
|
||||||
view_holder.addView(mFocusRectView)
|
view_holder.addView(mFocusRectView)
|
||||||
@ -198,11 +198,11 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
}
|
}
|
||||||
|
|
||||||
config.lastUsedCamera = mCurrCamera
|
config.lastUsedCamera = mCurrCamera
|
||||||
var newIconId = R.mipmap.camera_front
|
var newIconId = R.drawable.ic_camera_front
|
||||||
mPreview?.releaseCamera()
|
mPreview?.releaseCamera()
|
||||||
if (mPreview?.setCamera(mCurrCamera) == true) {
|
if (mPreview?.setCamera(mCurrCamera) == true) {
|
||||||
if (mCurrCamera == Camera.CameraInfo.CAMERA_FACING_FRONT) {
|
if (mCurrCamera == Camera.CameraInfo.CAMERA_FACING_FRONT) {
|
||||||
newIconId = R.mipmap.camera_back
|
newIconId = R.drawable.ic_camera_back
|
||||||
}
|
}
|
||||||
toggle_camera.setImageResource(newIconId)
|
toggle_camera.setImageResource(newIconId)
|
||||||
disableFlash()
|
disableFlash()
|
||||||
@ -249,14 +249,14 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
|
|
||||||
private fun disableFlash() {
|
private fun disableFlash() {
|
||||||
mPreview?.disableFlash()
|
mPreview?.disableFlash()
|
||||||
toggle_flash.setImageResource(R.mipmap.flash_off)
|
toggle_flash.setImageResource(R.drawable.ic_flash_off)
|
||||||
mIsFlashEnabled = false
|
mIsFlashEnabled = false
|
||||||
config.lastFlashlightState = mIsFlashEnabled
|
config.lastFlashlightState = mIsFlashEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun enableFlash() {
|
private fun enableFlash() {
|
||||||
mPreview?.enableFlash()
|
mPreview?.enableFlash()
|
||||||
toggle_flash.setImageResource(R.mipmap.flash_on)
|
toggle_flash.setImageResource(R.drawable.ic_flash_on)
|
||||||
mIsFlashEnabled = true
|
mIsFlashEnabled = true
|
||||||
config.lastFlashlightState = mIsFlashEnabled
|
config.lastFlashlightState = mIsFlashEnabled
|
||||||
}
|
}
|
||||||
@ -274,11 +274,11 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
Handler().postDelayed({ toggleBottomButtons(false) }, Preview.PHOTO_PREVIEW_LENGTH.toLong())
|
Handler().postDelayed({ toggleBottomButtons(false) }, Preview.PHOTO_PREVIEW_LENGTH.toLong())
|
||||||
} else {
|
} else {
|
||||||
if (mPreview?.toggleRecording() == true) {
|
if (mPreview?.toggleRecording() == true) {
|
||||||
shutter.setImageDrawable(mRes.getDrawable(R.mipmap.video_stop))
|
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_video_stop))
|
||||||
toggle_camera.visibility = View.INVISIBLE
|
toggle_camera.visibility = View.INVISIBLE
|
||||||
showTimer()
|
showTimer()
|
||||||
} else {
|
} else {
|
||||||
shutter.setImageDrawable(mRes.getDrawable(R.mipmap.video_rec))
|
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_video_rec))
|
||||||
toggle_camera.visibility = View.VISIBLE
|
toggle_camera.visibility = View.VISIBLE
|
||||||
hideTimer()
|
hideTimer()
|
||||||
}
|
}
|
||||||
@ -335,8 +335,8 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initPhotoButtons() {
|
private fun initPhotoButtons() {
|
||||||
toggle_photo_video.setImageDrawable(mRes.getDrawable(R.mipmap.videocam))
|
toggle_photo_video.setImageDrawable(mRes.getDrawable(R.drawable.ic_video))
|
||||||
shutter.setImageDrawable(mRes.getDrawable(R.mipmap.camera))
|
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_shutter))
|
||||||
mPreview?.initPhotoMode()
|
mPreview?.initPhotoMode()
|
||||||
setupPreviewImage(true)
|
setupPreviewImage(true)
|
||||||
}
|
}
|
||||||
@ -352,9 +352,9 @@ class MainActivity : SimpleActivity(), SensorEventListener, PreviewListener, Pho
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initVideoButtons() {
|
private fun initVideoButtons() {
|
||||||
toggle_photo_video.setImageDrawable(mRes.getDrawable(R.mipmap.photo))
|
toggle_photo_video.setImageDrawable(mRes.getDrawable(R.drawable.ic_camera))
|
||||||
toggle_camera.visibility = View.VISIBLE
|
toggle_camera.visibility = View.VISIBLE
|
||||||
shutter.setImageDrawable(mRes.getDrawable(R.mipmap.video_rec))
|
shutter.setImageDrawable(mRes.getDrawable(R.drawable.ic_video_rec))
|
||||||
checkFlash()
|
checkFlash()
|
||||||
setupPreviewImage(false)
|
setupPreviewImage(false)
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
android:layout_marginRight="@dimen/normal_margin"
|
android:layout_marginRight="@dimen/normal_margin"
|
||||||
android:layout_marginTop="@dimen/normal_margin"
|
android:layout_marginTop="@dimen/normal_margin"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@mipmap/settings"/>
|
android:src="@drawable/ic_settings_cog"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/toggle_photo_video"
|
android:id="@+id/toggle_photo_video"
|
||||||
@ -34,7 +34,7 @@
|
|||||||
android:layout_below="@+id/settings"
|
android:layout_below="@+id/settings"
|
||||||
android:layout_marginRight="@dimen/normal_margin"
|
android:layout_marginRight="@dimen/normal_margin"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@mipmap/videocam"/>
|
android:src="@drawable/ic_video"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/last_photo_video_preview"
|
android:id="@+id/last_photo_video_preview"
|
||||||
@ -59,14 +59,14 @@
|
|||||||
android:layout_height="@dimen/icon_size"
|
android:layout_height="@dimen/icon_size"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@mipmap/camera_front"/>
|
android:src="@drawable/ic_camera_front"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/shutter"
|
android:id="@+id/shutter"
|
||||||
android:layout_width="@dimen/icon_size"
|
android:layout_width="@dimen/icon_size"
|
||||||
android:layout_height="@dimen/icon_size"
|
android:layout_height="@dimen/icon_size"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:src="@mipmap/camera"/>
|
android:src="@drawable/ic_shutter"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/toggle_flash"
|
android:id="@+id/toggle_flash"
|
||||||
@ -74,7 +74,7 @@
|
|||||||
android:layout_height="@dimen/icon_size"
|
android:layout_height="@dimen/icon_size"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@mipmap/flash_off"/>
|
android:src="@drawable/ic_flash_off"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 485 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 933 B |
Before Width: | Height: | Size: 894 B |
Before Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 602 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 875 B |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 875 B |
Before Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 680 B |
Before Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.1 KiB |