Skip to content

Instantly share code, notes, and snippets.

View icebail's full-sized avatar
🏠

Vasily Beglyanin icebail

🏠
View GitHub Profile
@icebail
icebail / RatingView.java
Created May 31, 2017 17:35
Пример простой кастомной вью отображающей рейтинг. На что стоит обратить внимание: заполнение через inflate() и биндинг вью findVIews(). Остальное непосредственно логика представления виджета. ButterKnife работает с кастомными вью также как с активити
public class RatingView extends LinearLayout {
private ImageView star1, star2, star3, star4, star5;
private TextView ratingTextTv;
public RatingView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}