Список всего для пользователя. Для админа был удален
This commit is contained in:
parent
9cf6d4c4dc
commit
d317daf38d
@ -35,6 +35,10 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
|
||||||
|
implementation("androidx.fragment:fragment-ktx:1.5.6")
|
||||||
defaultLibrary()
|
defaultLibrary()
|
||||||
|
|
||||||
implementation(Dependencies.AndroidX.activity)
|
implementation(Dependencies.AndroidX.activity)
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package ru.myitschool.work.ui.entrylist
|
||||||
|
|
||||||
|
import androidx.fragment.app.viewModels
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import ru.myitschool.work.R
|
||||||
|
|
||||||
|
class EntryListFragment : Fragment() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance() = EntryListFragment()
|
||||||
|
}
|
||||||
|
|
||||||
|
private val viewModel: EntryListViewModel by viewModels()
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
// TODO: Use the ViewModel
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
return inflater.inflate(R.layout.fragment_entry_list, container, false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package ru.myitschool.work.ui.entrylist
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
||||||
|
class EntryListViewModel : ViewModel() {
|
||||||
|
// TODO: Implement the ViewModel
|
||||||
|
}
|
37
app/src/main/res/layout/fragment_entry_list.xml
Normal file
37
app/src/main/res/layout/fragment_entry_list.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<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"
|
||||||
|
android:id="@+id/frameLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="16dp"
|
||||||
|
tools:context=".ui.entrylist.EntryListFragment">
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/close"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:src="@drawable/ic_close"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/close"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/close"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/close" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/close" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -4,4 +4,5 @@ plugins {
|
|||||||
kotlinJvm version Version.Kotlin.language apply false
|
kotlinJvm version Version.Kotlin.language apply false
|
||||||
kotlinAnnotationProcessor version Version.Kotlin.language apply false
|
kotlinAnnotationProcessor version Version.Kotlin.language apply false
|
||||||
id("com.google.dagger.hilt.android") version "2.51.1" apply false
|
id("com.google.dagger.hilt.android") version "2.51.1" apply false
|
||||||
|
id("org.jetbrains.kotlin.android") version "1.9.24" apply false
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user