react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

custom layout with expo plugin?

Open pixelkoduje opened this issue 2 years ago • 8 comments

How to add custom xml layout with expo plugin?

pixelkoduje avatar Oct 02 '23 12:10 pixelkoduje

I don’t know. I guess you’d have to create a custom Expo plug-in to inject your desired xml file into your app.

christocracy avatar Oct 02 '23 12:10 christocracy

You have an idea? As in. inject any file? Is this possible in the expo custom plugin?

pixelkoduje avatar Oct 02 '23 12:10 pixelkoduje

Like I said: “I don’t know”.

google “expo plug-in copy file”

christocracy avatar Oct 02 '23 12:10 christocracy

And how do I inject the file, to a place that does not exist XD Android folder does not exist, so through the "fs" library I am not able to drop the file, to such a place.

pixelkoduje avatar Oct 02 '23 12:10 pixelkoduje

I don’t know. I have little experience with Expo.

christocracy avatar Oct 02 '23 12:10 christocracy

@pixelkoduje look to another expo plugins. f.e. here xml file coping from project to android folder

superyarik avatar Oct 07 '23 00:10 superyarik

This is the solution. Edit your metro.config.js in such a way: let config = getDefaultConfig(__dirname); config.resolver.assetExts.push('xml'); module.exports = config;

This includes xml files in app/src/main/res/layout folder. Then put your template file in this folder and it should work.

@christocracy Maybe this could be added to the documentation so that Expo users can use this.

Kriznar avatar Apr 04 '24 16:04 Kriznar

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar May 05 '24 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 19 '24 01:05 github-actions[bot]