Coder Social home page Coder Social logo

easydialog's People

Contributors

michaelye avatar ravidsrk avatar vigilancer 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

easydialog's Issues

OnTouchListener should be removable

Hey,

Another issue I ran into is that you put an OnTouchListener on the "rlOutsideBackground" in order to handle touch events for the "touch-outside-to-dismiss" functionality. This is very nice however you should remove the listener when "setTouchOutsideDismiss(false)" is called rather then just not handling the event. Since the "rlOutsideBackground" is match_parent,match_parent, registering an onTouchLIstener will catch all touches on the screen and will not propagate even if the "setTouchOutsideDismiss" is false ... which means in the end that I can not have a tooltip and interact with anything else on the screen at the same time...

please fix

IllegalStateException crash when creating EasyDialog: specified child already has a parent

Stack log:

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:5122)
at android.view.ViewGroup.addView(ViewGroup.java:4953)
at android.view.ViewGroup.addView(ViewGroup.java:4893)
at android.view.ViewGroup.addView(ViewGroup.java:4866)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1309)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

My code:

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
    setHasOptionsMenu(true);
    final View view = inflater.inflate(R.layout.this_fragments_layout, container, false);

    new EasyDialog(mainActivity)
            // .setLayoutResourceId(R.layout.layout_tip_content_horizontal)//layout resource id
            .setLayout(view)
            .setBackgroundColor(mainActivity.getResources().getColor(R.color.background_color_black))
            .setLocation(new int[]{300, 300})//point in screen
            //.setLocationByAttachedView(btnTopLeft)
            .setGravity(EasyDialog.GRAVITY_BOTTOM)
            .setAnimationTranslationShow(EasyDialog.DIRECTION_X, 1000, -600, 100, -50, 50, 0)
            .setAnimationAlphaShow(1000, 0.3f, 1.0f)
            .setAnimationTranslationDismiss(EasyDialog.DIRECTION_X, 500, -50, 800)
           .setAnimationAlphaDismiss(500, 1.0f, 0.0f)
            .setTouchOutsideDismiss(true)
            .setMatchParent(true)
            .setMarginLeftAndRight(24, 24)
            .setOutsideColor(mainActivity.getResources().getColor(R.color.background_color_black))
            .show();

I am creating the EasyDialog inside a Fragment. If I don't call show(), then the crash does not occur. I am not sure which child already has a parent. Am I doing something wrong?

EasyDialog in fragment

I cannot target EasyDialog when it called in onCreate or onViewCreated. How to use it?

Scrollview/ListView in Easy Dialogue is cutting off child Layout

Scrollview/ListView is considering the real Height and width of device to render layout. However in easy dialog box we can display it at (below/left/right/up) to any view. Easy Dialogue should consider the height below assigned view. As Scrollview/ListView is considering whole device height so it isn't allowing scroll(Not needed when child layout is smaller that parent height).

Please see complete issue over here Stackoverflow question

Keyboard always hide when dialog is show

I am having issue, whenever easy dialog is shown the keyboard is hidden. I am trying to get it to the point where user can read the tool tip while typing in the edit text. I tried wrapping the layout in scroll view. Any help with would be appreciated!

tool tip not showing on first run of the app

I used this library in my app and it worked fine, but when I am using the same code inside a shared pref function to display a tool tip on first run of the app, the tooltip is not showing up.

Please help me with this issue

recyclerview with wrap content as height covers full height

when added recyclerview in view of easydialog wrap content doest not work and scroller is also not visible for recyclerview.

rl_bysource.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {

            View view = getActivity().getLayoutInflater().inflate(R.layout.popup_listitem, null);
            new EasyDialog(getActivity())
                    // .setLayoutResourceId(R.layout.layout_tip_content_horizontal)//layout resource id
                    .setLayout(view)
                    .setBackgroundColor(getActivity().getResources().getColor(android.R.color.white))
                            // .setLocation(new location[])//point in screen
                    .setLocationByAttachedView(rl_bysource)
                    .setGravity(EasyDialog.GRAVITY_BOTTOM)
                    .setAnimationTranslationShow(EasyDialog.DIRECTION_X, 1000, -600, 100, -50, 50, 0)
                    .setAnimationAlphaShow(1000, 0.3f, 1.0f)
                    .setAnimationTranslationDismiss(EasyDialog.DIRECTION_X, 500, -50, 800)
                    .setAnimationAlphaDismiss(500, 1.0f, 0.0f)
                    .setTouchOutsideDismiss(true)
                    .setMatchParent(false)
                    .setMarginLeftAndRight(24, 24)
                    .setOutsideColor(getActivity().getResources().getColor(android.R.color.transparent))
                    .show();
            recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
            setRecyclerViewSource();

        }
    });

popup_listitem xml is

<android.support.v7.widget.RecyclerView
    android:id="@+id/recyclerView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

EasyDialog License

i am using your github library EasyDialog in my project, want to know is it under apache license 2.0??
can i use it for free???

Keyboard issue in dialog with edittext.

Hi. Thanks for this great library. I am facing an issue. I am showing a listview and edittext inside the dialog. When I click on edittext, the keyboard opens and dialog gets very small. It is not showing the behaviour as of AlertDialog. Any ideas?

onDialogDismiss leaks context

I saw that there is a memory leak in onDialogDismiss().
dialog.dismiss wasn't called and therefore a leak accoured.

Maybe you should add the listener before you start animator?

this is how i create the EasyDialog:
EasyDialog easyDialog = new EasyDialog(mContext.get()). setLocationByAttachedView(viewToAttach). setLayout(easyDialogView). setGravity(toolTip.getDirection()). setMatchParent(false). setAnimationAlphaShow(600, 0.0f, 1.0f). setAnimationAlphaDismiss(600, 1.0f, 0.0f);

I guess it because i am using animation.

Dialog blocks UI

hi, thank you for this useful library.

I see that when the dialog is shown, all the elements of the UI are not clickable until the dialog is dismissed.
Is there a way to keep the views outside the dialog clickable?

Pixel issue

In pixel device arrow showing little bit down when I am using .setGravity(EasyDialog.GRAVITY_TOP)
how to fix it. I think it takes statusbar height.

Dialog is not attached on action bar

Hi Michaelye,

I am trying to attached dialog on action bar menu item,

But here in .setLocation(view) need view I am not able to set here menu item.

Please check this from your end.

Thank you.

remove views before attaching

Please refactor the .show() method to remove the current views in the llContent before adding the new one. " llcontent.removeAllViews() "

This will greatly increase reusability of the dialog and it is very troublesome to do it manually every time.

Thank you

access attachedView

Hello,

Could you please do something about accessing the attachedView field. It is private but it does not have any getter, but I really need to be able to access it somehow.

Thank you

Crashes when not using on ui thread

android.util.AndroidRuntimeException: Animators may only be run on Looper threads at android.animation.ValueAnimator.start(ValueAnimator.java:1002) at android.animation.ValueAnimator.start(ValueAnimator.java:1050) at android.animation.ObjectAnimator.start(ObjectAnimator.java:829) at android.animation.AnimatorSet.start(AnimatorSet.java:585) at com.michael.easydialog.EasyDialog.onDialogDismiss(EasyDialog.java:526) at com.michael.easydialog.EasyDialog.dismiss(EasyDialog.java:591)

It happens because i used TimerTask to dismiss EasyDialog with animation.
i can run it on ui thread but i think that EasyDialog should allow usage from any thread.

Attach to view failed in fragment

It seems setLocationByAttachedView will not work properly in fragment. The dialog will always show up in the top left corner. However it would work if you calculate the position before you new a EasyDialog object and use setLocation to set location.

Causes the app to crash due to java.lang.IllegalStateException: Circular dependencies cannot exist in AnimatorSet

Lately, I am getting this error which causes my app to crash. Can you please fix and update the library. Here is the stack trace

Stack :

java.lang.IllegalStateException: Circular dependencies cannot exist in AnimatorSet
at android.animation.AnimatorSet.sortNodes(AnimatorSet.java:827)
at android.animation.AnimatorSet.start(AnimatorSet.java:465)
at aig.e(EasyDialog.java:526)
at aig.f(EasyDialog.java:34)
at aig$4.onTouch(EasyDialog.java:149)
at android.view.View.dispatchTouchEvent(View.java:7663)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2395)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2401)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2091)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2401)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2091)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2401)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2091)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2284)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1578)
at android.app.Dialog.dispatchTouchEvent(Dialog.java:767)
at com.appsee.f.dispatchTouchEvent(e:625)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2232)
at android.view.View.dispatchPointerEvent(View.java:7875)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3898)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3782)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5034)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5013)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5111)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:125)
at android.os.Looper.loop(Looper.java:124)
at android.app.ActivityThread.main(ActivityThread.java:5283)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)

Relocation on setLocation

I believe you should add " relocation(location) " after setting the new location array.

I have been getting an error where the I am trying to reuse a dialog by just changing its "attachedView" and it does not take into considerations the location of the new "attachedView"

thank you

statusbar color

in openj dialog, my status bar change to black.... how to prevent this?
and how to add listener for button inside

listview

填充一个带ListView的布局,不论是否设置setMatchParent(true),都是match_paraent

Ability to set text dynamically and set view

Hi,

I have many tooltips and it seems that i have to create different layout file for each tooltip which would be a lot.

I think it would be really good if we could set layout but each time we create EasyDialog we would be able to set different text or just to set custom view which we will inflate with the custom layout and text.

Screen rotation

Hi,

thank you for your library.
I have a problem with your dialog when activity recreated (for exemple during screen rotation).
I have IllegalArgumentException.

I call "EasyDialog.dismiss()" method on "Activity.onStop()" and if I remove this instruction it's works.
How can I close dialog when I left the screen ?

I hope you have understand my problem.

thank you

Anthony

Stacktrace

java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{3127ddcb V.E..... R......D 0,0-1280,736} not attached to window manager
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:396)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:322)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:116)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.app.Dialog.dismissDialog(Dialog.java:341)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.app.Dialog.dismiss(Dialog.java:324)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at com.michael.easydialog.EasyDialog$3.onAnimationEnd(EasyDialog.java:457)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:854)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1171)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:722)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:738)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:580)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:549)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5254)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-15 17:42:25.690 32490-32490/temp.com.payzenmpos.dev E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

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.