tutorialsandroid / kalertdialog Goto Github PK
View Code? Open in Web Editor NEWAlertDialog for Android, a beautiful and material alert dialog to use in your android app.
License: Apache License 2.0
AlertDialog for Android, a beautiful and material alert dialog to use in your android app.
License: Apache License 2.0
hi,
most of messages dont need a title. message like "do you want to move this?" not really need a title like "warning!". when we set title as empty "" , title textview can sets to gone for a better looking dialog.
thanks.
Hi.
I add these to my fragments and activities to enable full screen and hide navigation bar
view.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE);
view.setOnSystemUiVisibilityChangeListener(
new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int visibility) {
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
view.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE);
}
}
});
But somehow after dialog dismiss, if I swipe up from the bottom, the navigation bar will show and never hidden anymore.
I'm not sure is this because of the behavior of the kAlertDialog or my code problem.
Hey,
Is it possible to add a method to set the background color of the confirm and cancel buttons?
This way the library is more usefull to include in project and it doesn't break the style of the application.
Kind regard,
Thomas
Hi, guys, your library is beautiful but also has a small problem
your preview library has also this problem
your library isn't matched with constraint layout 2 but it works fine with 1.3
please solve this problem thank you
Hi!
Good component for use, i have a little problem because appears the text cutted.
Can i solved this?
Hi,
I think forcing auto dark mode isn't a great design. Please add a method to avoid this.
Thanks!
Great library btw!
I am unable to cancel dialog.
how can i change button color
java.lang.RuntimeException: Unknown animation name: com.developer.kalert.Rotate3dAnimation error:com.developer.kalert.Rotate3dAnimation.
Hi,
I want show the input, but i need that the input come filled with a text on EditText (not hint, but the text).
val dialog = KAlertDialog(context, KAlertDialog.INPUT_TYPE)
dialog.titleText = Kite.string[R.string.ai_chat_edit_thread_title]
dialog.setCancelClickListener(Kite.string[R.string.dialog_cancel_button]) { kAlertDialog: KAlertDialog ->
kAlertDialog.dismissWithAnimation()
}
dialog.setConfirmClickListener(Kite.string[R.string.dialog_ok_button]) { kAlertDialog: KAlertDialog ->
kAlertDialog.dismissWithAnimation()
viewModel.editThreadTitle(thread, kAlertDialog.inputText)
}
dialog.confirmButtonColor(R.color.blue_800)
dialog.cancelButtonColor(R.color.blue_800)
dialog.show()
I tried this, but it is a val:
dialog.inputText = ???
How can i do this?
Thanks.
Hello,
Great library! I am using it in my project with over 2mil+ downloads.
It would be great to be able to set the text color and the text font "out of the box" with a method like .setTitleTextFont(TypeFace)
, but until then, alternatively there is another way to do this if anyone else is interested:
KAlertDialog kAlertDialog = new KAlertDialog(VideoActivity.this)
.setTitleText("MyTitle")
.setContentText("MyContent")
.setConfirmText("Sure")
.setCancelText("No thanks");
kAlertDialog.show();
Typeface typeFace= ResourcesCompat.getFont(VideoActivity.this, R.font.myTypeFace);
// For Title
TextView titleText = kAlertDialog.getWindow().findViewById(R.id.title_text);
titleText.setTextColor(getResources().getColor(R.color.black));
titleText.setTypeface(leagueSpartan);
// For Content
TextView contentText = kAlertDialog.getWindow().findViewById(R.id.content_text);
// For Confirm Button
TextView confirmButton = kAlertDialog.getWindow().findViewById(R.id.custom_confirm_button);
// For Cancel Button
TextView cancelButton = kAlertDialog.getWindow().findViewById(R.id.cancel_button);
That's it!
Hi ,
I want to know how to disable confirm button please make some method to Disable Confirm button Thank you.
Could someone kindly explain why the font needs to be placed in the "assets/fonts" folder instead of the "res/font" folder which is recommended by the android studio? It seems quite inconvenient to create an additional folder solely for applying fonts in the alert dialog. It could potentially create unnecessary clutter and make the file structure more complicated. Thanks
KAlertDialog pDialog = new KAlertDialog(this, KAlertDialog.SUCCESS_TYPE);
pDialog.setCustomView(EditText.ID);
HI
i want to know how to display the keyboard when i touch the editText view
can someone help me?
I don't think this is necessary in most cases.
KAlertDialog dialog = new KAlertDialog(context,KAlertDialog.WARNING_TYPE,0).
Hi...
Just Came across your project and I really like it, I am a Logo/Icon Designer who really has the passion and loves to contribute to very nice open source projects, I want to create and Propose a new Logo/Icon for your project that will represent what your project is all about.
Currently working on a few Idea Concept, I will share it here All For Free once I am done creating it, so you can give your feedback on any changes or adjustments you might want to suit your needs.
Your response would be really appreciated...
Regards!
App crashes when compiled with minifyEnable = true
I added does not obfuscate KalertDialog in proguard-rules in order to use minify and be able to use my application
Option to change button size , since the default button is too small (also button text size change would be very helpful).
KAlertDialog: v19.0.19
Device API 26
Compile SDk 32
Gradle Version 7.3.3
Gradle Plugin 7.2.1
Kotlin 1.6.10
Log:
I/zygote: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/TracingController;
I/zygote: at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
I/zygote: at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
I/zygote: at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:150)
I/zygote: at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:417)
I/zygote: at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:211)
I/zygote: at android.webkit.WebViewFactoryProvider android.webkit.WebView.getFactory() (WebView.java:2467)
I/zygote: at java.lang.String android.webkit.WebView.findAddress(java.lang.String) (WebView.java:1738)
I/zygote: at void android.text.util.Linkify.gatherMapLinks(java.util.ArrayList, android.text.Spannable) (Linkify.java:550)
I/zygote: at boolean android.text.util.Linkify.addLinks(android.text.Spannable, int) (Linkify.java:253)
I/zygote: at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType, boolean, int) (TextView.java:5328)
I/zygote: at void android.widget.TextView.setText(java.lang.CharSequence, android.widget.TextView$BufferType) (TextView.java:5248)
I/zygote: at void android.widget.TextView.setText(java.lang.CharSequence) (TextView.java:5205)
I/zygote: at com.developer.kalert.KAlertDialog com.developer.kalert.KAlertDialog.setContentText(java.lang.String) (KAlertDialog.java:380)
I/zygote: at void com.developer.kalert.KAlertDialog.onCreate(android.os.Bundle) (KAlertDialog.java:135)
I/zygote: at void android.app.Dialog.dispatchOnCreate(android.os.Bundle) (Dialog.java:403)
I/zygote: at void android.app.Dialog.show() (Dialog.java:302)
please update version api level 18
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.