Code Monkey home page Code Monkey logo

flycodialog_master's Introduction

FlycoDialog-Master

Android Arsenal

An Android Dialog Lib simplify customization. Supprot 2.2+.

Features

  • [Built-in Dialog, convenient to use](#Built-in Dialog)
  • [Abundant Built-in Animations, convenient to use](#Abundant Built-in Animations)
  • [Qucik Customize Dialog](#Qucik Customize Dialog)
  • [Qucik Customize Popup](#Qucik Customize Popup)
  • [Support Customize Dialog Animation](#Customize Dialog Animation)

Built-in Dialog

Dialog Description ScreenShot gif
NormalDialog Default(Two Btns) gif
NormalDialog Style Two gif
NormalDialog Custom Attr gif
NormalDialog One Btn gif
NormalDialog Three Btns gif
MaterialDialog Default(Two Btns) gif
MaterialDialog One Btn gif
MaterialDialog Three Btns gif
NormalListDialog Default gif
NormalListDialog Custom Attr gif
NormalListDialog No Title gif
ActionSheetDialog Default gif
ActionSheetDialog No Title gif

Built-in Popup

Popup Description ScreenShot gif
BubblePopup BubblePopup gif

Change Log

v1.3.0(2015-05-21)

  • remove the dependence of NineOldAnimation(only support 3.0+)

v1.2.6(2015-01-07)

  • Combine FlycoAnimation_Lib into FlycoDialog_Lib
  • Fix bug for View in Popup click no response
  • Improve the function of BaseBubblePopup

v1.2.2(2015-12-20)

  • BasePopup small bug fix

v1.2.0(2015-12-19)

  • new added base widget - BasePopup
  • new added built-in widget - BubblePopup
  • BaseDialog support auto dimiss in given delay

Qucik Customize Dialog

  • step1:extends BaseDialog(or BottomBaseDialog or TopBaseDialog)
  • step2:inflate layout and find views in onCreateView method
  • step3:do logic operation in setUiBeforShow method
public class CustomBaseDialog extends BaseDialog<CustomBaseDialog> {
    private TextView tv_cancel;
    private TextView tv_exit;

    public CustomBaseDialog(Context context) {
        super(context);
    }

    @Override
    public View onCreateView() {
        widthScale(0.85f);
        showAnim(new Swing());

        // dismissAnim(this, new ZoomOutExit());
        View inflate = View.inflate(context, R.layout.dialog_custom_base, null);
        tv_cancel = ViewFindUtils.find(inflate, R.id.tv_cancel);
        tv_exit = ViewFindUtils.find(inflate, R.id.tv_exit);
        inflate.setBackgroundDrawable(
                CornerUtils.cornerDrawable(Color.parseColor("#ffffff"), dp2px(5)));

        return inflate;
    }

    @Override
    public boolean setUiBeforShow() {
        tv_cancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });

        tv_exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });

        return false;
    }
}

Qucik Customize Popup

  • step1:extends BasePopup
  • step2:inflate layout and find views in onCreatePopupView method
  • step3:do logic operation in setUiBeforShow method
public class SimpleCustomPop extends BasePopup<SimpleCustomPop> {
        public SimpleCustomPop(Context context) {
            super(context);
        }

        @Override
        public View onCreatePopupView() {
            return View.inflate(mContext, R.layout.popup_custom, null);
        }

        @Override
        public void setUiBeforShow() {

        }
    }

Gradle

dependencies{
     compile 'com.flyco.dialog:FlycoDialog_Lib:1.2.2@aar'
     compile 'com.flyco.animation:FlycoAnimation_Lib:1.0.0@aar'
     compile 'com.nineoldandroids:library:2.4.0'
}

After v1.2.6
dependencies{
     compile 'com.flyco.dialog:FlycoDialog_Lib:1.2.8@aar'
     compile 'com.nineoldandroids:library:2.4.0'
}

After v1.3.0
dependencies{
     compile 'com.flyco.dialog:FlycoDialog_Lib:1.3.2@aar'
}

Eclispe(no update)

Eclipse Developers should include jars below into your project.

Thanks

flycodialog_master's People

Contributors

alashow avatar h07000223 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flycodialog_master's Issues

Qucik Customize Dialog doesn't work

Hi I'm trying to make a custom dialog like in the example "Qucik Customize Dialog" but i give me some errors here

tv_cancel = ViewFindUtils.find(inflate, R.id.tv_cancel);
tv_exit = ViewFindUtils.find(inflate, R.id.tv_exit);

it seems that ViewFindUtils doesn't exist. I tried to use LayoutInflate with no success

library is missing

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

above mentioned libraries are missing while i already setup gradle with
compile 'com.flyco.dialog:FlycoDialog_Lib:1.2.6@aar'
compile 'com.nineoldandroids:library:2.4.0'

双击之后出现2个对话框,只能关闭一个

双击之后出现2个对话框,只能关闭一个,最后一个点击button没有反应,点击返回键也没有反应,只能强制干掉app。请问有没有好的解决方案?谢谢,这个出现的概率不高,在LG g3,4.4.2版本上测试的

Custom View

you mean to sat there is no way to use custom view ?? right ??

not attached to window manager

如果我把有动画的dialog显示,然后再它的点击事件里面调用 dialog的dismiss和activity的finish就直接奔溃了,
not attached to window manager
因为你关闭的diloag的时候有动画,完了后才调用的dismiss,但是这时候activity已经结束了。

Dialog全局弹出

AlertDialog有getWindow()方法,我自定义的Dialog继承的是Dialog,怎么全局显示,谢谢

Custom View

I want to add Custom Layout with NormalDialog using setContentView but did not work

Unable to set cancel text in ActionSheetDialog

while using ActionSheetDialog you can set content menu items and can't able to set text for cancel ,its shows me in native language of the repo's developer.please suggest me the workable solution.

关于popupwindow的问题

自定义一个popupwindow,然后出现一个问题。就是点击外部pop不消失,确定是设置了setCanceledOnTouchOutside 但是并么有用

titleGravity

Hi, thanks for this great library. Is there a way to get the gravity for the title just like the content. I am using NormalDialog with btnNum(1) and want the title centered.

Custom Base Dialog not work

`
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;

import com.example.alienware.mechat.R;
import com.flyco.animation.Attention.Swing;
import com.flyco.dialog.utils.CornerUtils;
import com.flyco.dialog.widget.base.BaseDialog;

public class CustomBaseDialog extends BaseDialog {
private TextView tv_cancel;
private TextView tv_exit;

public CustomBaseDialog(Context context) {
    super(context);
}

@Override
public View onCreateView() {
    widthScale(0.85f);
    showAnim(new Swing());
    View inflate = View.inflate(mContext, R.layout.dialog_custom_base, null);

    tv_cancel = (TextView) inflate.findViewById(R.id.tv_cancel);
    tv_exit = (TextView) inflate.findViewById(R.id.tv_exit);

    inflate.setBackgroundDrawable(CornerUtils.cornerDrawable(Color.parseColor("#ffffff"), dp2px(5)));

    return inflate;
}

@Override
public boolean setUiBeforShow() {
    tv_cancel.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            dismiss();
        }
    });

    tv_exit.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            dismiss();
        }
    });

    return false;
}

}`

i use this code in my project but i dont know what im wrong but code doesn't work, android studio give me error

Error:(13, 8) error: CustomBaseDialog is not abstract and does not override abstract method setUiBeforShow() in BaseDialog

Error:(36, 20) error: setUiBeforShow() in CustomBaseDialog cannot override setUiBeforShow() in BaseDialog
return type boolean is not compatible with void

Error:(35, 5) error: method does not override or implement a method from a supertype

建议升级使用DialogFragment

DialogFragment是Android主推荐使用方式,可以有效管理生命周期,也解决了旋转Dialog没有创建等,对话框输入键盘弹出Dialog上移等处理。一般MD风格用AlertDialog就行,但国内很大Android还是仿IOS 对话框,使用上希望FlycoDialog能够以DialogFragment来实现,对于自定义view可以如AlertDialog那样方便使用addView()来添加内容区域。

CodePath 中有

DialogFragment is now the canonical way to display overlays; using Dialog directly is considered bad practice.

BubblePopup为什么只响应一个TextView的点击事件

我的代码如下:

View inflate = View.inflate(getContext(), R.layout.widget_main_subject, null);
inflate.findViewById(R.id.main_one).setOnClickListener(this);
inflate.findViewById(R.id.main_two).setOnClickListener(this);
BubblePopup bubblePopup = new BubblePopup(getContext(), inflate);
bubblePopup.anchorView(mTitle)
.show();

为什么只有第一个textview的事件被响应了?

mQuickCustomPopup的显示和隐藏的方向

请问,自定义的CustomPop,即mQuickCustomPopup的显示和隐藏的方向是怎么改的?我写的时候,一直是从左下角出来的,怎么从右上角向外出来,向右上角消失?

ActionSheetDialog点击后,跳转新的activity会卡顿

比如下面的代码,跳转到新的activity时, ActionSheetDialog会调dismiss()这个有动画的方法,但是这时由于startActivity正在启动,所以ActionSheetDialog的消失动画会非常卡顿,我看GPU曲线都红了一片了,
现在是使用没有动画的消失方法,但是终究不如有动画的好看

dialog.setOnOperItemClickL(new OnOperItemClickL() {
            @Override
            public void onOperItemClick(AdapterView<?> parent, View view, int position, long id) {
                switch (position) {
                    case 4:
 Intent intent = new Intent(mActivity,DetailActivity.class);
                        intent.putExtra(DetailActivity.INTENT_FRAGMENT_INDEX_KEY, DetailActivity.FRAGMENT_FLOWDETAILS);
                        intent.putExtra(DetailActivity.INTENT_TITLE_KEY, "详情");
                        startActivity(intent);
                        break;
                }
                dialog.dismiss();
            }
        });

dialog报异常 但是不会崩溃

我确定在我关闭dialog之前 ,, activity是存在的。。。 app正常运行,但是 就是爱爆这个异常。

view=com.android.internal.policy.impl.PhoneWindow$DecorView{8b9a42a V.E..... R......D 0,0-1080,1848} not attached to window manager
com.flyco.dialog.widget.base.BaseDialog.superDismiss(BaseDialog.java:270)

1 android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:396)
2 android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:322)
3 android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:121)
4 android.app.Dialog.dismissDialog(Dialog.java:341)
5 android.app.Dialog.dismiss(Dialog.java:324)
6 com.flyco.dialog.widget.base.BaseDialog.superDismiss(BaseDialog.java:270)

Dialog not resize when keyboard popup

hy, i have problem when i create custom dialog with extends BaseDialog, i put edittext and when keyboard open dialog not move or resize, i try to
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); in onCreateView() and edit manifest but still working

popup点击以外区域无法dismiss求解!

Dear H07000223,
库很好用,在使用dialog过程中简化操作,也非常易用、漂亮。
现在有个需要用popup的需求,于是就使用了你的这个BasePopup,
试了很多遍却发现不能像dialog一样,在点击内容区域外部取消操作,
设置了setCanceledOnTouchOutside(true)之后也不起作用,
目前已在项目中...急求解....非常感谢您的开源.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.