如何更改本机基础上的无线电图标

时间:2018-05-27 06:16:44

标签: android react-native native-base

我想改变android收音机选择的图标样式。但是找不到图标源,我不能只改变颜色和大小但不能改变图标。我想用“检查”图标。

我正在使用具有材质主题的原生基础。我将其导出以进行自定义。

这是我的Radio.js里面../ native-base-theme / components / Radio.js

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.WebDriverWait;

public class Upmile {

       public static void main(String[] args) throws InterruptedException {
       // TODO Auto-generated method stub
       WebDriver driver = new ChromeDriver();
       driver.manage().window().maximize();
       driver.get("http://upamile.com");
       //This website shows a dialog box at first 
       //we can skip that dialog by clicking on the body
       driver.findElement(By.tagName("body")).click();
       Thread.sleep(2000);
       driver.findElement(By.xpath("(//A[@href='/Account/Register'])[1]")).click();
       System.out.println("Test ran successfully");
    }

 }

和material.js文件;

import { Platform } from "react-native";

import variable from "./../variables/platform";

export default (variables = variable) => {
  const radioTheme = {
    justifyContent: 'center',
    alignItems: 'center',
    fontSize: 30,
    lineHeight: 20,
    ".selected": {
      "NativeBase.IconNB": {
        fontSize: 50,
        color: Platform.OS === "ios"
          ? variables.radioColor
          : variables.radioSelectedColorAndroid,
        lineHeight: Platform.OS === "ios" ? 20 : variables.radioBtnLineHeight,
        height: Platform.OS === "ios" ? 20 : undefined
      }
    },
    "NativeBase.IconNB": {
      fontSize: 50,
      color: Platform.OS === "ios" ? "transparent" : undefined,
      lineHeight: Platform.OS === "ios"
        ? undefined
        : variables.radioBtnLineHeight,
      fontSize: Platform.OS === "ios" ? undefined : variables.radioBtnSize
    }
  };

  return radioTheme;
};

0 个答案:

没有答案