Navigation Bar is not transforming in RTL mode xamarin forms - xaml

I was using a masterdetailpage in my app which was working fine in RTL mode once i added
FlowDirection="{x:Static Device.FlowDirection}"
and i set flow direction dynamically in App.cs
but i have to change it to flyoutpage which is working well in RTL but the navigation bar is not transferring to RTL.
hamburger icon is fine
I've a problem with the navigation bar
//Start of the app in App.cs
MainPage = new NavigationPage(new Login() );
//After Successful Login
Application.Current.MainPage.Navigation.PushAsync(new FlyoutMainPage());
// in FlyoutMainPage()
NavigationPage.SetHasNavigationBar(this, false);

There are some limitations about RTL localization in xamarin forms. You could refer to Right-To-Left localizations limitations.
NavigationPage button location, toolbar item location, and transition animation is controlled by the device locale, rather than the FlowDirection property.
That means you could change the language and region to make it.
And then you have to tell your application that it’s allowed to recognize a right-to-left layout. For iOS, add the right-to-left language in the CFBundleLocalizations section of your Info.plist. Such like the following:
<key>CFBundleDevelopmentRegion</key>
<string>ar</string>
<key>CFBundleLocalizations</key>
<array>
<string>ar</string>
</array>
For Android, you could add android:supportsRtl="true" to your application tag in your AndroidManifest.xml
For more info, you could refer to Right-To-Left Localization in Xamarin.Forms
Hope it works for you.

Related

When I tap with Detox, the button is not tapped. However it can be tapped if I just click at it

The problem is when I tap with Detox, the button is not tapped. However it can be tapped if I just click at it.
version of Detox: 16.8.2,
version of React Native: 0.57.1
Solved.
This happened because I used device.openURL({url: 'https://...' }) previously to open the app from a deep link.
Instead, it worked after opening a new instance of the app with a deep link in argument: device.launchApp({newInstance: true, url: 'https://...' });
After this, the interaction can be performed.
It looks like a bug with the method device.openURL()

react-native-image-viewer - Landscape View didn't work on IOS

On Android, Landscape-Mode works like a charm, but on IOs I've found following issue:
Mobile-Device is in Landscape-Mode:
I click on an Image (Touchable-Opacity set the state modalShow
The Landscape-Mode will be switched to Portrait-Mode, after that the Modal appears
If I close the Modal, the App switch back to Landscape-Mode.
Any Idea, why this only happend on Iphone, but working well on Android?
You have to add this (or only some of them like you're needs) to your Modal, which encapsulate the Image-Zoom Component:
supportedOrientations={
[
'portrait',
'portrait-upside-down',
'landscape',
'landscape-left',
'landscape-right'
]
}
Consider using a library to manage the screen rotation https://github.com/yamill/react-native-orientation

How to Add Image/icon In dialog of titanium alloy?

var dialog = Ti.UI.createAlertDialog({
title: 'Enter text',
style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT,
buttonNames: ['OK']
});
How I can add image/icon inside dialog in titanium alloy? Is there any property that I can add?
unfortunately, you can't add an image to a alertDialog with Titanium.
Maybe it's possible with native : UIAlertView addSubview in iOS7, but you should create a module to use it with Titanium.
Last solution is to create a custom view so you can customize everything you want.

home screen icon

I just updated my Sencha Touch to Sencha Touch 2.0.1 and my home screen icon is no longer working. Previously I could inspect my code and see the correct <link> tags generated by Sencha. I no longer see these tags. I have my home screen icon set up with the following code:
Ext.application({
name: 'example',
phoneIcon: '/example/resources/icons/app_icons/114x114.png',
I have also tried changing "phoneIcon" to "icon", and I have also tried using an object after "icon" instead of a string. Any ideas?
The icon property works fine for me:
Example application: http://www.senchafiddle.com/#f15tv

Navigation framework in silverlight

In silverlight navigation framework how to navigate to a xaml page from mainpage.xaml ? In my scenario i have menu items and need to go to corresponding menu item's xaml page on menu click.
You can register a NavigationService variable on startup in your App.xaml.cs file. Assign the variable the first time you visit the page hosting the navigationframe - you get the NavigationService from the frame control.
In you menu usercontrol you can access the NavigationService in the App namespace:
((MyApp)App).NavigationService
Solution :-
In xaml pages which are of type usercontrols the navigation can be carried out by adding navigation frames in xaml page.
Ex:-
Xaml Page
<navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}"
Source="/Home" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
<navigation:Frame.UriMapper>
<uriMapper:UriMapper>
<uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
</uriMapper:UriMapper>
</navigation:Frame.UriMapper>
</navigation:Frame>
In .cs page
ContentFrame.Navigate(new Uri("URIPATH", UriKind.Relative));
// where URIPATH is the class to which the navigation is required