diff --git a/app/build.gradle b/app/build.gradle
index 57688408..9ee1f90c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -60,4 +60,8 @@ dependencies {
implementation 'androidx.activity:activity-ktx:1.9.0'
implementation 'androidx.fragment:fragment-ktx:1.7.1'
implementation 'com.squareup.picasso:picasso:2.71828'
+ implementation 'androidx.compose.runtime:runtime-android:1.7.5'
+ implementation 'androidx.compose.ui:ui-android:1.7.5'
+ implementation 'androidx.compose.material3:material3-android:1.3.1'
+ implementation 'androidx.activity:activity:1.9.3'
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e3d3319b..c7b7dd10 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,6 +2,14 @@
+
+
+
+
+
+
-
+
@@ -22,6 +32,15 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/otus/gpb/homework/activities/EditProfileActivity.kt b/app/src/main/java/otus/gpb/homework/activities/EditProfileActivity.kt
index d55ee922..114fba54 100644
--- a/app/src/main/java/otus/gpb/homework/activities/EditProfileActivity.kt
+++ b/app/src/main/java/otus/gpb/homework/activities/EditProfileActivity.kt
@@ -1,14 +1,41 @@
package otus.gpb.homework.activities
+import android.Manifest
+import android.app.AlertDialog
+import android.content.Context
+import android.content.DialogInterface
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
import android.os.Bundle
+import android.os.Environment
+import android.provider.MediaStore
+import android.provider.Settings
+import android.util.Log
+import android.widget.Button
import android.widget.ImageView
+import android.widget.TextView
+import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
+import androidx.core.content.ContentProviderCompat.requireContext
+import androidx.core.content.FileProvider
+import androidx.core.graphics.drawable.toBitmap
+import java.io.ByteArrayOutputStream
+import java.io.File
+import java.io.FileOutputStream
+import java.io.IOException
+
+const val KEY_FIRST_NAME = "FIRST_NAME"
+const val KEY_SECOND_NAME = "SECOND_NAME"
+const val KEY_AGE = "AGE"
class EditProfileActivity : AppCompatActivity() {
+ private enum class AlertsDlg {DLG_PHOTO, DLG_SECOND_CAMERA_PERMISSION_REQ, DLG_OPEN_SETTINGS}
+ private enum class Menu(val value: Int) { TAKE_PHOTO(0), SELECT_PHOTO(1)}
private lateinit var imageView: ImageView
override fun onCreate(savedInstanceState: Bundle?) {
@@ -28,6 +55,98 @@ class EditProfileActivity : AppCompatActivity() {
}
}
}
+
+ findViewById(R.id.imageview_photo).setOnClickListener {
+ AlertDialog.Builder(this).apply {
+ setTitle("Фото")
+ setIcon(android.R.drawable.ic_dialog_info)
+ setItems(arrayOf("Сделать фото", "Выбрать фото"), AlertsDlgClickListener(AlertsDlg.DLG_PHOTO))
+ setNegativeButton("Отмена", null)
+ show()
+ }
+ }
+
+ findViewById