Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Android support to add image as background overlay #42

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

meierrap
Copy link

Adding Android support for #36

Add support for images on RNPreventScreenshot.enableSecureView method as argument.
Supports all types of URI such as https:// or file://

Solves #34

@meierrap meierrap changed the title Add Android support for image as background overlay Add Android support to add image as background overlay May 23, 2024
@killserver
Copy link
Owner

pls add support for ios(maybe empty "fallback") )

@meierrap
Copy link
Author

meierrap commented May 30, 2024

Ios support is already done in this pr #36, I just fixed android side

@RVassili
Copy link
Contributor

RVassili commented May 30, 2024

Hey @killserver , the iOS méthod already supports the background image, see

RCT_EXPORT_METHOD(enableSecureView: (NSString *)imagePath) {
if(secureField.secureTextEntry == false) {
UIView *view = [UIApplication sharedApplication].keyWindow.rootViewController.view;
for(UIView *subview in view.subviews) {
[self addSecureTextFieldToView:subview :imagePath];
}
}
}

@killserver killserver merged commit 1463f0b into killserver:main Jun 2, 2024
@killserver
Copy link
Owner

Ios support is already done in this pr #36, I just fixed android side

thx!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants