From 95d9503f2d11aeb4a0d7231388ef3ad399c5287e Mon Sep 17 00:00:00 2001 From: git Date: Fri, 11 Oct 2024 18:13:10 +0300 Subject: [PATCH] add data and login --- .idea/deploymentTargetDropDown.xml | 26 ++++++++++++++++- app/src/main/AndroidManifest.xml | 3 ++ .../com/example/sampleapp/AboutUserActivty.kt | 15 ++++++++++ .../com/example/sampleapp/MainActivity.kt | 29 +++++++++++++++---- .../java/com/example/sampleapp/data/Users.kt | 11 +++++++ .../layout/activity_about_user_activty.xml | 16 ++++++++++ 6 files changed, 94 insertions(+), 6 deletions(-) create mode 100644 app/src/main/java/com/example/sampleapp/AboutUserActivty.kt create mode 100644 app/src/main/java/com/example/sampleapp/data/Users.kt create mode 100644 app/src/main/res/layout/activity_about_user_activty.xml diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 0c0c338..79f999d 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -3,7 +3,31 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c201138..4618f87 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,6 +12,9 @@ android:supportsRtl="true" android:theme="@style/Theme.Sampleapp" tools:targetApi="31"> + diff --git a/app/src/main/java/com/example/sampleapp/AboutUserActivty.kt b/app/src/main/java/com/example/sampleapp/AboutUserActivty.kt new file mode 100644 index 0000000..aef3f24 --- /dev/null +++ b/app/src/main/java/com/example/sampleapp/AboutUserActivty.kt @@ -0,0 +1,15 @@ +package com.example.sampleapp + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import android.widget.TextView + +class AboutUserActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_about_user_activty) + val textView = findViewById(R.id.AboutUserTextView) + textView.text = intent.getStringExtra("user") + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/sampleapp/MainActivity.kt b/app/src/main/java/com/example/sampleapp/MainActivity.kt index caccb24..1c5ab9a 100644 --- a/app/src/main/java/com/example/sampleapp/MainActivity.kt +++ b/app/src/main/java/com/example/sampleapp/MainActivity.kt @@ -1,10 +1,13 @@ package com.example.sampleapp +import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.EditText import android.widget.Toast +import androidx.core.os.bundleOf +import com.example.sampleapp.data.users class MainActivity : AppCompatActivity(R.layout.activity_main) { override fun onCreate(savedInstanceState: Bundle?) { @@ -12,13 +15,29 @@ class MainActivity : AppCompatActivity(R.layout.activity_main) { val loginEditText = findViewById(R.id.LoginEditText) val passwordEditText = findViewById(R.id.PasswordEditText) val button = findViewById