diff --git a/android/app/build.gradle b/android/app/build.gradle
index 342a7c5..0bcccca 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -166,13 +166,6 @@ android {
}
}
- packagingOptions {
- pickFirst "lib/armeabi-v7a/libc++_shared.so"
- pickFirst "lib/arm64-v8a/libc++_shared.so"
- pickFirst "lib/x86/libc++_shared.so"
- pickFirst "lib/x86_64/libc++_shared.so"
- }
-
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 62fe59f..73a997c 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -1,9 +1,8 @@
-
-
diff --git a/ios/JellyfinAudioPlayer/AppDelegate.m b/ios/JellyfinAudioPlayer/AppDelegate.m
index 5968c0c..7d6914f 100644
--- a/ios/JellyfinAudioPlayer/AppDelegate.m
+++ b/ios/JellyfinAudioPlayer/AppDelegate.m
@@ -36,7 +36,11 @@ static void InitializeFlipper(UIApplication *application) {
moduleName:@"JellyfinAudioPlayer"
initialProperties:nil];
- rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
+ if (@available(iOS 13.0, *)) {
+ rootView.backgroundColor = [UIColor systemBackgroundColor];
+ } else {
+ rootView.backgroundColor = [UIColor whiteColor];
+ }
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 5ae0f01..3b32523 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -10,7 +10,6 @@ import {
DefaultTheme,
DarkTheme,
} from '@react-navigation/native';
-import { colors } from './Colors';
interface State {
isReady: boolean;
@@ -55,8 +54,6 @@ export default class App extends Component<{}, State> {
return null;
}
- console.log(colorScheme);
-
return (
diff --git a/src/components/Colors.android.tsx b/src/components/Colors.android.tsx
new file mode 100644
index 0000000..c27a7ed
--- /dev/null
+++ b/src/components/Colors.android.tsx
@@ -0,0 +1,26 @@
+import { StyleSheet, PlatformColor } from 'react-native';
+import { THEME_COLOR } from 'CONSTANTS';
+
+export const colors = StyleSheet.create({
+ text: {
+ color: PlatformColor('?attr/colorOnBackground'),
+ },
+ view: {
+ backgroundColor: PlatformColor('?android:colorBackground'),
+ },
+ border: {
+ borderColor: '#88888844'
+ },
+ activeBackground: {
+ backgroundColor: `${THEME_COLOR}44`,
+ },
+ imageBackground: {
+ backgroundColor: PlatformColor('?attr/colorBackgroundFloating'),
+ },
+ modal: {
+ backgroundColor: PlatformColor('?attr/colorBackgroundFloating'),
+ },
+ input: {
+ backgroundColor: PlatformColor('?attr/colorBackgroundFloating'),
+ }
+});
\ No newline at end of file
diff --git a/src/components/Colors.ios.tsx b/src/components/Colors.ios.tsx
new file mode 100644
index 0000000..686609f
--- /dev/null
+++ b/src/components/Colors.ios.tsx
@@ -0,0 +1,26 @@
+import { StyleSheet, PlatformColor, DynamicColorIOS } from 'react-native';
+import { THEME_COLOR } from 'CONSTANTS';
+
+export const colors = StyleSheet.create({
+ text: {
+ color: PlatformColor('label'),
+ },
+ view: {
+ backgroundColor: PlatformColor('systemBackground'),
+ },
+ border: {
+ borderColor: PlatformColor('systemGray5Color'),
+ },
+ activeBackground: {
+ backgroundColor: DynamicColorIOS({ light: `${THEME_COLOR}16`, dark: `${THEME_COLOR}66` })
+ },
+ imageBackground: {
+ backgroundColor: PlatformColor('systemGray5Color')
+ },
+ modal: {
+ backgroundColor: DynamicColorIOS({ light: '#eeeeeeee', dark: '#222222ee' })
+ },
+ input: {
+ backgroundColor: PlatformColor('systemGray5Color'),
+ }
+});
\ No newline at end of file
diff --git a/src/components/Colors.tsx b/src/components/Colors.tsx
deleted file mode 100644
index 0edb1b9..0000000
--- a/src/components/Colors.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import { StyleSheet, PlatformColor, Platform, DynamicColorIOS } from 'react-native';
-import { THEME_COLOR } from 'CONSTANTS';
-
-export const colors = StyleSheet.create({
- text: {
- ...Platform.select({
- ios: {
- color: PlatformColor('label'),
- },
- android: {
- color: PlatformColor('?android:attr/textColorPrimary'),
- }
- }),
- },
- view: {
- ...Platform.select({
- ios: {
- backgroundColor: PlatformColor('systemBackground'),
- },
- android: {
- backgroundColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- },
- border: {
- ...Platform.select({
- ios: {
- borderColor: PlatformColor('systemGray5Color'),
- },
- android: {
- borderColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- },
- activeBackground: {
- ...Platform.select({
- ios: {
- backgroundColor: DynamicColorIOS({ light: `${THEME_COLOR}16`, dark: `${THEME_COLOR}66` })
- },
- android: {
- backgroundColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- },
- imageBackground: {
- ...Platform.select({
- ios: {
- backgroundColor: PlatformColor('systemGray5Color')
- },
- android: {
- backgroundColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- },
- modal: {
- ...Platform.select({
- ios: {
- backgroundColor: DynamicColorIOS({ light: '#eeeeeeee', dark: '#222222ee' })
- },
- android: {
- backgroundColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- },
- input: {
- ...Platform.select({
- ios: {
- backgroundColor: PlatformColor('systemGray5Color'),
- color: PlatformColor('label'),
- },
- android: {
- backgroundColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- }
-});
\ No newline at end of file
diff --git a/src/screens/Player/components/MediaControls.tsx b/src/screens/Player/components/MediaControls.tsx
index e8aec40..c83165f 100644
--- a/src/screens/Player/components/MediaControls.tsx
+++ b/src/screens/Player/components/MediaControls.tsx
@@ -7,6 +7,7 @@ import ForwardIcon from 'assets/forwards.svg';
import BackwardIcon from 'assets/backwards.svg';
import PlayIcon from 'assets/play.svg';
import PauseIcon from 'assets/pause.svg';
+import { useColorScheme } from 'react-native-appearance';
const BUTTON_SIZE = 40;
@@ -32,61 +33,64 @@ const Button = styled.View`
`;
export default function MediaControls() {
+ const scheme = useColorScheme();
+ const fill = scheme === 'dark' ? '#ffffff' : '#000000';
+
return (
-
+
);
}
-export function PreviousButton() {
+export function PreviousButton({ fill }: { fill: string }) {
const hasQueue = useHasQueue();
return (
-
+
);
}
-export function NextButton() {
+export function NextButton({ fill }: { fill: string }) {
const hasQueue = useHasQueue();
return (
-
+
);
}
-export function MainButton() {
+export function MainButton({ fill }: { fill: string }) {
const state = usePlaybackState();
switch (state) {
case STATE_PLAYING:
return (
-
+
);
case STATE_PAUSED:
return (
-
+
);
default:
return (
-
+
);
}
diff --git a/src/screens/Player/index.tsx b/src/screens/Player/index.tsx
index 6fb2656..0dabe78 100644
--- a/src/screens/Player/index.tsx
+++ b/src/screens/Player/index.tsx
@@ -1,28 +1,20 @@
import React from 'react';
-import { DynamicColorIOS, StyleSheet, ScrollView, Platform, PlatformColor } from 'react-native';
+import { StyleSheet, ScrollView } from 'react-native';
import MediaControls from './components/MediaControls';
import ProgressBar from './components/ProgressBar';
import NowPlaying from './components/NowPlaying';
import Queue from './components/Queue';
+import { colors } from 'components/Colors';
const styles = StyleSheet.create({
- outer: {
- ...Platform.select({
- ios: {
- color: PlatformColor('label'),
- backgroundColor: PlatformColor('systemBackground'),
- },
- android: {
- color: PlatformColor('?android:attr/textColorPrimary'),
- backgroundColor: PlatformColor('?android:attr/backgroundTint'),
- }
- }),
- },
+ outer: colors.view,
inner: {
padding: 25,
}
});
+console.log(JSON.stringify(styles));
+
export default function Player() {
return (