kopia lustrzana https://github.com/TeamNewPipe/NewPipe
removed unnecessary spaces - code change
rodzic
745773b207
commit
9b6a201bbb
|
@ -80,17 +80,13 @@ class FeedFragment : BaseListFragment<FeedState, Unit>() {
|
|||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
|
||||
return inflater.inflate(R.layout.fragment_feed, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(rootView: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(rootView, savedInstanceState)
|
||||
swipeRefreshLayout = requireView().findViewById(R.id.swiperefresh)
|
||||
swipeRefreshLayout.setOnRefreshListener {
|
||||
reloadContent()
|
||||
}
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener { reloadContent() }
|
||||
viewModel = ViewModelProvider(this, FeedViewModel.Factory(requireContext(), groupId)).get(FeedViewModel::class.java)
|
||||
viewModel.stateLiveData.observe(viewLifecycleOwner, Observer { it?.let(::handleResult) })
|
||||
}
|
||||
|
@ -196,10 +192,8 @@ class FeedFragment : BaseListFragment<FeedState, Unit>() {
|
|||
|
||||
empty_state_view?.let { animateView(it, false, 0) }
|
||||
animateView(error_panel, false, 0)
|
||||
if (swipeRefreshLayout.isRefreshing){
|
||||
swipeRefreshLayout.isRefreshing = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun showEmptyState() {
|
||||
animateView(refresh_root_view, true, 200)
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/refresh_root_view"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -74,17 +70,16 @@
|
|||
android:background="?attr/separator_color" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swiperefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/refresh_root_view">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/items_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:scrollbars="vertical"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/list_stream_item"
|
||||
|
|
Ładowanie…
Reference in New Issue