Slide 16
Slide 16 text
$VTUPN7JFX
public class WordBalloonView extends RelativeLayout {
...
public WordBalloonView(Context context, AttributeSet attrs) {
super(context, attrs);
inflate(context, R.layout.ui_word_balloon, this);
ButterKnife.inject(this);
!
TypedArray a = context.obtainStyledAttributes(
attrs, R.styleable.WordBalloonView);
try {
balloonText = a.getString(
R.styleable.WordBalloonView_balloonText);
} finally {
a.recycle();
}
!
mTxtBalloon.setText(balloonText);
}
!
public void setBalloonText(String balloonText) {
mTxtBalloon.setText(balloonText);
}
}