Exemplo n.º 1
0
 @Override
 protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
   super.onLayout(changed, left, top, right, bottom);
   if (!TextUtils.isEmpty(hint)) {
     setHint(ellipsizeToWidth(hint));
   }
 }
Exemplo n.º 2
0
 public void setHint(@NonNull String hint) {
   this.hint = new SpannableString(hint);
   this.hint.setSpan(
       new RelativeSizeSpan(0.8f), 0, hint.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
   super.setHint(ellipsizeToWidth(this.hint));
 }