Fix layout favorite food

This commit is contained in:
Nezumi
2023-03-16 20:47:53 +07:00
parent ebd313e32c
commit 14ec27ce28
4 changed files with 10 additions and 26 deletions
@@ -8,6 +8,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
@@ -31,19 +32,26 @@ import io.paperdb.Paper;
public class ProfileFragment extends Fragment {
LinearLayout account_and_profile, manage_address, favorite_food, order_history, log_out;
PopupDialog popupDialog;
TextView user_name;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_profile, container, false);
//Init component
account_and_profile = rootView.findViewById(R.id.account_and_profile);
manage_address = rootView.findViewById(R.id.manage_address);
favorite_food = rootView.findViewById(R.id.favorite_food);
order_history = rootView.findViewById(R.id.order_history);
log_out = rootView.findViewById(R.id.log_out);
user_name = rootView.findViewById(R.id.user_name);
popupDialog = PopupDialog.getInstance(getContext());
//Set user name on textview
user_name.setText(Common.CURRENT_USER.getFullName());
account_and_profile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {