[add] 自定义ratingbar
This commit is contained in:
@@ -12,6 +12,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.module.common.view.CustomRatingBar;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.entity.panel.V2XShareEventDescription;
|
||||
import com.mogo.module.v2x.entity.panel.V2XShareEventItem;
|
||||
@@ -90,7 +91,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (likeNum != null) {
|
||||
((shareDescriptionViewHolder) holder).approveNumTextView.setText(likeNum);
|
||||
}
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating((float) enthusiasmIndex);
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating((float) 2.5);
|
||||
}
|
||||
}
|
||||
} else if (holder instanceof shareItemViewHolder) {
|
||||
@@ -171,7 +172,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
class shareDescriptionViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView shareNumTextView;
|
||||
private TextView approveNumTextView;
|
||||
private RatingBar ratingBar;
|
||||
private CustomRatingBar ratingBar;
|
||||
|
||||
public shareDescriptionViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
||||
@@ -105,12 +105,10 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/v2x_index_rating_top">
|
||||
|
||||
<RatingBar
|
||||
<com.mogo.module.common.view.CustomRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
style="@style/customHeartHeartRatingBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:isIndicator="true" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_index_des"
|
||||
|
||||
Reference in New Issue
Block a user