Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 3x 3x | import { ColorDescriptor } from 'color-string';
import path from 'path';
import { ResizeMode } from '../constants';
import configureAndroidManifestXML from './AndroidManifest.xml';
import configureColorsXML from './Colors.xml';
import configureDrawableXML from './Drawable.xml';
import configureDrawables from './Drawables';
import configureMainActivity from './MainActivity';
import configureStylesXML from './Styles.xml';
export default async function configureAndroid(
projectRootPath: string,
{
imagePath,
resizeMode,
backgroundColor,
}: {
imagePath?: string;
resizeMode: ResizeMode;
backgroundColor: ColorDescriptor;
}
) {
const androidMainPath = path.resolve(projectRootPath, 'android/app/src/main');
await Promise.all([
configureDrawables(androidMainPath, imagePath),
configureColorsXML(androidMainPath, backgroundColor),
configureDrawableXML(androidMainPath, resizeMode),
configureStylesXML(androidMainPath),
configureAndroidManifestXML(androidMainPath),
configureMainActivity(projectRootPath, resizeMode),
]);
}
|