3
ติดต่อ Bubble EditText
ฉันกำลังพยายามสร้างฟองอากาศการติดต่อในลักษณะที่MultiAutoCompleteTextViewคล้ายกับการใช้งานในแอป Google+ ด้านล่างนี้คือภาพหน้าจอ: . ฉันได้พยายามที่จะขยายDynamicDrawableSpanชั้นเรียนเพื่อให้สามารถวาดเป็นระยะ ๆ ได้ในพื้นหลังของช่วงของข้อความ public class BubbleSpan extends DynamicDrawableSpan { private Context c; public BubbleSpan(Context context) { super(); c = context; } @Override public Drawable getDrawable() { Resources res = c.getResources(); Drawable d = res.getDrawable(R.drawable.oval); d.setBounds(0, 0, 100, 20); return d; } } โดยที่ oval.xml drawable ของฉันถูกกำหนดดังนี้: …