12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package ai.pai.client.views;
- import android.app.Activity;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.animation.Animation;
- import com.android.views.popup.BasePopupWindow;
- import ai.pai.client.R;
- public class GroupExitPopup extends BasePopupWindow {
- private View popupView;
- private View.OnClickListener listener;
- public GroupExitPopup(Activity context,View.OnClickListener listener) {
- super(context);
- this.listener = listener;
- bindEvent();
- }
- @Override
- protected Animation getShowAnimation() {
- return getTranslateAnimation(250*2,0,200);
- }
- @Override
- protected View getClickToDismissView() {
- return popupView.findViewById(com.android.views.R.id.click_to_dismiss);
- }
- @Override
- public View getPopupView() {
- popupView= LayoutInflater.from(mContext).inflate(R.layout.popup_exit_group,null);
- return popupView;
- }
- @Override
- public View getAnimaView() {
- return popupView.findViewById(com.android.views.R.id.popup_anima);
- }
- private void bindEvent() {
- if (popupView!=null){
- popupView.findViewById(R.id.tv_pop_exit_group).setOnClickListener(listener);
- popupView.findViewById(R.id.tv_pop_cancel).setOnClickListener(listener);
- }
- }
- }
|