Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
f3fddc4936
@ -1,38 +0,0 @@
|
|||||||
package ru.myitschool.work.ui.entrylast
|
|
||||||
|
|
||||||
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
|
|
||||||
import ru.myitschool.work.databinding.FragmentEntryListBinding
|
|
||||||
import ru.myitschool.work.databinding.FragmentLoginBinding
|
|
||||||
import ru.myitschool.work.ui.login.LoginViewModel
|
|
||||||
|
|
||||||
class EntryListFragment : Fragment(R.layout.fragment_entry_list) {
|
|
||||||
|
|
||||||
private var _binding: FragmentEntryListBinding? = null
|
|
||||||
private val binding: FragmentEntryListBinding get() = _binding!!
|
|
||||||
|
|
||||||
private val viewModel: LoginViewModel by viewModels()
|
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
|
||||||
super.onViewCreated(view, savedInstanceState)
|
|
||||||
_binding = FragmentEntryListBinding.bind(view)
|
|
||||||
|
|
||||||
}
|
|
||||||
private fun subscribe(){
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initCallback(){
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroyView() {
|
|
||||||
_binding = null
|
|
||||||
super.onDestroyView()
|
|
||||||
}
|
|
||||||
}
|
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package ru.myitschool.work.ui.entrylast
|
package ru.myitschool.work.ui.entrylist
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
|
|
@ -1,13 +1,38 @@
|
|||||||
<?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/frameLayout2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.entrylast.EntryListFragment">
|
android:padding="16dp"
|
||||||
|
tools:context=".ui.entrylist.EntryListFragment">
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/floatingActionButton2"
|
||||||
|
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
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/textView5"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:text="Hello" />
|
android:layout_height="wrap_content"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/floatingActionButton2"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/floatingActionButton2"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/floatingActionButton2" />
|
||||||
|
|
||||||
</FrameLayout>
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="645dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/floatingActionButton2" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
x
Reference in New Issue
Block a user