Updated buttons
This commit is contained in:
@@ -41,18 +41,18 @@ public class CouponFragment extends Fragment {
|
|||||||
this.couponRecyclerView.setHasFixedSize(true);
|
this.couponRecyclerView.setHasFixedSize(true);
|
||||||
this.layoutManager = new LinearLayoutManager(this.getContext());
|
this.layoutManager = new LinearLayoutManager(this.getContext());
|
||||||
|
|
||||||
this.imageButton = view.findViewById(R.id.coupon_back_button);
|
|
||||||
this.imageButton.setOnClickListener(v -> {
|
|
||||||
StatisticFragment statisticFragment = new StatisticFragment();
|
|
||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, statisticFragment).addToBackStack(null).commit();
|
|
||||||
});
|
|
||||||
|
|
||||||
CouponListManager.INSTANCE.setContext(this.getContext());
|
CouponListManager.INSTANCE.setContext(this.getContext());
|
||||||
CouponListManager.INSTANCE.load();
|
CouponListManager.INSTANCE.load();
|
||||||
this.couponList = CouponListManager.INSTANCE.getCouponList();
|
this.couponList = CouponListManager.INSTANCE.getCouponList();
|
||||||
|
|
||||||
this.couponAdapter = new CouponAdapter(this.getContext(), this.couponList, clickedPosition -> showPopup(this.couponList.get(clickedPosition)));
|
this.couponAdapter = new CouponAdapter(this.getContext(), this.couponList, clickedPosition -> showPopup(this.couponList.get(clickedPosition)));
|
||||||
|
|
||||||
|
this.imageButton = view.findViewById(R.id.coupon_back_button);
|
||||||
|
this.imageButton.setOnClickListener(v -> {
|
||||||
|
StatisticFragment statisticFragment = new StatisticFragment();
|
||||||
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, statisticFragment).addToBackStack(null).commit();
|
||||||
|
});
|
||||||
|
|
||||||
this.couponRecyclerView.setLayoutManager(this.layoutManager);
|
this.couponRecyclerView.setLayoutManager(this.layoutManager);
|
||||||
this.couponRecyclerView.setAdapter(this.couponAdapter);
|
this.couponRecyclerView.setAdapter(this.couponAdapter);
|
||||||
return view;
|
return view;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class SettingsFragment extends Fragment {
|
|||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
Spinner dropdown = view.findViewById(R.id.dropdown_menu_Settings);
|
Spinner dropdown = view.findViewById(R.id.dropdown_menu_Settings);
|
||||||
|
|
||||||
this.imageButton = view.findViewById(R.id.route_detail_back_button);
|
this.imageButton = view.findViewById(R.id.settings_back_button);
|
||||||
this.imageButton.setOnClickListener(v -> {
|
this.imageButton.setOnClickListener(v -> {
|
||||||
HomeFragment homeFragment = new HomeFragment();
|
HomeFragment homeFragment = new HomeFragment();
|
||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
@@ -7,23 +8,25 @@
|
|||||||
android:layout_margin="20dp">
|
android:layout_margin="20dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/location_image"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:id="@+id/location_image"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
/>
|
app:layout_constraintEnd_toStartOf="@id/location_name"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/location_name"
|
android:id="@+id/location_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="321dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="47dp"
|
||||||
android:layout_marginEnd="240dp"
|
android:gravity="left"
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/locaties"
|
android:text="@string/locaties"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.0" />
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user