Giter Site home page Giter Site logo

sweet-alert-dialog's People

Contributors

croccio avatar pedant avatar uglytroll 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sweet-alert-dialog's Issues

Where did I use this wrong?

java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:cn.pedant.SweetAlert.Rotate3dAnimation
at com.zhuhean.dongxi.SweetAlert.OptAnimationLoader.createAnimationFromXml(OptAnimationLoader.java:77)
at com.zhuhean.dongxi.SweetAlert.OptAnimationLoader.createAnimationFromXml(OptAnimationLoader.java:64)
at com.zhuhean.dongxi.SweetAlert.OptAnimationLoader.createAnimationFromXml(OptAnimationLoader.java:41)
at com.zhuhean.dongxi.SweetAlert.OptAnimationLoader.loadAnimation(OptAnimationLoader.java:22)
at com.zhuhean.dongxi.SweetAlert.SweetAlertDialog.(SweetAlertDialog.java:74)
at com.zhuhean.dongxi.SweetAlert.SweetAlertDialog.(SweetAlertDialog.java:66)
at com.zhuhean.dongxi.settings.UserSettings$2.onPreferenceClick(UserSettings.java:32)
at android.preference.Preference.performClick(Preference.java:1011)
at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:222)
at android.widget.AdapterView.performItemClick(AdapterView.java:298)
at android.widget.AbsListView.performItemClick(AbsListView.java:1288)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:2972)
at android.widget.AbsListView$1.run(AbsListView.java:3767)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5326)
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:848)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:615)
at dalvik.system.NativeStart.main(Native Method)

Robolectric tests with sweet alert failing

I am getting this exception when running robolectric tests:

android.content.res.Resources$NotFoundException: Resource ID #0x7f0a0001
    at android.content.res.Resources.getValue(Resources.java:1118)
    at android.content.res.Resources.getDimensionPixelSize(Resources.java:613)
    at cn.pedant.SweetAlert.ProgressHelper.<init>(ProgressHelper.java:22)
    at cn.pedant.SweetAlert.SweetAlertDialog.<init>(SweetAlertDialog.java:78)
    at com.myapp.activity.register.RegisterActivity.showNotConnectedToTheInternetDialog(RegisterActivity.java:213)

If i add the library project in the projet.properties file like this:

android.library.reference.1=gen-external-apklibs/cn.pedant.sweetalert_library_1.3.1

then I get this exception:

java.lang.RuntimeException: Unknown animation name: sweet:cn.pedant.SweetAlert.Rotate3dAnimation error:sweet:cn.pedant.SweetAlert.Rotate3dAnimation
    at cn.pedant.SweetAlert.OptAnimationLoader.createAnimationFromXml(OptAnimationLoader.java:77)
    at cn.pedant.SweetAlert.OptAnimationLoader.createAnimationFromXml(OptAnimationLoader.java:64)
    at cn.pedant.SweetAlert.OptAnimationLoader.createAnimationFromXml(OptAnimationLoader.java:41)
    at cn.pedant.SweetAlert.OptAnimationLoader.loadAnimation(OptAnimationLoader.java:22)
    at cn.pedant.SweetAlert.SweetAlertDialog.<init>(SweetAlertDialog.java:80)
    at com.myapp.activity.register.RegisterActivity.showNotConnectedToTheInternetDialog(RegisterActivity.java:213)

Have you tried running robolectric tests yourself ?

Can't find the style file...

Description Resource Path Location Type
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 32 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 52 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 72 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 92 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 113 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 133 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'style' with value '@style/dialog_blue_button'). sample_activity.xml /SampleActivity/res/layout line 153 Android AAPT Problem

setCancelable ?

there is no .setCancelable() function available in this library to prevent the cancellation of dialog on back button press.

After called dialog.dismissWithAnimation, the dialog won't show up again

SweetAlertDialog dialog = new SweetAlertDialog(context, SweetAlertDialog.PROGRESS_TYPE);
...

// show for the first time
dialog.show();
...
dialog.dismissWithAnimation(); // prefer this because of the cool animation
...
// reuse the dialog and show it again
dialog.show(); // this won't work properly, the window dims, but dialog won't show up, and you can't click anything on the window

If I use dialog.dismiss() inherited from Dialog instead of dialog.dismissWithAnimation(), then I am able to reuse that dialog.

Dialog components going out of dialog

Hi. I am implementing basic usage of the dialog. I call the dialog and the dialog structure is always improper (in all Success, error, warning etc dialogs). I have attached a screenshot. Do you happen to know the cause or the solution?
screenshot_2014-11-29-15-44-47

show status bar when sweet alert dialog show

In my app, there's no status bar (see my way below to hide status bar). However, every time I show alert dialog, the status bar is coming annoying again.

View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.hide();
}

java.lang.NoSuchFieldError: cn.pedant.SweetAlert.R$id.title_text

I am using sweet dialog to show dialog on in my app
here is my code,
SweetAlertDialog pDialog = new SweetAlertDialog(mContext, SweetAlertDialog.PROGRESS_TYPE);
pDialog.getProgressHelper().setBarColor(Color.parseColor("#A5DC86"));
pDialog.setTitleText("Loading");
pDialog.setCancelable(false);
pDialog.show();

Got Runtime Error:
E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoSuchFieldError: cn.pedant.SweetAlert.R$id.title_text
at cn.pedant.SweetAlert.SweetAlertDialog.onCreate(SweetAlertDialog.java:143)
at android.app.Dialog.dispatchOnCreate(Dialog.java:351)
at android.app.Dialog.show(Dialog.java:256)
at com.cloudvisionsystems.webapp.ShowWebView$1.onLoadResource(ShowWebView.java:98)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:529)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)

AS failed to build after add v1.3 into gradle depdencies

After I add compile 'cn.pedant.sweetalert:library:1.3' into my Android Studio Gradle build file, I got an error message in build
`Error:Gradle: Execution failed for task ':XXX:processOfficialDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\ProgramPortable\android-sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1`
I tried many solutions like re-install the build tool, but it does not work.
This may be a environment issue, however, it works well after I change v1.3 to v1.2.

ps.add tools:replace="android:icon" into androidmanifest.xml is useless.

Thanks

Enhancement: Support for three buttons

Would be great if, beside the confirm and cancel buttons there could be the "neutral" button.
It can be used, for example, in "rate this app" dialogs: Yes/No/Later

AlertDialog color

File: alert_dialog.xml
Line: 125
Code: android:textColor="#575757"

Expected: android:textColor="@color/textcolor"
Current : hardcoded color

Now way to override color without XML change

Android Icon Launcher Duplicate

Good library is excellent but when adding the file Gradle me the following error causes the application icon:

Error:(7, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:7:9

How do I compile this project?

I'm trying to compile this project.
I used ./gradlew assemble and it showed "BUILD SUCCESSFUL" at the end of the run.

It generated /library/build/libs/library-1.3-sources.jar at size of 8kb. I tried putting it in my libs folder of my project, but it doesn't seem to be working. If I try to decompile the jar file I see that the classes inside are empty.

How do I use this library?

NoClassDefFoundError 编译完不能打开demo..

java.lang.NoClassDefFoundError: com.networkbench.agent.impl.background.NBSApplicationStateMonitor
at cn.pedant.SweetAlert.sample.SampleActivity.onStart(SampleActivity.java)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
at android.app.Activity.performStart(Activity.java:5304)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2171)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2259)
at android.app.ActivityThread.access$800(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5061)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:812)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
at dalvik.system.NativeStart.main(Native Method)

Update materialish-progress

I was trying to use sweet alert dialog(which is dependent on materialish-progress) with another library and on gradle compile, I receive following error.
Error:Attribute "barColor" has already been defined

I raised issue with materialish-progress (nico2sh/materialish-progress#11) to prefix attributes with some name so that they never clash with any other names and they have fixed this issue.

Can you now please update your lib to use latest materialish-progress build.

I can't import your great job into my project

I use Eclipse to develop android and want to use your library, first I import it into Eclipse, second click right button and chose property then let it be a library.

finally, use the same method to add it as a dependency of my project, but it show me the "The constructor SweetAlertDialog(new Handler(){}, int) is undefined", I think my step is correct.

Is it can't use this way to import?

Library icon conflicts with application icon

Error:(26, 9) Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:26:9
Error:(26, 9) Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:26:9
is also present at com.pnikosis:materialish-progress:1.0:13:9 value=(@drawable/ic_launcher)
Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:23:5 to override

Problem Height Background

Hello,

was trying to use the dialog, and me something strange happens, the "ok" and the error icon, warning and succed button are outside the top of the dialog as shown in the attached catch (me not happen in the app demo) only when I integrate my app.

use: telephone motomaxx (droidturbo), android 4.4.4, other libraries that use "betterpickers", "navasmdc: MaterialDesign"

I hope you can help me, thank you very much beforehand hands by your beautiful library.

greetings To You
bug_bg_desenfocado_paint

1.3

gradle 1.3找不到

ProgressWheel class not found

Hello sir,
I am wishing to use sweet alert dialog in my app.I'm trying to integrate package
"cn.pedant.SweetAlert".But,I'm facing error due to missing class ProgressWheel,Because this class not included in your package.Please help me to solve the issue.Thnaks in advance

如何避免混淆代码?

在混淆文件中设置了

 -keep class cn.pedant.sweetalert.**{ *; }
 -keep class com.pnikosis.materialishprogress.**{ *; }

依旧出错

 Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:cn.pedant.SweetAlert.Rotate3dAnimation

要如何设置,以避免代码混淆?

proguard error

java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error: [class android.content.Context, interface android.util.AttributeSet]
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:77)
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:64)
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:41)
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:22)
at cn.pedant.SweetAlert.SweetAlertDialog.(SweetAlertDialog.java:80)

setTitle(int) method not effect

public void setTitle(CharSequence title) {
mWindow.setTitle(title);
mWindow.getAttributes().setTitle(title);
}

public void setTitle(int titleId) {
    setTitle(mContext.getText(titleId));
}

setTitle(mContext.getText(titleId));
change to
mWindow.setTitle(mContext.getText(titleId));
mWindow.getAttributes().setTitle(mContext.getText(titleId));
?


oh,sorry, setTitleText can change title,but setTitle(int) can change what?

Can't Copy Message

When i have a long string, I can't seem to copy the message content. While the cursor is displayed, when i try to click and drag nothing is selected.

請問一下PROGRESS_TYPE

可以只有單純轉進度條不要有Title的部份嗎?

就一個Loading框不用文字,目前好像不設定都會補齊

ProGuard Issue

java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:cn.pedant.SweetAlert.Rotate3dAnimation
at cn.pedant.SweetAlert.a.a(Unknown Source)
at cn.pedant.SweetAlert.a.a(Unknown Source)
at cn.pedant.SweetAlert.a.a(Unknown Source)
at cn.pedant.SweetAlert.a.a(Unknown Source)
at cn.pedant.SweetAlert.j.(Unknown Source)
at cn.pedant.SweetAlert.j.(Unknown Source)
at my.app.a.a(Unknown Source)
at my.app.a.f.onClick(Unknown Source)
at android.view.View.performClick(View.java:4443)
at android.view.View$PerformClick.run(View.java:18433)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(Native Method)

How can I change the style?

How can I set the font size and font family of the elements in the dialog? How can set a style for the buttons?

Also thanks for the great work, using it both, on web and on android!

onbackpresses

hi in my application whenever user copies something i show a dialog to find it in a dictionary now suppose i showed 5 dialogues then the user wants to leave activity he has to press back button 5 times to exit how can i correct this issue

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.