Updated strings and values to @string/

This commit is contained in:
RemoMeijer
2021-01-05 13:15:25 +01:00
parent d53f63a6d7
commit bc8b83e4f6
18 changed files with 104 additions and 69 deletions

View File

@@ -3,10 +3,12 @@ package com.a1.nextlocation.fragments;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.TextView;
import com.a1.nextlocation.R;
@@ -16,6 +18,7 @@ public class RouteDetailFragment extends Fragment {
private Route route;
private TextView routeDetailText;
private ImageButton imageButton;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -33,6 +36,12 @@ public class RouteDetailFragment extends Fragment {
this.routeDetailText = view.findViewById(R.id.routeDetailText);
this.routeDetailText.setText(this.route.getName());
this.imageButton = view.findViewById(R.id.route_detail_back_button);
this.imageButton.setOnClickListener(v -> {
RouteFragment routeFragment = new RouteFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, routeFragment).addToBackStack(null).commit();
});
return view;
}