Java 类android.support.v7.widget.AppCompatRatingBar 实例源码

项目:aptoide-client-v8    文件:RateAndReviewCommentWidget.java   
@Override protected void assignViews(View itemView) {
  reply = (TextView) itemView.findViewById(R.id.write_reply_btn);
  showHideReplies = (TextView) itemView.findViewById(R.id.show_replies_btn);
  flagHelfull = (TextView) itemView.findViewById(R.id.helpful_btn);
  flagNotHelfull = (TextView) itemView.findViewById(R.id.not_helpful_btn);

  ratingBar = (AppCompatRatingBar) itemView.findViewById(R.id.rating_bar);
  reviewTitle = (TextView) itemView.findViewById(R.id.comment_title);
  reviewDate = (TextView) itemView.findViewById(R.id.added_date);
  reviewText = (TextView) itemView.findViewById(R.id.comment);

  userImage = (ImageView) itemView.findViewById(R.id.user_icon);
  username = (TextView) itemView.findViewById(R.id.user_name);

  helpfullButtonLayout = itemView.findViewById(R.id.helpful_layout);
  notHelpfullButtonLayout = itemView.findViewById(R.id.not_helpful_layout);
}
项目:MaterialHome    文件:EBookDetailAdapter.java   
public BookInfoHolder(View itemView) {
    super(itemView);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_words_num = (TextView) itemView.findViewById(R.id.tv_words_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    iv_more_info = (ImageView) itemView.findViewById(R.id.iv_more_info);
    progressBar = (ProgressBar) itemView.findViewById(R.id.progressBar);
    rl_more_info = (RelativeLayout) itemView.findViewById(R.id.rl_more_info);
    ll_publish_info = (LinearLayout) itemView.findViewById(R.id.ll_publish_info);

    tv_author = (TextView) itemView.findViewById(R.id.tv_author);
    tv_followers = (TextView) itemView.findViewById(R.id.tv_followers);
    retention = (TextView) itemView.findViewById(R.id.tv_retention);
    tv_day_words = (TextView) itemView.findViewById(R.id.tv_day_words);
    tv_chapters = (TextView) itemView.findViewById(R.id.tv_chapters);
    tv_publish_date = (TextView) itemView.findViewById(R.id.tv_publish_date);
    tv_last_hapter = (TextView) itemView.findViewById(R.id.tv_last_hapter);
    tv_serial = (TextView) itemView.findViewById(R.id.tv_serial);
    tv_minor_cate = (TextView) itemView.findViewById(R.id.tv_minor_cate);
    tv_creater = (TextView) itemView.findViewById(R.id.tv_creater);

    flow_layout = (FlowLayout) itemView.findViewById(R.id.flow_layout);
}
项目:MaterialHome    文件:BookDetailAdapter.java   
public BookInfoHolder(View itemView) {
    super(itemView);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_comment_num = (TextView) itemView.findViewById(R.id.tv_comment_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    iv_more_info = (ImageView) itemView.findViewById(R.id.iv_more_info);
    progressBar = (ProgressBar) itemView.findViewById(R.id.progressBar);
    rl_more_info = (RelativeLayout) itemView.findViewById(R.id.rl_more_info);
    ll_publish_info = (LinearLayout) itemView.findViewById(R.id.ll_publish_info);

    tv_author = (TextView) itemView.findViewById(R.id.tv_author);
    tv_publisher = (TextView) itemView.findViewById(R.id.tv_publisher);
    tv_subtitle = (TextView) itemView.findViewById(R.id.tv_subtitle);
    tv_origin_title = (TextView) itemView.findViewById(R.id.tv_origin_title);
    tv_translator = (TextView) itemView.findViewById(R.id.tv_translator);
    tv_publish_date = (TextView) itemView.findViewById(R.id.tv_publish_date);
    tv_pages = (TextView) itemView.findViewById(R.id.tv_pages);
    tv_price = (TextView) itemView.findViewById(R.id.tv_price);
    tv_binding = (TextView) itemView.findViewById(R.id.tv_binding);
    tv_isbn = (TextView) itemView.findViewById(R.id.tv_isbn);
}
项目:joy-app    文件:CommentScoresWidget.java   
@Override
protected View onCreateView(Activity activity, Object... args) {

    View contentView = activity.getLayoutInflater().inflate(R.layout.view_poi_comment_score, null);

    vRootView = contentView;
    mAcRatingBar = (AppCompatRatingBar) contentView.findViewById(R.id.acRatingBar);
    mTvPoiCommentNum = (TextView) contentView.findViewById(R.id.tvPoiCommentNum);
    tvCommentLevel = (TextView) contentView.findViewById(R.id.tvCommentLevel);

    score5 = (ProgressBar) contentView.findViewById(R.id.score5);
    score4 = (ProgressBar) contentView.findViewById(R.id.score4);
    score3 = (ProgressBar) contentView.findViewById(R.id.score3);
    score2 = (ProgressBar) contentView.findViewById(R.id.score2);
    score1 = (ProgressBar) contentView.findViewById(R.id.score1);

    tv5Count = (TextView) contentView.findViewById(R.id.tv5Count);
    tv4Count = (TextView) contentView.findViewById(R.id.tv4Count);
    tv3Count = (TextView) contentView.findViewById(R.id.tv3Count);
    tv2Count = (TextView) contentView.findViewById(R.id.tv2Count);
    tv1Count = (TextView) contentView.findViewById(R.id.tv1Count);

    return contentView;
}
项目:ReadMark    文件:BookSeriesCeilHolder.java   
private void initView(){
    mContentView = LayoutInflater.from(mContext).inflate(R.layout.item_book_series_ceil, null, false);
    iv_book_img = (ImageView) mContentView.findViewById(R.id.iv_book_img);
    tv_title = (TextView) mContentView.findViewById(R.id.tv_title);
    ratingBar_hots = (AppCompatRatingBar) mContentView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) mContentView.findViewById(R.id.tv_hots_num);
}
项目:ReadMark    文件:MyViewHolder.java   
public MyViewHolder setRating(int viewId, float rating){
    AppCompatRatingBar rb = getView(viewId);
    if(rb != null){
        rb.setRating(rating);
    }
    return this;
}
项目:ReadMark    文件:BookListAdapter.java   
public BookListHolder(View itemView) {
    super(itemView);
    iv_book_img = (ImageView) itemView.findViewById(R.id.iv_book_img);
    tv_book_title = (TextView) itemView.findViewById(R.id.tv_book_title);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    tv_book_description = (TextView) itemView.findViewById(R.id.tv_book_description);
}
项目:ReadMark    文件:BookDetailAdapter.java   
public BookInfoHolder(View itemView) {
    super(itemView);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_comment_num = (TextView) itemView.findViewById(R.id.tv_comment_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    iv_more_info = (ImageView) itemView.findViewById(R.id.iv_more_info);
    rl_more_info = (RelativeLayout) itemView.findViewById(R.id.rl_more_info);

    tv_subtitle = (TextView) itemView.findViewById(R.id.tv_subtitle);
    tv_origin_title = (TextView) itemView.findViewById(R.id.tv_origin_title);
    tv_translator = (TextView) itemView.findViewById(R.id.tv_translator);

}
项目:ReadMark    文件:BookDetailAdapter.java   
public BookCommentHolder(View itemView) {
    super(itemView);
    tv_comment_title = (TextView) itemView.findViewById(R.id.tv_comment_title);
    iv_avatar = (ImageView) itemView.findViewById(R.id.iv_avatar);
    tv_user_name = (TextView) itemView.findViewById(R.id.tv_user_name);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_comment_content = (TextView) itemView.findViewById(R.id.tv_comment_content);
    iv_favorite = (ImageView) itemView.findViewById(R.id.iv_favorite);
    tv_favorite_num = (TextView) itemView.findViewById(R.id.tv_favorite_num);
    tv_update_time = (TextView) itemView.findViewById(R.id.tv_update_time);
    tv_more_comment = (TextView) itemView.findViewById(R.id.tv_more_comment);
}
项目:trustedshops-android-sdk    文件:ProductReviewsAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    // Get the data item for this position
    ProductReview review = getItem(position);
    // Check if an existing view is being reused, otherwise inflate the view
    ViewHolder viewHolder; // view lookup cache stored in tag
    if (convertView == null) {
        viewHolder = new ViewHolder();
        LayoutInflater inflater = LayoutInflater.from(getContext());
        convertView = inflater.inflate(R.layout.item_productreview, parent, false);
        viewHolder.productReviewChangeDate = (TextView) convertView.findViewById(R.id.productReviewChangeDate);
        viewHolder.productReviewComment = (TextView) convertView.findViewById(R.id.productReviewComment);
        viewHolder.productReviewCommentRatingBar = (AppCompatRatingBar) convertView.findViewById(R.id.productReviewCommentRatingBar);

        convertView.setTag(viewHolder);
    } else {
        viewHolder = (ViewHolder) convertView.getTag();
    }
    // Populate the data into the template view using the data object
    java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(this.context);

    String changeDateFormated = dateFormat.format(review.getCreationDate());
    viewHolder.productReviewChangeDate.setText(changeDateFormated);
    viewHolder.productReviewComment.setText(review.getComment());
    viewHolder.productReviewCommentRatingBar.setRating(review.getMark());
    // Return the completed view to render on screen
    return convertView;
}
项目:MaterialHome    文件:EBookSeriesCeilHolder.java   
private void initView() {
    mContentView = LayoutInflater.from(UIUtils.getContext()).inflate(R.layout.item_book_series_ceil, null, false);
    iv_book_img = (ImageView) mContentView.findViewById(R.id.iv_book_img);
    tv_title = (TextView) mContentView.findViewById(R.id.tv_title);
    ratingBar_hots = (AppCompatRatingBar) mContentView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) mContentView.findViewById(R.id.tv_hots_num);
}
项目:MaterialHome    文件:BookSeriesCeilHolder.java   
private void initView() {
    mContentView = LayoutInflater.from(UIUtils.getContext()).inflate(R.layout.item_book_series_ceil, null, false);
    iv_book_img = (ImageView) mContentView.findViewById(R.id.iv_book_img);
    tv_title = (TextView) mContentView.findViewById(R.id.tv_title);
    ratingBar_hots = (AppCompatRatingBar) mContentView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) mContentView.findViewById(R.id.tv_hots_num);
}
项目:MaterialHome    文件:EBookReviewsAdapter.java   
public BookCommentHolder(View itemView) {
            super(itemView);
//            tv_comment_title = (TextView) itemView.findViewById(R.id.tv_comment_title);
            iv_avatar = (ImageView) itemView.findViewById(R.id.iv_avatar);
            tv_user_name = (TextView) itemView.findViewById(R.id.tv_user_name);
            ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
            tv_comment_content = (TextView) itemView.findViewById(R.id.tv_comment_content);
//            iv_favorite = (ImageView) itemView.findViewById(R.id.iv_favorite);
            tv_favorite_num = (TextView) itemView.findViewById(R.id.tv_favorite_num);
            tv_update_time = (TextView) itemView.findViewById(R.id.tv_update_time);
//            tv_more_comment = (TextView) itemView.findViewById(R.id.tv_more_comment);
        }
项目:MaterialHome    文件:EBookListAdapter.java   
public EBookListHolder(View itemView) {
    super(itemView);
    iv_book_img = (ImageView) itemView.findViewById(R.id.iv_book_img);
    tv_book_title = (TextView) itemView.findViewById(R.id.tv_book_title);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    tv_book_description = (TextView) itemView.findViewById(R.id.tv_book_description);
}
项目:MaterialHome    文件:EBookDetailAdapter.java   
public BookCommentHolder(View itemView) {
    super(itemView);
    tv_comment_title = (TextView) itemView.findViewById(R.id.tv_comment_title);
    iv_avatar = (ImageView) itemView.findViewById(R.id.iv_avatar);
    tv_user_name = (TextView) itemView.findViewById(R.id.tv_user_name);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_comment_content = (TextView) itemView.findViewById(R.id.tv_comment_content);
    iv_favorite = (ImageView) itemView.findViewById(R.id.iv_favorite);
    tv_favorite_num = (TextView) itemView.findViewById(R.id.tv_favorite_num);
    tv_update_time = (TextView) itemView.findViewById(R.id.tv_update_time);
    tv_more_comment = (TextView) itemView.findViewById(R.id.tv_more_comment);
}
项目:MaterialHome    文件:BookListAdapter.java   
public BookListHolder(View itemView) {
    super(itemView);
    iv_book_img = (ImageView) itemView.findViewById(R.id.iv_book_img);
    tv_book_title = (TextView) itemView.findViewById(R.id.tv_book_title);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    tv_book_description = (TextView) itemView.findViewById(R.id.tv_book_description);
}
项目:MaterialHome    文件:BookReviewsAdapter.java   
public BookCommentHolder(View itemView) {
            super(itemView);
//            tv_comment_title = (TextView) itemView.findViewById(R.id.tv_comment_title);
            iv_avatar = (ImageView) itemView.findViewById(R.id.iv_avatar);
            tv_user_name = (TextView) itemView.findViewById(R.id.tv_user_name);
            ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
            tv_comment_content = (TextView) itemView.findViewById(R.id.tv_comment_content);
//            iv_favorite = (ImageView) itemView.findViewById(R.id.iv_favorite);
            tv_favorite_num = (TextView) itemView.findViewById(R.id.tv_favorite_num);
            tv_update_time = (TextView) itemView.findViewById(R.id.tv_update_time);
//            tv_more_comment = (TextView) itemView.findViewById(R.id.tv_more_comment);
        }
项目:MaterialHome    文件:BookDetailAdapter.java   
public BookCommentHolder(View itemView) {
    super(itemView);
    tv_comment_title = (TextView) itemView.findViewById(R.id.tv_comment_title);
    iv_avatar = (ImageView) itemView.findViewById(R.id.iv_avatar);
    tv_user_name = (TextView) itemView.findViewById(R.id.tv_user_name);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_comment_content = (TextView) itemView.findViewById(R.id.tv_comment_content);
    iv_favorite = (ImageView) itemView.findViewById(R.id.iv_favorite);
    tv_favorite_num = (TextView) itemView.findViewById(R.id.tv_favorite_num);
    tv_update_time = (TextView) itemView.findViewById(R.id.tv_update_time);
    tv_more_comment = (TextView) itemView.findViewById(R.id.tv_more_comment);
}
项目:ReadMark    文件:BookSeriesCeilHolder.java   
private void initView(){
    mContentView = LayoutInflater.from(mContext).inflate(R.layout.item_book_series_ceil, null, false);
    iv_book_img = (ImageView) mContentView.findViewById(R.id.iv_book_img);
    tv_title = (TextView) mContentView.findViewById(R.id.tv_title);
    ratingBar_hots = (AppCompatRatingBar) mContentView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) mContentView.findViewById(R.id.tv_hots_num);
}
项目:ReadMark    文件:MyViewHolder.java   
public MyViewHolder setRating(int viewId, float rating){
    AppCompatRatingBar rb = getView(viewId);
    if(rb != null){
        rb.setRating(rating);
    }
    return this;
}
项目:ReadMark    文件:BookListAdapter.java   
public BookListHolder(View itemView) {
    super(itemView);
    iv_book_img = (ImageView) itemView.findViewById(R.id.iv_book_img);
    tv_book_title = (TextView) itemView.findViewById(R.id.tv_book_title);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    tv_book_description = (TextView) itemView.findViewById(R.id.tv_book_description);
}
项目:ReadMark    文件:BookDetailAdapter.java   
public BookInfoHolder(View itemView) {
    super(itemView);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_hots_num = (TextView) itemView.findViewById(R.id.tv_hots_num);
    tv_comment_num = (TextView) itemView.findViewById(R.id.tv_comment_num);
    tv_book_info = (TextView) itemView.findViewById(R.id.tv_book_info);
    iv_more_info = (ImageView) itemView.findViewById(R.id.iv_more_info);
    rl_more_info = (RelativeLayout) itemView.findViewById(R.id.rl_more_info);

    tv_subtitle = (TextView) itemView.findViewById(R.id.tv_subtitle);
    tv_origin_title = (TextView) itemView.findViewById(R.id.tv_origin_title);
    tv_translator = (TextView) itemView.findViewById(R.id.tv_translator);

}
项目:ReadMark    文件:BookDetailAdapter.java   
public BookCommentHolder(View itemView) {
    super(itemView);
    tv_comment_title = (TextView) itemView.findViewById(R.id.tv_comment_title);
    iv_avatar = (ImageView) itemView.findViewById(R.id.iv_avatar);
    tv_user_name = (TextView) itemView.findViewById(R.id.tv_user_name);
    ratingBar_hots = (AppCompatRatingBar) itemView.findViewById(R.id.ratingBar_hots);
    tv_comment_content = (TextView) itemView.findViewById(R.id.tv_comment_content);
    iv_favorite = (ImageView) itemView.findViewById(R.id.iv_favorite);
    tv_favorite_num = (TextView) itemView.findViewById(R.id.tv_favorite_num);
    tv_update_time = (TextView) itemView.findViewById(R.id.tv_update_time);
    tv_more_comment = (TextView) itemView.findViewById(R.id.tv_more_comment);
}
项目:joy-app    文件:PoiDetailCommentWidget.java   
@Override
public void initConvertView(View convertView) {

    acRatingBar = (AppCompatRatingBar) convertView.findViewById(R.id.acRatingBar);
    tvComment = (TextView) convertView.findViewById(R.id.tvComment);
    tvCommentUserDate = (TextView) convertView.findViewById(R.id.tvCommentUserDate);
}
项目:joy-app    文件:PoiDetailHeaderWidget.java   
private void initContentViews(View contentView) {

        mLlBannerDiv = (LinearLayout) contentView.findViewById(R.id.llBannerDiv);
        mTvTitle = (TextView) contentView.findViewById(R.id.tvTitle);
        mTvBookBefore = (TextView) contentView.findViewById(R.id.tvBookBefore);
        mAcRatingBar = (AppCompatRatingBar) contentView.findViewById(R.id.acRatingBar);
        llAddPlanDiv = (LinearLayout) contentView.findViewById(R.id.llAddPlanDiv);
        llAddPlanDiv.setOnClickListener(this);
        mBtnAddToPlan = (TextView) contentView.findViewById(R.id.tvAddToPlan);
        mTvName = (TextView) contentView.findViewById(R.id.tvName);
        mTvPrice = (TextView) contentView.findViewById(R.id.tvPrice);
        mTvPoiCommentNum = (TextView) contentView.findViewById(R.id.tvPoiCommentNum);

    }
项目:CodeColors    文件:AppCompatDefStyleHandler.java   
@SuppressLint({"PrivateResource", "InlinedApi"})
@Override
protected int getDefaultViewDefStyleAttr(View view) {
    if (view instanceof AppCompatRadioButton) {
        return R.attr.radioButtonStyle;
    } else if (view instanceof AppCompatCheckBox) {
        return R.attr.checkboxStyle;
    } else if (view instanceof AppCompatButton) {
        return R.attr.buttonStyle;
    } else if (view instanceof AppCompatMultiAutoCompleteTextView) {
        return R.attr.autoCompleteTextViewStyle;
    } else if (view instanceof AppCompatAutoCompleteTextView) {
        return R.attr.autoCompleteTextViewStyle;
    } else if (view instanceof AppCompatEditText) {
        return R.attr.editTextStyle;
    } else if (view instanceof AppCompatCheckedTextView) {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ?
                android.R.attr.checkedTextViewStyle : 0;
    } else if (view instanceof AppCompatTextView) {
        return android.R.attr.textViewStyle;
    } else if (view instanceof AppCompatSpinner) {
        return R.attr.spinnerStyle;
    } else if (view instanceof AppCompatImageButton) {
        return R.attr.imageButtonStyle;
    } else if (view instanceof AppCompatRatingBar) {
        return R.attr.ratingBarStyle;
    } else if (view instanceof AppCompatSeekBar) {
        return R.attr.seekBarStyle;
    } else {
        return super.getDefaultViewDefStyleAttr(view);
    }
}
项目:aptoide-client-v8    文件:RatingTotalsLayout.java   
public RatingTotalsLayout(View view) {
  usersVoted = (TextView) view.findViewById(R.id.users_voted);
  ratingValue = (TextView) view.findViewById(R.id.rating_value);
  ratingBar = (AppCompatRatingBar) view.findViewById(R.id.rating_bar);
}