简体   繁体   English

有没有办法更改cordova-plugin-dialogs上Android按钮的间距?

[英]Is there a way to change the spacing of Android buttons on cordova-plugin-dialogs?

I developed a hybrid mobile app. 我开发了一个混合移动应用程序。 I was wondering myself if there is a way to change the space between buttons raised from cordova-plugin-dialogs on Android. 我想知道自己是否可以更改从Android上的cordova-plugin-dialogs引发的按钮之间的间距

They usually look like: 它们通常看起来像:

在此处输入图片说明

I'm not very familiar with native development (on Android), so is there anything I can change to affect the spacing of those buttons? 我对本机开发(在Android上)不是很熟悉,所以有什么我可以更改的方法来影响这些按钮的间距吗? eg on Android manifest or something? 例如在Android清单上?

Thanks in advance! 提前致谢!

The solution here falls in the " Create your custom dialog in Android " solution, actually. 实际上,这里的解决方案属于“ 在Android中创建自定义对话框 ”解决方案。 Those are the default dialogs, and the buttons are generated automatically. 这些是默认对话框,并且按钮是自动生成的。 I don't think you can control anything else than the theme, texts and pretty much that's it. 我认为除了主题,文本之外,您无法控制其他任何事情。

If you want to be able to completely modify it, create a custom native dialog (for each platform you're targeting, if possible in iOS -not sure right now), and create a cordova plugin that opens that dialog, and returns something when the buttons are clicked... 如果您希望能够对其进行完全修改,请创建一个自定义本机对话框 (针对您要定位的每个平台,如果可能的话,请在iOS中-暂时不确定),然后创建一个cordova插件以打开该对话框,并在出现该问题时返回一些信息单击按钮...

Or simply create a "dialog" ( modal ) in html. 或者只是在html中创建一个“对话框”( 模态 )。 That will be much simpler, if you're already using cordova. 如果您已经在使用cordova,那将更加简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM