Skip to content

Commit

Permalink
Transparent status bar (#8)
Browse files Browse the repository at this point in the history
* Set status bar to transparent

* Bump version code & name

* 1.4.4
  • Loading branch information
razinj authored Oct 27, 2022
1 parent 717397b commit fd9963b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ android {
applicationId "com.razinj.context_launcher"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7
versionName "1.4.3"
versionCode 8
versionName "1.4.4"
archivesBaseName = "context-launcher-v$versionName-$versionCode"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context_launcher",
"version": "1.4.3",
"version": "1.4.4",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
10 changes: 4 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// React
import React, { useEffect } from 'react'
// React Native
import { StatusBar, useColorScheme } from 'react-native'
import { StatusBar } from 'react-native'
// Redux
import { PersistGate } from 'redux-persist/integration/react'
import { Provider } from 'react-redux'
Expand All @@ -18,12 +18,10 @@ import { persistor, store } from './store'
import { GestureHandlerRootView } from 'react-native-gesture-handler'

const App = () => {
const colorScheme = useColorScheme()

useEffect(() => {
if (!colorScheme) StatusBar.setBarStyle('default', true)
else StatusBar.setBarStyle(colorScheme === 'dark' ? 'light-content' : 'dark-content', true)
}, [colorScheme])
StatusBar.setTranslucent(true)
StatusBar.setBackgroundColor('transparent', true)
}, [])

return (
<Provider store={store}>
Expand Down

0 comments on commit fd9963b

Please sign in to comment.