How do i apply a common template to every screen in a sketchflow project.
I basically want some common navigation on the top and side and don’t want to have to draw it on every screen.
You can create your common UI as a component screen. It can then be used in as many other screens as you like.
You can either create a new component screen in the map, or select some content already on a screen, and turn that into a new component screen using the context menu on those items.
Related
I'm on the Tasks screen where I have a UI kitten Overflow Menu component bound to a card, while I'm on Tasks, it works as expected, but when I switch to another screen (Habits screen) and I go back to Tasks and press the dropdown menu icon the OverflowMenu appears on the Habits screen, not on Tasks.
This is a link for an expo snack to reproduce the problem.
https://snack.expo.dev/#sabri0o/experimenting-things
I found the problem:
you are using inside the add task component.
must be used only once and it should be on the top layer of your application “aka”
If you use it in multiple places it will break the app behavior as for each used the component will look at it as an anchor for its UI (in this case the dropdown will see the app provider in add task as the anchor after navigating to it so it will bypass the one wrapping the app.
For simpler words:
Think of the as a box, If you use another in a component inside of it you create a smaller box, once you visit that component’s screen the box now will be the smaller one and the UI kitten components will relate to and inside that box.
What happened exactly in your app:
The app renders ==> Generate the first (wrapping the navigator in App.js) ==> you click on the dropdown (everything is fine) ==> you navigate to “habits/Add task” screen ==>Generate a second (a smaller box)==> the dropdown now is linked to the new ApplicationProvider ==> you get back to “tasks” screen ==> click on the dropdown ==> it displays inside the new (the smaller box)
That’s why you see it inside the “habits/Add task” screen
I'm using React Native Router Flux and have a bottom tab bar. I have a screen set up with a lot of links to other screens on it. If the parent scene isn't added to the tabs, I'm unable to route to it.
I've looked through the documentation and tried various options and styling. I think the easiest option would be to apply a width of 0 to that particular scene group, but it isn't available with View styles.
I want to be able to hide the parent scene so it isn't showing in the tab bar. At the moment, nothing is changing and the item is showing in the tab bar.
Figured it out. The problem was that I had the child scenes nested within a parent scene. When I removed them from the parent and outside of the tabs, it worked perfectly.
I am new to React Native and am working on a simple app, the app loads data structured like file folder hierarchy, so at top level, when a item is clicked, I want to switch to next level and Etc. every level has the same data, I guess I need to use the same component, I want to use react navigation to switch between levels, but I cannot do this because the same component is used.
Of course you can say just change the components' state with different data, but I need the navigation animation effect and navigating to upper level when click the back navigation component at the top.
Please help, thanks]1
Since I am using StackNavigation, using "push" is the answer,
this.props.navigation.push('ScreenName');
see this link: https://reactnavigation.org/docs/en/navigating.html
As shown above, I want to create this two-part screen where I can click onto both the A component and B component on the first view provided here. When a user scrolls B component, it may take up the entire screen and move over the A component. (A component does not move with the FlatList).
I'm new to react native and was wondering how I could create such behavior? I tried using absolute positioning and ListHeaderComponent inside the FlatList but didn't really get anywhere. Let me know if anyone has an idea.
Thanks!
I would try something like the following screen structure:
View
Image
ScrollView w/ trans background that goes to the top of screen
FlatList with top padding to push it below the image
Items in list
/FlatList
/ScrollView
/View
You could also see if react-native-parallax-scroll-view works for you as it looks somewhat similar to what you describe
https://github.com/jaysoo/react-native-parallax-scroll-view
I'm writing a codenameone application where I want to have an image displayed across the top of the screen as a header. I do not want to include this image in every form/container that I create so therefore I came up with the following solution:
I have a Main form which contains the image (North) and a container (Center) which will then hold all the components of the specific screen that I want to show.
I will then create containers that represent each individual screen. My idea was to add these containers to the container of the main form, one by one and that navigation between them would be handled by changing the contents of that main screen container.
But I cannot find out how to make this work. As long as I have one single screen to show it is easy... The main form container can be an embedded container that is set to show the container for the single screen. But when I try to navigate to another I cannot make it work.
So, is there another approach I should use?
If not, how should I handle navigation between screens?
Is this with a GUI builder app or with a handcoded app?
Either way a simple way of customizing this if your app has a side menu or Toolbar would be to customize the TitleArea UIID to include your background image. E.g. start with a modern theme like the Business Theme and in the designer theme change the title area border property to be "Empty".
Then define the background image to be the image you want with "scaled to fit" or "aligned bottom" depending on what you want. Make sure to include enough space in the image for the title are and use a multi image so it will adapt for other OS's.