I'm normally in Angular / Cordova world, but now im pressured to edit a native plugin, which im using with Cordova.
Source of the plugin
https://github.com/wildabeast/BarcodeScanner/tree/master/src/ios
Can anyone explain me how I have to edit the files to manipulate the size of the cancel button.
scannerOverlay.xib
<object class="IBUINavigationItem" id="240626599">
<reference key="IBUINavigationBar" ref="1064216609"/>
<string key="IBUITitle">Barcode Scanner</string>
<object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="1053701234">
<string key="IBUITitle">Cancel</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIStyle">1</int>
<reference key="IBUINavigationItem" ref="240626599"/>
</object>
Related
I am using Shell in my App to handle navigation between views and its FlyoutMenu works perfectly on Android as can be seen here:
Screenshot of FlyoutMenu on Android
However, when I open the Flyout on iOS it looks completely different (and wrong):
Screenshot of FlyoutMenu on iOS
This is the code I have in my AppShell.xaml:
<?xml version="1.0" encoding="utf-8" ?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="CMApp.AppShell"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Cargomando"
xmlns:pages="clr-namespace:CMApp"
xmlns:resources="clr-namespace:CMApp.Resources"
FlyoutBackgroundColor="LightGray">
<Shell.Resources>
<ResourceDictionary>
</ResourceDictionary>
</Shell.Resources>
<Shell.FlyoutHeader>
<Image Source="cargomando.png"/>
</Shell.FlyoutHeader>
<FlyoutItem Title="{x:Static resources:Tour.TitleString}">
<Tab>
<ShellContent>
<pages:TourList/>
</ShellContent>
</Tab>
</FlyoutItem>
<FlyoutItem Title="{x:Static resources:Settings.TitleString}">
<Tab>
<ShellContent>
<pages:Settings/>
</ShellContent>
</Tab>
</FlyoutItem>
<MenuItem Text="{x:Static resources:Footer.PrivacyProtection}" Command="{Binding PrivacyProtectionCommand}"/>
<MenuItem Text="{x:Static resources:Footer.Imprint}" Command="{Binding ImprintCommand}"/>
<MenuItem Text="DEBUG: Tracking stoppen" Command="{Binding StopTrackingCommand}"/>
</Shell>
What am I doing wrong that it works fine on Android but not on iOS? Thanks!
During creation of a sample application for Lucas Zhang I noticed that the sample application works fine. After comparing my App and the sample after some digging I noticed that the problem is caused by defining a global style for Grid in my ResourceDictionary of my App.xaml. Xamarin apparently uses a Grid for the elements in the FlyoutMenu to which my style with a pretty large HeightRequest gets applied but this seemingly only happens on iOS.
I have put i18n folder in app/assets/i18n/en/strings.xml as per guide and also I have declared the code in .tss and also in views.xml file in this way
i18n consists of
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="username">Username_Ar</string>
<string name="password">Password</string>
<string name="login">Login</string>
<string name="members_list">Members List</string>
<string name="organizations_list">Organizations List</string>
<string name="membership_number">Membership Number</string>
<string name="real_estate">real_estate</string>
</resources>
and view.xml
<TextField id="username_textField" hintText="L('username')" borderColor="Gray" borderStyle="Ti.UI.INPUT_BORDERSTYLE_ROUNDED" color="#336699" top="170" left="40" width="250" height="40"/>
And also I have tried to put the code in .tss file
“#password_label”:{
font:
{ fontSize:12 }
,
top: 300,
left: 100,
height: 30,
text:L(“password”)
}
But there is no success instead, the mobile view is removing that particular text as i have displayed in the image. (3 brown dots must have ‘username’,’password’ and password) but its empty.
Check this screenshots
https://jira.appcelerator.org/secure/attachment/51472/3.png
https://jira.appcelerator.org/secure/attachment/51473/4.PNG
issue already raised:
https://jira.appcelerator.org/browse/TC-4754
This is really gonna kidding me!
I just fixed the issue by Cleaning up the project. This Titanium is going to eat my brain lol!
Wix I18n Dev.The version of wixtoolset is V3.7.
And the Installer UI is created by UIExtension.
In the installation process, there are some UI strings cannot be localized. Such as "Copying new files" and so on. I searched these strings and there are laid in the wix source code(wix37-sources\src\ext\UIExtension\wixlib\WixUI_en-us.wxl), and wix has localized these strings.
It's confusing to me that wix has localized these strings, but it still displayed as English in the installation process. Even I replaced there strings in .wxl file ,it still displayed as English strings.
I tried the example of BdN3504.
the wxs file is the same as BdN3504.
the wxl file is
and you can see the status is still keep English.
My build environment is VS2010 & wix3.7. I don't know what's wrong with it....
I already answered this question here.
Either read that or check out the paragraph called Progress Bar Messages in Nick Ramirez' book WiX 3.6: A Developer's Guide to Windows.
The good people of packtpublishing are offering the chapter of his book containing that paragraph for free here:
Chapter 12: Localizing Your Installer. See page 329.
Another page of interest is this MSDN article: Standard Actions Reference which is also noted in the book.
Edit: Because of the comments I will post a working minimal example and a screenshot, so you see that it works:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="LocalizingErrors" Language="1034" Version="1.0.0.0" Manufacturer="SomeOne" UpgradeCode="7ddbcad4-98d9-4c2d-9ae6-6fdc47314947">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MediaTemplate EmbedCab="no" />
<Feature Id="ProductFeature" Title="LocalizingErrors" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<!-- Custom Progress messages
Custom progress messages are defined by a table in the MSI called ActionText. However, by default
this table isn't included. Without it, the messages are the stock English versions.
To add the ActionText table with strings for progress messages, add a ProgressText element inside
a UI element for each standard action found in the Execute sequence. For example, to add a
localized message for the InstallFiles action, add the following markup to one of your wxs files:
-->
<UI>
<ProgressText Action="InstallFiles" Template="!(loc.InstallFilesTemplate)">!(loc.InstallFiles)</ProgressText>
<ProgressText Action="CreateShortcuts" Template="!(loc.CreateShortcutsTemplate)">!(loc.CreateShortcuts)</ProgressText>
<ProgressText Action="WriteRegistryValues" Template="!(loc.WriteRegistryValuesTemplate)">!(loc.WriteRegistryValues)</ProgressText>
<ProgressText Action="RegisterUser" Template="!(loc.RegisterUserTemplate)">!(loc.WriteRegistryValues)</ProgressText>
<ProgressText Action="RegisterProduct" Template="!(loc.RegisterProductTemplate)">!(loc.RegisterProduct)</ProgressText>
<ProgressText Action="PublishFeatures" Template="!(loc.PublishFeaturesTemplate)">!(loc.PublishFeatures)</ProgressText>
<ProgressText Action="PublishProduct" Template="!(loc.PublishProductTemplate)">!(loc.PublishFeatures)</ProgressText>
<ProgressText Action="InstallFinalize" Template="!(loc.InstallFinalizeTemplate)">!(loc.InstallFinalize)</ProgressText>
</UI>
<UIRef Id="WixUI_Minimal"/>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="LocalizingErrors" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="92A175A0-D15D-48EC-B2E1-FD5848FB6430">
<File Id="somefile" Source="..\File.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Accompanying this example, you have to have a localisation file for your Culture. You have to set the Culture in the project properties under Build->Cultures to build. In my case I named it es-es.wxl and the file contents follow:
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="es-es" xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="1252" Language="1034">
<String Id="Error_1311">Archivo no encontrado: [2]. Compruebe que el archivo existe y que puedes acceder a él.</String>
<String Id="InstallFiles">Installazione del archivos</String>
<String Id="InstallFilesTemplate">Archivo: [1], Tamaño de archivo: [6], Directorio: [9]</String>
<String Id="CreateShortcuts">Creacion de los atajos</String>
<String Id="CreateShortcutsTemplate">Atajo [1] creado</String>
<String Id="WriteRegistryValues">Escribir en registro</String>
<String Id="WriteRegistryValuesTemplate">Camino: [1], Nombre: [2], valor: [3]</String>
<String Id="RegisterUser">Registrar a los usuarios</String>
<String Id="RegisterUserTemplate">Usario: [1]</String>
<String Id="RegisterProduct">Registrar producto</String>
<String Id="RegisterProductTemplate">Producto: [1]</String>
<String Id="PublishFeatures">Publicar las características</String>
<String Id="PublishFeaturesTemplate">Caraterística: [1]</String>
<String Id="PublishProduct">Publicar el producto</String>
<String Id="PublishProductTemplate">Producto: [1]</String>
<String Id="InstallFinalize">Finalizar la instalación</String>
<String Id="InstallFinalizeTemplate">Finalizar [ProductName]</String>
</WixLocalization>
Lastly a Screenshot to show you that it works:
Another edit: To localize error strings, you simply have to define Error elements with the corresponding error numbers:
<UI>
<Error Id="1322">Una parte de la ruta de la carpeta no es válido. Se está vacío o supera la longitud permitida por el sistema.</Error>
<Error Id="1311">!(loc.Error_1311)</Error>
</UI>
The first error string is hard-coded, so that's not such a good solution. It's better to use localization files, as it is done in the second Error element.
I created a simple calculator app in universal mode. I have two xib one for iphone and other for ipad. I created all my view design only in iphone, my ipad xib is blank. Now when I deployed my app for iphone in ipad, it comes in the size of iphone. I have choosen the autoresize option. Will I have to create same view of iphone in ipad xib for the correct display or is there any other way? This is how my app currently displays on ipad. I need it in a full screen mode.
EDIT: This is the sample source code of iphone xib. How should I modify this to fit for ipad?
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">10K549</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1038.36</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">933</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBUIView</string>
<string>IBUIBarButtonItem</string>
<string>IBProxyObject</string>
<string>IBUIToolbar</string>
<string>IBUITextField</string>
<string>IBUITextView</string>
<string>IBUITableView</string>
<string>IBUITableViewCell</string>
<string>IBUIButton</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="843779117">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="774585933">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUITextField" id="234836822">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{12, 48}, {286, 31}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSNextKeyView" ref="1066176330"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentVerticalAlignment">0</int>
<string key="IBUIText">0</string>
<int key="IBUIBorderStyle">3</int>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<int key="IBUITextAlignment">2</int>
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
<float key="IBUIMinimumFontSize">17</float>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIKeyboardType">4</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="1025764138">
<int key="type">1</int>
<double key="pointSize">14</double>
</object>
<object class="NSFont" key="IBUIFont" id="891898266">
<string key="NSName">Helvetica</string>
<double key="NSSize">14</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIButton" id="1066176330">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{41, 102}, {50, 50}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSNextKeyView" ref="182110945"/>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">1</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">1</string>
<object class="NSColor" key="IBUIHighlightedTitleColor" id="899681977">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
.
.
.
.
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">ViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="101.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="103.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="104.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="105.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="106.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="111.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="15.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<real value="0.0" key="17.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="25.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="69.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="78.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="82.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="83.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="94.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">125</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">933</string>
</data>
</archive>
Right click on XIB.
Choose open as.
Choose Source code.
And in it modify following:
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{320, 480}</string>
<string>{480, 320}</string>
</object>
to:
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{768, 1024}</string>
<string>{1024, 768}</string>
</object>
That's it.
I suggest using AutoLayout. If you do your view with auto layout for iPhone it will look nearly the same on the iPad, just bigger. AutoLayout is pretty easy in XIBs.
The other possibility is to create a separate XIB for the iPad layout. If you do so just have a look at the other answers which describe how to do that easily.
You need to make two seprate xib and manage all buttons,textfiels and add all these in New Xib...
Way To Create Ipad Xib from iphone xib....
1)First copy iphone xib and paste just change the name like ~ipad.xib give and add it to the bundle
2)now you have an 2 xib 1 is for iphone and 1 is for ipad.
3)go to ipad xib right click on in it see open as -> open it in source code and then you have to find 320,480 value search that value in source code and change into
768,1024...
that's it do this way....
Yes!!! You have to create view for iPad also in other Xib file.
From Converting iPhone xib to iPad xib?
Refer Jag's answer..where he States that,
I was able to narrow it down to a few things, so here are the steps that worked for me:
1) Make a copy of the iPhone xib file and add it to your project
2) Right click the file (in xcode) and Open As > Source Code
3) The 2nd line should look like:
Replace with:
4) Search for "IBCocoaTouchFramework" and Replace all occurrences with "IBIPadFramework"
5) Save the file and Open As > Interface Builder - iOS
The file might still look like a regular iPhone xib, but for me, once I changed the Status Bar to "Black" in the Attributes inspector the rest of the xib just kind of "snapped" into an iPad xib
EDIT : You can also do in this way==>convert iphone App to IPad
1) Select the Universal option.
2) Transfer code from the existing iPhone project to the new project.
3) NOW,Make the xib files for iPad, and make the connections (IBOutlets).
Wherever you need platform specific features (eg. Popover, Split ViewController etc for iPad), put an IF statement to handle the device specific features.
In iPhone xib file change the target from iOS.CocoaTouch to iOS.CocoaTouch.iPad, and now if you open the file in interface builder, you will see settings for iPad.
I have successfuly created a localized installer and bootstrapper setup using WiX. There is just one problem with the bootstrapper localization. Everything is fine except the values of button captions in a dialog that appears when the installation is being canceled (exit confirmation yes/no). There are no string elements in the bootstrapper theme wxl files that would allow to change these values. In the MSI installer this was possible by setting "WixUIYes", "WixUINo" values.
I have tried to add the following elements to my localized theme file, but without success.
<String Id="WixUIYes" Overridable="yes">some_value1</String>
<String Id="WixUINo" Overridable="yes">some_value2</String>
Is there a way to change the caption values of mentioned buttons? Their values are currently in the system language.
This is my WXS file:
<?xml version='1.0' encoding='windows-1250'?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Test" Version="1.0.0.0" UpgradeCode="MY-GUID">
<WixVariable Id="WixStdbaThemeXml"
Value="Resources\HyperlinkTheme.xml" />
<WixVariable Id="WixStdbaThemeWxl"
Value="Resources\LocalizedHyperlinkTheme.wxl" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" >
<bal:WixStandardBootstrapperApplication LicenseUrl="" SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<Chain>
<ExePackage Id="VCRedistExe"
Cache="no"
Compressed="no"
Vital="yes"
SourceFile="vcredist_x86.exe" />
<MsiPackage Id="MyAppMsi"
Cache="no"
Compressed="yes"
Vital="yes"
SourceFile="MyApp.msi"
DisplayInternalUI="yes" />
</Chain>
</Bundle>
</Wix>