Fixed locationList

This commit is contained in:
RemoMeijer
2021-01-05 10:09:24 +01:00
parent 678b179e04
commit a75b81033f
2 changed files with 11 additions and 13 deletions

View File

@@ -19,20 +19,17 @@ public class LocationDetailFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_location_detail, container, false);
//
// this.imageButton = view.findViewById(R.id.detail_location_back_button);
// this.imageButton.setOnClickListener(v -> {
// LocationFragment locationFragment = new LocationFragment();
// ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationFragment).addToBackStack(null).commit();
// });
this.imageButton = view.findViewById(R.id.detail_location_back_button);
this.imageButton.setOnClickListener(v -> {
LocationFragment locationFragment = new LocationFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationFragment).addToBackStack(null).commit();
});
return view;
}

View File

@@ -29,11 +29,12 @@
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="0dp"
android:layout_height="0dp"
android:id="@+id/locationRecyclerView"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="60dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/routeBackButton" />
app:layout_constraintTop_toBottomOf="@+id/location_RV" />
</androidx.constraintlayout.widget.ConstraintLayout>