Skip to content

Instantly share code, notes, and snippets.


Hristo Eftimov HristoEftimov

View GitHub Profile
HristoEftimov / NativeScript_Bottom_Nav_templ.jsx
Last active May 19, 2017
NativeScript: scrollable application with a fixed bottom navigation with nice icon buttons
View NativeScript_Bottom_Nav_templ.jsx
<ActionBar title="All cocktails"></ActionBar>
<GridLayout rows="*,60">
<ScrollView row="0">
<WrapLayout orientation="horizontal">
<GridLayout *ngFor="let item of data" width="50%" height="150">
src="~/images/{{ item.imageURL }}"
HristoEftimov / getStateForAction.js
Last active Feb 25, 2018
React Native and ReactNavigation: Disable Android's hardware back button for specific screen
View getStateForAction.js
const defaultGetStateForAction = AppNavigator.router.getStateForAction;
AppNavigator.router.getStateForAction = (action, state) => {
const screen = state ? state.routes[state.index] : null;
const tab = screen && screen.routes ? screen.routes[screen.index] : null;
const tabScreen = tab && tab.routes ? tab.routes[tab.index] : null;
if (
action.type === NavigationActions.BACK &&
tab && tab.routeName === 'EventsTab' &&
You can’t perform that action at this time.