Famo.us and landscape orientation - famo.us

Is famo.us currently suitable for landscape oriented development ? I'm especially concerned in making it to work on iPhone. As I saw unfortunately the iOS < 7.1 safari takes a quarter of the height just for the navigation bar. Hiding it completely involves adding the app (webpage) to the main screen.

Famo.us is most certainly suitable for landscape oriented Design. The sizing feature of 'undefined' for Famo.us surfaces and the origin constraints on modifiers allow for designs to fit any number of device sizes and orientations.
Detecting an orientation change using only Famo.us can be done using something similar to the following..
Engine.on('resize',function(){
size = context.getSize();
if (size[0] > size[1]) {
// landscape
} else {
// portrait
}
});

Right now there isn't a way to automagically hide browser chrome without saving to home screen with the proper meta tags for ios and android. Alternatively, a Famo.us app can be wrapped in Cordova and distributed on AppStore and Google's Play Store, and the app will display in full screen without browser chrome.

Related

How to implement vertical scroll page on watchOS with SwiftUI

I want to implement a vertical scroll page like system workout app.
Now I can get a similar effect with this:
    TabView {
      page1
        .rotationEffect(.degrees(90))
      page2
        .rotationEffect(.degrees(90))
    }.tabViewStyle(.page(indexDisplayMode: .automatic))
    .rotationEffect(.degrees(-90))
But not good as system workout app does. It supports digital crown and dynamic show indicator and custom color.
So , how to implement that vertical scroll effect?
https://github.com/fredyshox/PageView
This repo works well except crown supports.

Mobile Embedded PowerBI not resizing (height) as expected when switching between landscape and portrait

When embedding a PowerBI report into a mobile app, switching the view from portrait to landscape results in an excess of grey space appearing below the report that wasn't there when the report initially loaded in portrait view. Switching back and forth between landscape and portrait does not restore the original/appropriate height inside the iframe it seems.
The report is loaded with the following configuration:
{
type: 'report',
embedUrl: 'https://app.powerbi.com/reportEmbed',
layoutType: models.LayoutType.Custom,
customLayout: {
displayOption: models.DisplayOption.FitToPage
}
...
}
I would have expected the report to maintain the amount of space in the iframe needed to display report content and not have excess grey space remain/present. This seems like something that is being handled inside reportEmbed.*.js. Any assistance would be greatly appreciated.
The scrollbar in the image gives a relative idea of how far down we are in the iframe.
UPDATE (19/07/18): This was tested on an iPhone running iOS 9.3.
FitToPage option maintains the proportions of the page, and might still have gray shoulders remaining for iframes that don't hold the same ratio for height & width.
however, recent feature allows you to make the gray shoulders disappear:
https://github.com/Microsoft/PowerBI-JavaScript/wiki/Transparent-Background

Are VCL ListViews ListBox DBGrids full touch aware?

Since we have tablets with Windows 10 I have decided to use again Delphi XE7 and VCL to develop for this multitouch devices.
I have found ListView, ListBox and DBGrid seem not have a standard behavior with pan and scroll (just PanUp & PanDown, ScrollUp ScrollDown). DBGrid does not support touching panning. ListBox, seem doesn't control inertial panning like TListview... and ListView react erratically, sometimes "loose" pannings moving scrollbar but not items list.
Have someone tested this controls on Windows 8.1 or Windows 10 using a multitouch tablet ?. Just load components with, let me say 100 items and try to have a simple vertical smooth scroll / pan using fingers.
All together is kind frustrating, and I cannot focus in develop application which is my task.
Question is: Which is the right component or way to use panning (at least vertical panning / Scrolling) with touch screens and working smooth and without problems ? I thought this components should react to standard actions (like PanUp or PanDown) without need to implement the Gesture Manager and control one by one each touch on screen. I would like to receive your kind feedback. Thank You
Conclusion: Many thanks to all who have helped with their comments. My own conclusion is Delphi is not ready to be used as a RAD for touching screens. The touching implementation is poor and need too much work for very standard using. Should not be necessary invent the wheel again for a very common and standard controls. Actually there are more mobile device users, than desktop users. Perhaps Embarcadero should decide to pay attention to this matter, and give well finished tools wich meet the OS touch and feel controls.
Let me add the same in FM using TGrid works fine.

Somethings wrong with GoogleMap SDK iOS

My app is using both UIkit and cocos2d. After using view with GoogleMap SDK and show cocos scene. xcode show this:
cocos2d: surface size: 0x0
Failed to make complete framebuffer object 0x8CDD
And the screen is black, and can do nothing except restart app.
I have searched so many website, so many people have same problem but no solution for that.
So is it impossible to use Google Map sdk with cocos2d? If not what can I do?
(Before using GoogleMapsdk I used MKMapview, it doesn't cause this problem but it's not as good as GoogleMap)
Google Maps uses OpenGL ES to render the map. Two OpenGL renderers can not be mixed, they both use their own GL context. Specifically on iOS there seems to be little support to run two GL views side by side (let alone on top of each other).
So no, for all intents and purposes mixing cocos2d and google maps on iOS is not possible.

How to get app to be in landscape orientation in cocos2d 2.0

(Sorry I can't include the images. I don't have a high enough rep so i just provided links to the images)
As the title says, I am having problems with my app in landscape mode. I want the whole app to be in landscape mode so I selected only Landscape Left and Landscape Right in the Target Summary. I also put this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
in my AppDelegate.m. I also went to my info.plist and put "Initial interface orientation to Landscape (left home button). However my orientation in the simulator and on the actual device are wrong. Here is a picture of what I have in my storyboard (what I want it to look like)
http://imageshack.us/photo/my-images/836/iphoneimage2.png/
But this is what it looks like in my simulator and on my device
http://imageshack.us/photo/my-images/440/iphoneimage.png/
Does anyone know how to fix this? Thanks
EDIT: If you are running Cocos2d 2.0 rc1 or rc0a, then the shouldAutorotateToInterfaceOrientation: method should be placed in the RootViewController.m file. If you are running Cocos2d 2.0, the the shouldAutorotateToInterfaceOrientation: should be placed in the AppDelegate.m file.
The method will already be in RootViewController.m if you used one of the templates in Cocos2d 2.0 rc1 or rc0a to create your app.
The method will already be in AppDelegate.m if you used Coco2d 2.0.
You just need to edit the method to only return the desired orientation you need.
Edit the method in your RootViewController.m or AppDelegate.m class, depending on which version of Cocos2d 2.0 you are using, to look like this to accommodate both landscape orientations:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}