Navigation SDK 目前仅面向部分客户提供。如需了解详情,请
与销售人员联系。
Google Maps Platform 即将推出新的地图样式设置。此次地图样式更新包括新的默认调色板,并改进了地图体验和易用性。所有地图样式都将在 2025 年 3 月自动更新。如需详细了解适用范围以及如何提前选择启用,请参阅
Google Maps Platform 的新地图样式。
自定义“条款及条件”对话框
您可以使用 TermsAndConditionsUIParams
对象更改“条款及条件”对话框的背景颜色、字体和文本颜色,从而自定义其外观和风格。
示例
以下代码示例演示了如何自定义“条款及条件”对话框的外观和风格。
TermsAndConditionsUIParams uiParams = TermsAndConditionsUIParams.builder()
.setBackgroundColor(Color.WHITE)
.setTitleColor(Color.BLACK)
.setTitleTypeface(Typeface.DEFAULT)
.setTitleTextSize(20)
.setMainTextColor(Color.BLACK)
.setMainTextTypeface(Typeface.DEFAULT)
.setMainTextTextSize(20)
.setButtonsTypeface(Typeface.DEFAULT)
.setButtonsTextSize(20)
.setAcceptButtonTextColor(Color.BLACK)
.setCancelButtonTextColor(Color.BLACK)
.build();
NavigationApi.showTermsAndConditionsDialog(
getActivity(),
"Your Company Name",
"Your title",
uiParams,
null,
TermsAndConditionsCheckOption.ENABLED);
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-01-14。
[null,null,["最后更新时间 (UTC):2025-01-14。"],[[["The `TermsAndConditionsUIParams` object allows customization of the Terms and Conditions dialog's appearance, including background color, fonts, and text colors."],["Developers can modify elements like title, main text, and button styles using the provided builder methods and parameters within the `TermsAndConditionsUIParams` object."],["The example code showcases how to create and apply a customized `TermsAndConditionsUIParams` object to the Terms and Conditions dialog using the `NavigationApi.showTermsAndConditionsDialog` method."]]],[]]