![]() ![]() So using ScreenOrientation = ScreenOrientation.Portrait is a cleaner way of assigning orientation that does not require you to assign fully qualified class name on every one of your activities and does not break if the package name changes. ![]() The issue is then if your package name changes you break your dot class names in your manifest. In your manifest will work as the class name, once expanded in the manifest matches the one in your code. You can work around this auto-generated fully qualified class name by using the Name element in your Activity attribute to prevent the auto-generated name from being created, i.e.: [Activity(Label = "PlayScriptStarling", Name = "", MainLauncher = true, Icon = assuming your package name is "", using: auto-generates a fully qualified class name for your activities that do NOT have a Name attribute assigned to your activity class. I've gotten a lot of IM questions concerning this Q/A, so I'm expanding the answer on why using the manifest method does not work. This is the only way that will force the activity to always be portrait based due to auto-generated class names produced by Xamarin without hard-coding your class names. Navigation.You can tag your activity to be portrait using a class attribute: Public class BaseContentPage : ContentPage This is the call to the pageRendered code:. I am trying to use th in a cross-platform application through a pageRendered and it connects with Facebook fine, but when come back, it crash. But how can I set the ButtonType in the Renderer? ![]() I tried to implement a iOS only Xamarin App and if I set the ButtonType to Custom, then it works. Now I have the issue that the Highlighted image is on top of the normal image, so that the button is not in Lime, more in something between and the text is getting green. Var image = UIGraphics.GetImageFromCurrentImageContext() Var context = UIGraphics.GetCurrentContext() Ĭontext.SetFillColorWithColor(color.ToCGColor()) Private UIImage ImageWithColor(Color color) Protected override void OnElementChanged(ElementChangedEventArgs e)Ĭontrol.SetBackgroundImage(ImageWithColor(Color.Green), UIControlState.Normal) Ĭontrol.SetBackgroundImage(ImageWithColor(Color.Lime), UIControlState.Highlighted) I tried to implement on iOS the following ButtonRenderer: class OBButtonRenderer : ButtonRenderer The button should be green with white text and on click the button should be in a darker green, but same text color. Now I'm trying to implement the same on iOS and I have one issue. I startet with Android and a custom button, which works fine. I'm currently trying to implement customs controls (Buttons, Labels, etc.) which looks and behave on all plattform similar. ![]() Global::(this, bundle) ÄataLayer.Sync(path, sCipherKey, urlText, sDbfile, sAuthScheme, sUsername, sPassword) Path = Path.Combine(fullPath, sqliteFilename) Protected override async void OnCreate(Bundle bundle)įullPath = () // Documents folder I have made a small sample that demonstrates this issue public class AppĬontentPage content = new ContentPage " I done a nuget to get version 1.1.1 before I started so I am not sure if it used to work? Or if what I am doing is supported. I appreciate that I cant really swipe on the map page as the map takes up the full screen but even after I have changed page the swipe to open never comes back. The menu opens on the main page with a swipe but as soon as I navigate to a page with a map on the swipe to open gesture stops working. I get a button on the navigation header that lets me open the master menu and I can forward navigate into new pages for the different parts of my app. My app design wraps a few pages in a navigation page to load into the details page of a master detail view. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |