2023-06-29 17:54:41 +05:30
|
|
|
package com.ssb.simplitend.userprofile;
|
|
|
|
|
|
2023-07-11 19:01:00 +05:30
|
|
|
import android.content.Intent;
|
2023-06-29 17:54:41 +05:30
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
import androidx.fragment.app.Fragment;
|
2023-07-07 21:07:04 +05:30
|
|
|
import androidx.navigation.Navigation;
|
2023-06-29 17:54:41 +05:30
|
|
|
|
2023-07-07 21:07:04 +05:30
|
|
|
import com.ssb.simplitend.R;
|
2023-07-11 19:01:00 +05:30
|
|
|
import com.ssb.simplitend.careperson_dashboard.DashBoardActivityCP;
|
2023-06-29 17:54:41 +05:30
|
|
|
import com.ssb.simplitend.databinding.ProfileProgressFragmentBinding;
|
|
|
|
|
|
|
|
|
|
public class ProfileProgressFragment extends Fragment {
|
|
|
|
|
|
|
|
|
|
// view binding
|
|
|
|
|
protected ProfileProgressFragmentBinding binding;
|
|
|
|
|
|
|
|
|
|
public ProfileProgressFragment(){
|
|
|
|
|
// required empty const.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
|
@Override
|
|
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
|
|
binding = ProfileProgressFragmentBinding.inflate(inflater, container, false);
|
|
|
|
|
|
2023-07-07 21:07:04 +05:30
|
|
|
initProgress();
|
|
|
|
|
|
|
|
|
|
clickEvents();
|
|
|
|
|
|
2023-06-29 17:54:41 +05:30
|
|
|
return binding.getRoot();
|
|
|
|
|
}
|
2023-07-07 21:07:04 +05:30
|
|
|
|
|
|
|
|
private void initProgress() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void clickEvents() {
|
|
|
|
|
|
|
|
|
|
binding.medicReminder.setOnClickListener(v ->
|
|
|
|
|
Navigation.findNavController(v).navigate(R.id.action_profileProgressFragment_to_reminderFragment)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
binding.medicInfo.setOnClickListener(v ->
|
|
|
|
|
Navigation.findNavController(v).navigate(R.id.action_profileProgressFragment_to_medicalInfoFragment)
|
|
|
|
|
);
|
|
|
|
|
|
2023-07-11 19:01:00 +05:30
|
|
|
binding.setUpRoutine.setOnClickListener(v ->
|
|
|
|
|
Navigation.findNavController(v).navigate(R.id.action_profileProgressFragment_to_routineFragment)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
binding.skipToDashboard.setOnClickListener(v -> {
|
|
|
|
|
Intent intent = new Intent(requireActivity(), DashBoardActivityCP.class);
|
|
|
|
|
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
requireActivity().finish();
|
|
|
|
|
});
|
|
|
|
|
|
2023-07-07 21:07:04 +05:30
|
|
|
}
|
2023-06-29 17:54:41 +05:30
|
|
|
}
|