andyxialm / colordialog Goto Github PK
View Code? Open in Web Editor NEW:tada: ColorDialog & PromptDialog
:tada: ColorDialog & PromptDialog
add method to change text Gravity for tvContent to RTL or LTR (left or right)
<TextView
android:id="@+id/tvContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right" -----------------> left or right
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:textColor="@android:color/white"
android:visibility="visible" />
如题
Can you please update the lib to support androidX version of the support library.
Thanks
可以添加自定义视图吗?setContentView 无效果啊
new PromptDialog(this)
.setDialogType(PromptDialog.DIALOG_TYPE_WARNING)
.setCancelable(false)
.setTitleText("Alert") // Shows error ...why?
.setContentText("Are you there")
.setPositiveListener("YES", new PromptDialog.OnPositiveListener()
{
@Override
public void onClick(PromptDialog dialog) {
dialog.dismiss();
}
}).show();
If there is no image provided in ColorDialog, Cancel button is not aligned properly :
ColorDialog dialog = new ColorDialog(this);
dialog.setTitle(getString(R.string.operation));
dialog.setAnimationEnable(true);
dialog.setAnimationIn(getInAnimationTest(this));
dialog.setAnimationOut(getOutAnimationTest(this));
// dialog.setContentImage(getResources().getDrawable(R.mipmap.sample_img)); //REMOVED IMAGE
dialog.setPositiveListener(getString(R.string.delete), new ColorDialog.OnPositiveListener() {
@Override
public void onClick(ColorDialog dialog) {
Toast.makeText(MainActivity.this, dialog.getPositiveText().toString(), Toast.LENGTH_SHORT).show();
}
})
.setNegativeListener(getString(R.string.cancel), new ColorDialog.OnNegativeListener() {
@Override
public void onClick(ColorDialog dialog) {
Toast.makeText(MainActivity.this, dialog.getNegativeText().toString(), Toast.LENGTH_SHORT).show();
dialog.dismiss();
}
}).show();
Unable to change the text colour of the content.
dialog.setContentTextColor(R.color.orange);
is not working.
Any ideas why I can't do this? The app does not crash but I get a leak message in logcat after the finish:
new PromptDialog(this)
.setDialogType(PromptDialog.DIALOG_TYPE_WARNING)
.setCancelable(false)
.setTitleText("Alert") // Shows error ...why?
.setContentText("Are you there")
.setPositiveListener("YES", new PromptDialog.OnPositiveListener()
{
@Override
public void onClick(PromptDialog dialog) {
dialog.dismiss();
finish();
}
}).show();
When u change window orientation, you must set the "setAnimationEnable(false)" to prevent window leaking... that's little bit anoying
pubic void onPause() { dialog.setAnimationEnabled(false); dialog.dismiss(); }
but otherwise a nice job man
There is a way to centralize text inside the dialog?
I want to thank you for your effort on this great library.
Now, I'm trying to add it to my dependencies on Android Studio.
I don't want to add the whole project as a model.
Any Help !
Please update the readme file with the following line
dependencies {
compile 'com.github.andyxialm:ColorDialog:fc1804b35a'
}
Please add NegativeListener also for PromptDialog.
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.