GithubHelp home page GithubHelp logo

fancydialog's Introduction

FancyDialog

FancyDialog is a AlertDialog with some fancy styling and them the new version of it is completely build with kotlin

Add Library

repositories {
       maven { url 'https://jitpack.io' }
}    
implementation 'com.github.geniusforapp:fancyDialog:1.0.2'

Code Sample

      val dialog = FancyDialogBuilder(this, R.style.CustomDialog)
                .withImageIcon(R.drawable.ic_new_message)
                .withTitleTypeFace(R.font.roboto_bold)
                .withSubTitleTypeFace(R.font.roboto_medium)
                .withActionPositiveTypeFace(R.font.roboto_bold)
                .withActionNegativeTypeFace(R.font.roboto_bold)
                .withTextGravity(CENTER)
                .withPanelGravity(END)
                .withTitle(R.string.dialog_text_title)
                .withSubTitle(R.string.dialog_text_message)
                .withPositive(R.string.dialog_action_yes) { view, dialog -> dialog.dismiss() }
        dialog.show()

Pull requests are welcome!

Feel free to contribute to FancyDialog.

If you've fixed a bug or have a feature you've added, just create a pull request. If you've found a bug, want a new feature, or have other questions, file an issue. I will try to answer as soon as possible.

Applications using FancyDialog

Please send a pull request if you would like to be added here.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

fancydialog's People

Contributors

a-najar avatar ahmadnajar avatar ahmednajar avatar jp1017 avatar rayliverified avatar wrbl606 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

fancydialog's Issues

java.lang.IllegalStateException: Fragment already added:

Fatal Exception: java.lang.IllegalStateException: Fragment already added: FancyAlertDialog{41d19b48 #0 FancyAlertDialog}
       at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1679)
       at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:727)
       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)

When does it happen: when you show multiple Fancy Dialogs without dismissing the previous ones.
Possible Solution :Add a check if !isAdded() on show dialog.

Cheers for this awesome library.

Can not perform this action after onSaveInstanceState

I'm seeing this crash many times in my crashlytics. I can not reproduce it on my device though.
Any idea why only a few users are seeing this crash? (My app orientation is set to Portrait)

Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.modifiesAlpha(Unknown Source)
at android.support.v4.app.BackStackRecord.dump(Unknown Source)
at android.support.v4.app.BackStackRecord.commit(Unknown Source)
at android.support.v4.app.DialogFragment.show(Unknown Source)
at ikvaesolutions.xxxxxxxxxxx.custom.FancyAlertDialog.onCreate(Unknown Source)
at ikvaesolutions.xxxxxxxxxxx.custom.FancyAlertDialog.onCreate(Unknown Source)
at ikvaesolutions.xxxxxxxxxxx.custom.FancyAlertDialog$Builder.show(Unknown Source)
at ikvaesolutions.xxxxxxxxxxx.activities.SplashScreenActivity.showDisclaimer(Unknown Source)
at ikvaesolutions.xxxxxxxxxxx.activities.SplashScreenActivity.access$000(Unknown Source)
at ikvaesolutions.xxxxxxxxxxx.activities.SplashScreenActivity$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5530)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:733)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:623)

Crash on Button Click if Application Paused

App crashes on button press if application is paused. Fancy Dialog Builder does not save click objects so they become null.

04-08 14:57:53.250 29392-29392/com.geniusforapp.fancysample E/AndroidRuntime: FATAL EXCEPTION: main
                                                                              Process: com.geniusforapp.fancysample, PID: 29392
                                                                              java.lang.NullPointerException: Attempt to invoke virtual method 'com.geniusforapp.fancydialog.FancyAlertDialog$OnPositiveClicked com.geniusforapp.fancydialog.FancyAlertDialog$Builder.getOnPositiveClicked()' on a null object reference
                                                                                  at com.geniusforapp.fancydialog.FancyAlertDialog$1.onClick(FancyAlertDialog.java:140)
                                                                                  at android.view.View.performClick(View.java:5201)
                                                                                  at android.view.View$PerformClick.run(View.java:21215)
                                                                                  at android.os.Handler.handleCallback(Handler.java:739)
                                                                                  at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                  at android.os.Looper.loop(Looper.java:148)
                                                                                  at android.app.ActivityThread.main(ActivityThread.java:5525)
                                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
                                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)

TextViews Appear When Empty

Currently, all three text fields must be set and display even when empty. The appropriate behavior should be that the TextViews for Title, Subtitle, and Body only appear if they are set in the Builder.

PR #6 fixes this issue.

Crashes when Home or Recents button is pressed.

Library crashes with the following exception when the dialogue is enabled and the Home or Recent button is pressed.

java.lang.RuntimeException: Parcelable encountered IOException writing serializable object

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.