use of com.github.yeriomin.yalpstore.view.UserReviewDialogBuilder in project YalpStore by yeriomin.
the class Review method initUserReviewControls.
private void initUserReviewControls(final App app) {
((RatingBar) activity.findViewById(R.id.user_stars)).setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
@Override
public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
if (!fromUser) {
return;
}
new UserReviewDialogBuilder(activity, Review.this, app.getPackageName()).show(getUpdatedUserReview(app.getUserReview(), (int) rating));
}
});
activity.findViewById(R.id.user_review_edit).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new UserReviewDialogBuilder(activity, Review.this, app.getPackageName()).show(app.getUserReview());
}
});
activity.findViewById(R.id.user_review_delete).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ReviewDeleteTask task = new ReviewDeleteTask();
task.setFragment(Review.this);
task.setContext(v.getContext());
task.execute(app.getPackageName());
}
});
}
Aggregations