create a dialog for changing resolutions

This commit is contained in:
tibbi
2017-03-20 21:02:20 +01:00
parent 74863e3149
commit 0afb2d57a8
13 changed files with 117 additions and 20 deletions

View File

@ -0,0 +1,28 @@
package com.simplemobiletools.camera.dialogs
import android.support.v7.app.AlertDialog
import android.view.LayoutInflater
import com.simplemobiletools.camera.R
import com.simplemobiletools.camera.activities.SimpleActivity
import com.simplemobiletools.commons.extensions.setupDialogStuff
import kotlinx.android.synthetic.main.dialog_change_resolution.view.*
class ChangeResolutionDialog(val activity: SimpleActivity, val backCamera: Boolean, val callback: () -> Unit) {
init {
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_change_resolution, null).apply {
change_resolution_photo_holder.setOnClickListener {
}
change_resolution_video_holder.setOnClickListener {
}
}
AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, null)
.create().apply {
activity.setupDialogStuff(view, this, if (backCamera) R.string.back_camera else R.string.front_camera)
}
}
}