Titanium Tab.open transition - titanium

When I'm opening a window in a tab, the slide animation is by default from right to left. I need to change it to left to right.
myapp.mainTab.open(window)
Is there any way how I can pass a different transition?

you could try like it is mentioned in the example:
myWindow.open({transition:Titanium.UI.iPhone.AnimationStyle.CURL_DOWN});
the transitions are specified here. in general you should pass your own animation to open.

Related

How to switch tab programmatically in react-navigation showing the animation?

I'm using the MaterialTopTabNavigationProp, and need to change the selected tab programmatically.
I just tried using navigation.navigate or navigation.jumpTo, everything works fine, but the changing is instant with no animation, is there a way to show the classic tab switching animation?
Thanks everyone
If you want animation when you change the tab, you can use the following library.
react-native-animated-tabbar

update KeyboardAvoidingView after a layout change

I have a form in my app that has a floating bar with buttons that animates into the view at the bottom of the window when the user makes any change to any of the data in the form. I have this bar rendering relative to the height of the window so it knows when the keyboard is open or closed and will attach to wherever the bottom of the view window is at any give time.
The issue I have is the form is wrapped in a KeyboardAvoidingView around the form with a behavior of padding and this all works great, however when I make my change and my floating button bar comes up, because the input is at the bottom of the window the bar now covers up the input I'm typing in.
I haven't been able to find a way to fix this yet. I tried disabling the KeyboardAvoidingView I assume that maybe I need to somehow tell the view about this bar that's covering up part of the view but I'm not sure how I do that.
here is a snapshot of what this looks like for reference...

React Native: Creating custom tabs with animation

I have this use case which is a bit confusing compared to the norm , and Im not sure how to structure it. I have a screen (tabs) with 4 tabs .
The thing is that the contents of each tab (their screens) are actually in One big page, when scrolling down the page and it reaches the contents of Tab2 , the tab should change too to Tab2 (its not actually a screen change) .
Now initially I have used react-navigation and it's tab navigator. But here Im not sure if this should use tab navigator. The questions that arise to me (from the top of my head):
Q1) If we wrap the components (each tab's screen) in a parent one. How do we go about detecting where the scroll reached! (or something that notifies we are viewing contents of tab2 and so on...)
Q2) How can I handle the animation of the tabs (especially the line under them as shown in the image) to transition back and forth?
Q3) Is there a better way to do this! (better than my initial thoughts above)
Q1. You must use the TabNavigator to avoid the problem as you asking in Q1. So you don't need to worry about the Scroll.
Q2. I recommend using StyleSheet, create a CSS style for line bar then maybe you just need to call a function to set the CSS of current tab or use the navigation options.
Q3. TabNavigator is a good option here and it belongs to react-navigation.
TabNavigator
Animation example with custom function
--- Update ------
I have created an example project for you to solve the problem, I'm not sure if you're doing the same.
Check the Scroll.js, I added a function Callme that changes tabs when scroll reaches to end.
To detect the Scroll reaches to end or not, I have used the isCloseToBottom from another StackOverflow answer.
Follow the following link to Github project.
Change-Tabs-When-Scroll-End
Thanks
_Pradeep

React Native Maps Prevent focus when marker is clicked

is there a way to disable the marker focus when it is clicked? Like I want the map view to stay as it is when I click a marker. Right now, if I click any marker the map view automatically adjust focusing on that marker. Is there a way to disable it? Many thanks
As jasongaare states in https://github.com/react-community/react-native-maps/issues/199#issuecomment-330901293, there is a moveOnMarkerPress property for the MapView component.
I guess the only way to make it possible for now is to do the LiteMode
https://github.com/airbnb/react-native-maps/blob/master/example/examples/LiteMapView.js
So far it works just fine, it does not focus anymore to the pressed Map Mark.

Example of switching views with buttons for a carousel?

Can any one point me to an example of changing views with buttons for a carousel ?
I would like the option to swipe or click to change views.
Thanks
You've various ways to achieve it, you can either use setActiveItem:
carousel.setActiveItem(1); // Move to the 2nd carousel's item.
or apply next and previous method on your button handler to switch to the next and previous card of your carousel:
carousel.next();
carousel.previous();
Here is a demo: http://www.senchafiddle.com/#Ukg1N