我如何在 React Native 中更改警报的颜色 [英] How do i change the color of my alert in react native

查看:61
本文介绍了我如何在 React Native 中更改警报的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 React Native 中更改警告框的背景颜色和字体大小?单击按钮后,我发出警报.我不知道如何设计这个,谢谢你的帮助

How do i change the background color, font size of my alert box in react native? I put my alert after a button is clicked. I don't know how to style this one, Thanks for the help

Alert.alert(
  'Plate',
  'Plate has been sent for printing!',
  [
    {text: 'OK', onPress: () => console.log('OK Pressed')},
  ],
  { cancelable: false }
)

推荐答案

  1. 打开android/app/src/main/res/values/styles.xml