Quick Action Like
In Android 3D Gallery
- You have to
Create ActionItem class object For add new item logo and text.
//dashboard action item
ActionItem dashboard = new
ActionItem();
dashboard.setTitle("Dashboard");
dashboard.setIcon(getResources().getDrawable(R.drawable.dashboard));
- Now you have to create object of QuickAction class for
adding this action item.
//create quickaction
final QuickAction quickAction = new
QuickAction(this);
quickAction.addActionItem(dashboard);
- This method is use for showing popup with action item.
quickAction.show(v);
Ex:
Button btn1 = (Button) this.findViewById(R.id.btn1);
btn1.setOnClickListener(new
View.OnClickListener() {
public
void onClick(View v) {
quickAction.show(v);
}
});
No comments:
Post a Comment