day2_commit.1.10_merged
This commit is contained in:
parent
bc159d38a0
commit
4410d2970d
@ -41,6 +41,10 @@ dependencies {
|
|||||||
implementation ("com.squareup.retrofit2:converter-gson:2.9.0")
|
implementation ("com.squareup.retrofit2:converter-gson:2.9.0")
|
||||||
implementation ("com.squareup.okhttp3:okhttp:4.9.0")
|
implementation ("com.squareup.okhttp3:okhttp:4.9.0")
|
||||||
implementation ("com.github.bumptech.glide:glide:4.15.1")
|
implementation ("com.github.bumptech.glide:glide:4.15.1")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
|
implementation("com.google.android.material:material:1.10.0")
|
||||||
|
implementation("androidx.activity:activity:1.10.0")
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
kapt ("com.github.bumptech.glide:compiler:4.15.1")
|
kapt ("com.github.bumptech.glide:compiler:4.15.1")
|
||||||
|
|
||||||
defaultLibrary()
|
defaultLibrary()
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"> <!-- Минимальная и целевая версия SDK по тз (28 и 34) -->
|
||||||
|
|
||||||
<!-- Минимальная и целевая версия SDK по тз (28 и 34) -->
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="28"
|
android:minSdkVersion="28"
|
||||||
android:targetSdkVersion="34" />
|
android:targetSdkVersion="34" />
|
||||||
@ -24,6 +22,9 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Default"
|
android:theme="@style/Theme.Default"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".ui.Main.AdminFragment"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.RootActivity"
|
android:name=".ui.RootActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
@ -1,60 +1,21 @@
|
|||||||
package ru.myitschool.work.ui.Main
|
package ru.myitschool.work.ui.Main
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.activity.enableEdgeToEdge
|
||||||
import android.view.LayoutInflater
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.view.View
|
import androidx.core.view.ViewCompat
|
||||||
import android.view.ViewGroup
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import ru.myitschool.work.R
|
import ru.myitschool.work.R
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
class AdminFragment : AppCompatActivity() {
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
private const val ARG_PARAM1 = "param1"
|
|
||||||
private const val ARG_PARAM2 = "param2"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple [Fragment] subclass.
|
|
||||||
* Use the [AdminFragment.newInstance] factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
class AdminFragment : Fragment() {
|
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private var param1: String? = null
|
|
||||||
private var param2: String? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
arguments?.let {
|
enableEdgeToEdge()
|
||||||
param1 = it.getString(ARG_PARAM1)
|
setContentView(R.layout.fragment_admin)
|
||||||
param2 = it.getString(ARG_PARAM2)
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
|
||||||
|
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
|
||||||
|
insets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(
|
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
|
||||||
savedInstanceState: Bundle?
|
|
||||||
): View? {
|
|
||||||
// Inflate the layout for this fragment
|
|
||||||
return inflater.inflate(R.layout.fragment_admin, container, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
/**
|
|
||||||
* Use this factory method to create a new instance of
|
|
||||||
* this fragment using the provided parameters.
|
|
||||||
*
|
|
||||||
* @param param1 Parameter 1.
|
|
||||||
* @param param2 Parameter 2.
|
|
||||||
* @return A new instance of fragment AdminFragment.
|
|
||||||
*/
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
@JvmStatic
|
|
||||||
fun newInstance(param1: String, param2: String) =
|
|
||||||
AdminFragment().apply {
|
|
||||||
arguments = Bundle().apply {
|
|
||||||
putString(ARG_PARAM1, param1)
|
|
||||||
putString(ARG_PARAM2, param2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,14 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.Main.AdminFragment">
|
tools:context=".ui.Main.AdminFragment">
|
||||||
|
|
||||||
<!-- TODO: Update blank fragment layout -->
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/hello_blank_fragment" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
Loading…
x
Reference in New Issue
Block a user