Created
September 11, 2019 15:19
-
-
Save flopshot/3993bdb2b3cef7c7c1b7f7bd1e10f291 to your computer and use it in GitHub Desktop.
WhiteLabelConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.java | |
package com.whitelabeldemo; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import javax.annotation.Nonnull; | |
public class WhiteLabelConfig extends ReactContextBaseJavaModule { | |
@Nonnull | |
private final String appName; | |
public WhiteLabelConfig(@Nonnull ReactApplicationContext reactContext) { | |
super(reactContext); | |
this.appName = reactContext | |
.getApplicationContext() | |
.getResources() | |
.getString(R.string.app_name); | |
} | |
@Nonnull | |
@Override | |
public String getName() { | |
return "WhiteLabelConfig"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getAppName() { | |
return appName; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getPrimaryColor() { | |
return "#fdf6e3"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getPrimaryTextColor() { | |
return "#657b83"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getGreetingText() { | |
return "Welcome"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment