// Path: firestore/app/src/main/java/com/google/firebase/example/fireeats/java/model/Rating.java
// public class Rating {
// 
//     private String userId;
//     private String userName;
//     private double rating;
//     private String text;
//     private @ServerTimestamp Date timestamp;
// 
//     public Rating() {}
// 
//     public Rating(FirebaseUser user, double rating, String text) {
//         this.userId = user.getUid();
//         this.userName = user.getDisplayName();
//         if (TextUtils.isEmpty(this.userName)) {
//             this.userName = user.getEmail();
//         }
// 
//         this.rating = rating;
//         this.text = text;
//     }
// 
//     public String getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(String userId) {
//         this.userId = userId;
//     }
// 
//     public String getUserName() {
//         return userName;
//     }
// 
//     public void setUserName(String userName) {
//         this.userName = userName;
//     }
// 
//     public double getRating() {
//         return rating;
//     }
// 
//     public void setRating(double rating) {
//         this.rating = rating;
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     public void setText(String text) {
//         this.text = text;
//     }
// 
//     public Date getTimestamp() {
//         return timestamp;
//     }
// 
//     public void setTimestamp(Date timestamp) {
//         this.timestamp = timestamp;
//     }
// }


import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.example.fireeats.R;
import com.google.firebase.example.fireeats.databinding.DialogRatingBinding;
import com.google.firebase.example.fireeats.java.model.Rating;
import me.zhanghai.android.materialratingbar.MaterialRatingBar;
package com.google.firebase.example.fireeats.java;





/**
 * Dialog Fragment containing rating form.
 */
public class RatingDialogFragment extends DialogFragment implements View.OnClickListener {

    public static final String TAG = "RatingDialog";

    private DialogRatingBinding mBinding;
    
    interface RatingListener {

// Path: firestore/app/src/main/java/com/google/firebase/example/fireeats/java/model/Rating.java
// public class Rating {
// 
//     private String userId;
//     private String userName;
//     private double rating;
//     private String text;
//     private @ServerTimestamp Date timestamp;
// 
//     public Rating() {}
// 
//     public Rating(FirebaseUser user, double rating, String text) {
//         this.userId = user.getUid();
//         this.userName = user.getDisplayName();
//         if (TextUtils.isEmpty(this.userName)) {
//             this.userName = user.getEmail();
//         }
// 
//         this.rating = rating;
//         this.text = text;
//     }
// 
//     public String getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(String userId) {
//         this.userId = userId;
//     }
// 
//     public String getUserName() {
//         return userName;
//     }
// 
//     public void setUserName(String userName) {
//         this.userName = userName;
//     }
// 
//     public double getRating() {
//         return rating;
//     }
// 
//     public void setRating(double rating) {
//         this.rating = rating;
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     public void setText(String text) {
//         this.text = text;
//     }
// 
//     public Date getTimestamp() {
//         return timestamp;
//     }
// 
//     public void setTimestamp(Date timestamp) {
//         this.timestamp = timestamp;
//     }
// }


// Path: firestore/app/src/main/java/com/google/firebase/example/fireeats/java/RatingDialogFragment.java
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.example.fireeats.R;
import com.google.firebase.example.fireeats.databinding.DialogRatingBinding;
import com.google.firebase.example.fireeats.java.model.Rating;
import me.zhanghai.android.materialratingbar.MaterialRatingBar;

package com.google.firebase.example.fireeats.java;





/**
 * Dialog Fragment containing rating form.
 */
public class RatingDialogFragment extends DialogFragment implements View.OnClickListener {

    public static final String TAG = "RatingDialog";

    private DialogRatingBinding mBinding;
    
    interface RatingListener {

        void onRating(Rating rating);