Merge branch 'statisticsFragment' into RecyclerView
This commit is contained in:
@@ -2,11 +2,14 @@ package com.a1.nextlocation.fragments;
|
|||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.a1.nextlocation.R;
|
import com.a1.nextlocation.R;
|
||||||
|
|
||||||
@@ -21,7 +24,12 @@ public class StatisticFragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
View view = inflater.inflate(R.layout.fragment_statistic, container, false);
|
||||||
return inflater.inflate(R.layout.fragment_statistic, container, false);
|
ConstraintLayout constraintLayout = view.findViewById(R.id.Box4);
|
||||||
|
constraintLayout.setOnClickListener(v -> {
|
||||||
|
CouponFragment couponFragment = new CouponFragment();
|
||||||
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit();
|
||||||
|
});
|
||||||
|
return view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user