Skip to content

Commit

Permalink
Android StatusBar transparency fix (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
troach-sf authored Apr 13, 2020
1 parent 7880d17 commit e531aac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/constants/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const colors = {
PRIMARY_TEXT: '#000',
GREEN: '#32A852',
VIOLET: '#4051DB',
TRANSPARENT: 'transparent',

// For notifications
HIGHEST_RISK: '#e74c3c',
Expand Down
8 changes: 7 additions & 1 deletion app/views/LocationTracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import SettingsGear from './../assets/svgs/settingsGear';
import StateAtRisk from './../assets/svgs/stateAtRisk';
import StateNoContact from './../assets/svgs/stateNoContact';
import StateUnknown from './../assets/svgs/stateUnknown';
import { isPlatformiOS } from './../Util';
import { isPlatformAndroid, isPlatformiOS } from './../Util';
import ButtonWrapper from '../components/ButtonWrapper';
import Colors from '../constants/colors';
import fontFamily from '../constants/fonts';
Expand Down Expand Up @@ -73,6 +73,12 @@ class LocationTracking extends Component {
constructor(props) {
super(props);

if (isPlatformAndroid()) {
StatusBar.setBackgroundColor(Colors.TRANSPARENT);
StatusBar.setBarStyle('light-content');
StatusBar.setTranslucent(true);
}

this.state = {
appState: AppState.currentState,
timer_intersect: null,
Expand Down

0 comments on commit e531aac

Please sign in to comment.