commit 2f937a5073e70f1985cc91250e8688433efa9625 Author: Fabio Mazza Date: Tue Sep 29 16:06:36 2026 +0200 Remove additional fragment code diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/MainScreenFragment.java b/app/src/main/java/it/reyboz/bustorino/fragments/MainScreenFragment.java index 98f566b..bd34baf 100644 --- a/app/src/main/java/it/reyboz/bustorino/fragments/MainScreenFragment.java +++ b/app/src/main/java/it/reyboz/bustorino/fragments/MainScreenFragment.java @@ -913,6 +913,8 @@ public class MainScreenFragment extends BarcodeFragment implements FragmentList } + /* + // KEEPING THIS METHODS AS EXAMPLES FOR SHOW boolean searchStopsResultsFragmentShown(){ Fragment frag = childFragMan.findFragmentById(R.id.resultFrame); return frag instanceof StopSearchResultFragment; @@ -940,6 +942,7 @@ public class MainScreenFragment extends BarcodeFragment implements FragmentList trans.addToBackStack(null); trans.commit(); } + */ @Override public void openLineFromStop(String routeGtfsId, @Nullable String stopIDFrom) { diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/StopSearchResultFragment.kt b/app/src/main/java/it/reyboz/bustorino/fragments/StopSearchResultFragment.kt deleted file mode 100644 index 604fe7e..0000000 --- a/app/src/main/java/it/reyboz/bustorino/fragments/StopSearchResultFragment.kt +++ /dev/null @@ -1,53 +0,0 @@ -package it.reyboz.bustorino.fragments - -import android.os.Bundle -import android.view.View -import android.widget.ListView -import androidx.fragment.app.activityViewModels -import androidx.lifecycle.ViewModelProvider -import it.reyboz.bustorino.adapters.StopAdapter -import it.reyboz.bustorino.viewmodels.SearchStopsDBViewModel -import kotlin.math.min - -class StopSearchResultFragment: ResultListFragment() { - - - private var stopAdapter: StopAdapter? = null - - private val searchViewModel: SearchStopsDBViewModel by activityViewModels() - - private lateinit var listView: ListView - - - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - - - - //searchViewModel = ViewModelProvider(requireActivity()).get(SearchStopsDBViewModel::class.java) - searchViewModel.queryResultsLiveData.observe(viewLifecycleOwner){ stops -> - - val adapter = StopAdapter(requireContext(), stops.subList(0, min(15, stops.size)),) - //resetListAdapter(adapter) - resultsListView.adapter = adapter - resultsListView.visibility = View.VISIBLE - } - - } - - companion object { - @JvmStatic - fun newInstance(): StopSearchResultFragment { - val args = Bundle() - //TODO: search stops inside the DB - //args.putString(StopListFragment.WORDS_SEARCHED, searchQuery) - val fragment = StopSearchResultFragment() - args.putSerializable(LIST_TYPE, FragmentKind.STOPS) - fragment.setArguments(args) - return fragment - } - } - - -} \ No newline at end of file