Added List button on Home
This commit is contained in:
@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
import com.a1.nextlocation.R;
|
||||
import com.a1.nextlocation.data.Location;
|
||||
@@ -25,6 +26,7 @@ public class LocationFragment extends Fragment {
|
||||
private LocationAdapter locationAdapter;
|
||||
private RecyclerView.LayoutManager layoutManager;
|
||||
private List<Location> locationList;
|
||||
private ImageButton imageButton;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@@ -40,6 +42,12 @@ public class LocationFragment extends Fragment {
|
||||
this.locationRecyclerView.setHasFixedSize(true);
|
||||
this.layoutManager = new LinearLayoutManager(this.getContext());
|
||||
|
||||
// this.imageButton = view.findViewById(R.id.locationBackButton);
|
||||
// this.imageButton.setOnClickListener(v -> {
|
||||
// HomeFragment homeFragment = new HomeFragment();
|
||||
// ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
||||
// });
|
||||
|
||||
LocationListManager.INSTANCE.setContext(this.getContext());
|
||||
LocationListManager.INSTANCE.load();
|
||||
this.locationList = LocationListManager.INSTANCE.getLocationList();
|
||||
|
||||
Reference in New Issue
Block a user