Loading app/src/main/java/io/eelo/appinstaller/categories/category/CategoryActivity.kt +2 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import io.eelo.appinstaller.applicationmanager.ApplicationManagerServiceConnecti import io.eelo.appinstaller.categories.category.viewmodel.CategoryViewModel import io.eelo.appinstaller.categories.model.Category import io.eelo.appinstaller.common.ApplicationListAdapter import io.eelo.appinstaller.utils.Common import io.eelo.appinstaller.utils.Constants import io.eelo.appinstaller.utils.Constants.CATEGORY_KEY import kotlinx.android.synthetic.main.activity_category.* Loading Loading @@ -102,7 +101,8 @@ class CategoryActivity : AppCompatActivity(), ApplicationManagerServiceConnectio // Bind to the screen error categoryViewModel.getScreenError().observe(this, Observer { if (it != null) { if (!isLoadingMoreApplications) { if (!isLoadingMoreApplications && applicationList.size >= Constants.RESULTS_PER_PAGE) { errorDescription.text = getString(it.description) errorContainer.visibility = View.VISIBLE progressBar.visibility = View.GONE Loading app/src/main/java/io/eelo/appinstaller/search/SearchFragment.kt +3 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import io.eelo.appinstaller.application.model.Application import io.eelo.appinstaller.applicationmanager.ApplicationManager import io.eelo.appinstaller.common.ApplicationListAdapter import io.eelo.appinstaller.search.viewModel.SearchViewModel import io.eelo.appinstaller.utils.Common import io.eelo.appinstaller.utils.Constants import io.eelo.appinstaller.utils.Constants.SUGGESTION_KEY class SearchFragment : Fragment(), SearchView.OnQueryTextListener, SearchView.OnSuggestionListener { Loading Loading @@ -90,7 +90,8 @@ class SearchFragment : Fragment(), SearchView.OnQueryTextListener, SearchView.On loadMoreContainer.visibility = View.GONE recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { if (!recyclerView.canScrollVertically(1)) { if (!recyclerView.canScrollVertically(1) && applicationList.size >= Constants.RESULTS_PER_PAGE) { loadMoreContainer.visibility = View.VISIBLE recyclerView.scrollToPosition(applicationList.size - 1) if (!isLoadingMoreApplications) { Loading Loading
app/src/main/java/io/eelo/appinstaller/categories/category/CategoryActivity.kt +2 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import io.eelo.appinstaller.applicationmanager.ApplicationManagerServiceConnecti import io.eelo.appinstaller.categories.category.viewmodel.CategoryViewModel import io.eelo.appinstaller.categories.model.Category import io.eelo.appinstaller.common.ApplicationListAdapter import io.eelo.appinstaller.utils.Common import io.eelo.appinstaller.utils.Constants import io.eelo.appinstaller.utils.Constants.CATEGORY_KEY import kotlinx.android.synthetic.main.activity_category.* Loading Loading @@ -102,7 +101,8 @@ class CategoryActivity : AppCompatActivity(), ApplicationManagerServiceConnectio // Bind to the screen error categoryViewModel.getScreenError().observe(this, Observer { if (it != null) { if (!isLoadingMoreApplications) { if (!isLoadingMoreApplications && applicationList.size >= Constants.RESULTS_PER_PAGE) { errorDescription.text = getString(it.description) errorContainer.visibility = View.VISIBLE progressBar.visibility = View.GONE Loading
app/src/main/java/io/eelo/appinstaller/search/SearchFragment.kt +3 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import io.eelo.appinstaller.application.model.Application import io.eelo.appinstaller.applicationmanager.ApplicationManager import io.eelo.appinstaller.common.ApplicationListAdapter import io.eelo.appinstaller.search.viewModel.SearchViewModel import io.eelo.appinstaller.utils.Common import io.eelo.appinstaller.utils.Constants import io.eelo.appinstaller.utils.Constants.SUGGESTION_KEY class SearchFragment : Fragment(), SearchView.OnQueryTextListener, SearchView.OnSuggestionListener { Loading Loading @@ -90,7 +90,8 @@ class SearchFragment : Fragment(), SearchView.OnQueryTextListener, SearchView.On loadMoreContainer.visibility = View.GONE recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { if (!recyclerView.canScrollVertically(1)) { if (!recyclerView.canScrollVertically(1) && applicationList.size >= Constants.RESULTS_PER_PAGE) { loadMoreContainer.visibility = View.VISIBLE recyclerView.scrollToPosition(applicationList.size - 1) if (!isLoadingMoreApplications) { Loading