This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const switchToTab = (componentId, index) => { | |
| Navigation.mergeOptions(componentId, { | |
| bottomTabs: { | |
| currentTabIndex: index, | |
| }, | |
| }) | |
| Navigation.popToRoot(componentId) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const buttonHamburger = componentId => ({ | |
| id: 'button.Hamburger', | |
| component: { | |
| name: 'component.Hamburger', | |
| passProps: { | |
| onPress: isOpened => Navigation.mergeOptions(componentId, { | |
| sideMenu: { | |
| left: { | |
| visible: isOpened, | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import parts from './parts' | |
| ... | |
| const news = () => ({ | |
| component: { | |
| id: 'screen.NewsScreen', | |
| name: 'screen.NewsScreen', | |
| options: { | |
| bottomTab: parts.tab('news'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import parts from './parts' | |
| import views from './views' | |
| ... | |
| const current = () => ({ | |
| stack: { | |
| id: 'tab.CurrentScreen', | |
| children: [ | |
| views.current(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Navigation } from 'react-native-navigation' | |
| import navigation from 'src/navigation' | |
| ... | |
| Navigation.setRoot(navigation.screens.main()) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Navigation } from 'react-native-navigation' | |
| import navigation from 'src/navigation' | |
| ... | |
| Navigation.push(this.props.componentId, navigation.screens.forecast()) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import FiltersIcon from 'src/components/FiltersIcon' | |
| import Logo from 'src/components/Logo' | |
| import DetailsScreen from 'src/screens/DetailsScreen' | |
| import FeedScreen from 'src/screens/FeedScreen' | |
| import LaunchScreen from 'src/screens/LaunchScreen' | |
| import SettingsScreen from 'src/screens/SettingsScreen' | |
| const components = [ | |
| { name: 'component.Logo', component: () => Logo }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const registerScreens = (store, Provider) => { | |
| componentsWithRedux.forEach(({ name, component }) => | |
| Navigation.registerComponent( | |
| name, | |
| () => props => ( | |
| <Provider store={store}> | |
| {React.createElement(component(), props)} | |
| </Provider> | |
| ), | |
| component, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const registerScreens = ({ store, persistor }, Provider) => { | |
| componentsWithRedux.forEach(({ name, component }) => | |
| Navigation.registerComponent( | |
| name, | |
| () => props => ( | |
| <Provider store={store}> | |
| <PersistGate loading={null} persistor={persistor}> | |
| {React.createElement(component(), props)} | |
| </PersistGate> | |
| </Provider> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EpoxyModelClass(layout = R.layout.item_model_header) | |
| abstract class HeaderEpoxyModel : EpoxyModelWithHolder<HeaderViewHolder>() { | |
| @EpoxyAttribute @StringRes var titleRes = 0 | |
| override fun bind(holder: HeaderViewHolder) { | |
| holder.tvTitle.setText(titleRes) | |
| } | |
| class HeaderViewHolder : KotlinEpoxyHolder() { |
OlderNewer