To share a high imitation micro-letter Popupwindow, it's the micro-mail sweep. That function window, below has the application Operation effect chart, more intuitive shows the demo effect, the source code is realizes through two kinds of methods, everybody can download the source Code research research, the integration to own project is also very convenient, Hope to be useful to you, first look at
Demo Running effect
This demo is a high imitation of the micro-letter previous version, not the latest version, if you want to change to the latest version can be a little change on the OK
The first way
Initializing components
private void Initview () {
//instantiate the title bar button and set the listener
titlebtn = (ImageButton) Findviewbyid (R.ID.TITLE_BTN);
Titlebtn.setonclicklistener (New Onclicklistener () {
@Override public
void OnClick (View v) {
Titlepopup.show (v);
}
});
Instantiate title bar Bullet window
titlepopup = new Titlepopup (this,
layoutparams.wrap_content, layoutparams.wrap_content);
}
Initializing data
private void InitData () {
///Add subclass Titlepopup.addaction to the title bar window (this
, "Initiate chat",
r.drawable.mm_ Title_btn_compose_normal));
Titlepopup.addaction (This, "earpiece mode", R.drawable.mm_title_btn_receiver_normal) (new Actionitem)
;
Titlepopup.addaction (This, "Login Web page", R.drawable.mm_title_btn_keyboard_normal) (new Actionitem)
;
Titlepopup.addaction (This, "sweep", R.drawable.mm_title_btn_qrcode_normal)) (new Actionitem)
;
The second way
Initializing components
private void Initview () {
//instantiate the title bar button and set the listener
titlebtn = (ImageButton) Findviewbyid (R.ID.TITLE_BTN);
Titlebtn.setonclicklistener (New Onclicklistener () {
@Override public
void OnClick (View v) {
StartActivity (New Intent (Customtitleactivity02.this,
dialogactivity.class));
}
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.