Попробуйте этот образец кода. Это соответствует вашим требованиям.
PopupWindow pw = new PopupWindow(
this.getViewInflate().inflate(R.layout.pw_layout,
null, true, null),
100,100,true);
// display the popup in the center
pw.showAtLocation(layout, Gravity.CENTER, 0, 0);
pw.update(20,20,100,100);
Для взглядов внутри EditText
части, вы должны будете продлить EditText
. Обзор того, как он должен выглядеть, выглядит следующим образом.
class emailEditText extends EditText {
List<NamePhotoView> ViewlistOfSelectedContacts; // create new
void addContact(String name, Bitmap photo) {
// create a new 'NamePhotoView' and add to the ViewlistOfSelectedContacts
}
@Override
void onDraw(Canvas canvas) {
for (....) {
// draw all views from the list. left to right.
}
// you have to some how offset the text start coordinate. then call super
super.onDraw(canvas);
}
}
Это не похоже на простой текст внутри edittext. Его вид PopupWindow – Ronnie