Skip to content

Commit

Permalink
Android fixes (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gopalakrishnan-V committed Apr 22, 2023
1 parent 67ec05c commit 30025ed
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

import com.android.build.OutputFile

Expand Down
11 changes: 11 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ buildscript {

allprojects {
repositories {
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}

mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"pod": "cd ios && pod install && cd .."
"pod": "cd ios && pod install && cd ..",
"apk:release": "cd android && ./gradlew app:assembleRelease && cd .."
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
Expand Down
8 changes: 5 additions & 3 deletions src/screens/PlayerScreen/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, {useState, useCallback, useEffect} from 'react';
import {Image, StyleSheet, Dimensions} from 'react-native';
import {Image, StyleSheet, Dimensions, Platform} from 'react-native';
import TrackPlayer, {STATE_PLAYING} from 'react-native-track-player';
import LinearGradient from 'react-native-linear-gradient';
import {useSelector} from 'react-redux';

import {getDominantColor, getGradientColors} from '../../helpers/colorHelpers';
import {useSafeAreaInsets} from 'react-native-safe-area-context';
import {COLOR_BACKGROUND} from '../../constants/colors';
import {SPACE_24, SPACE_48, SPACE_8} from '../../constants/dimens';
import {SPACE_16, SPACE_24, SPACE_48, SPACE_8} from '../../constants/dimens';
import Header from './Header';
import BottomControls from './BottomControls';
import {StackNavigationProp} from '@react-navigation/stack';
Expand Down Expand Up @@ -55,7 +55,9 @@ const PlayerScreen: React.FC<PlayerScreenProps> = props => {
styles.container,
{paddingBottom: insets.bottom + SPACE_8},
];
const topBarStyle = {marginTop: insets.top};
const topBarStyle = {
marginTop: insets.top + (Platform.OS === 'android' ? SPACE_16 : 0),
};

const colors = getGradientColors(dominantColor);

Expand Down
2 changes: 1 addition & 1 deletion src/screens/SearchScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const SearchScreen: React.FC<SearchScreenProps> = props => {
renderItem={renderItem}
keyExtractor={(_, index) => String(index)}
stickyHeaderIndices={[1]}
showsVerticalScrollIndicator={true}
showsVerticalScrollIndicator={false}
contentContainerStyle={styles.list}
onEndReached={handleLoadMore}
onEndReachedThreshold={0.8}
Expand Down

0 comments on commit 30025ed

Please sign in to comment.