Native AdExchange fluid ads are cut in width - google-ad-manager

My native Fluid ads are cut in width. They are only a few px. Google Support says it's the fault of the fluid size getting the width setting from the parent DIV, and I'm not passing any there.
How to correctly implement GAM on the website? Set the DIV width to 100% on mobile? Won't it break other ads? What to do with the desktop so that native fluid ads are displayed there correctly?

Related

Is there a way to limit the max size of a chart in chartjs whilst still maintaining responsiveness?

I made a responsive doughnut in chartjs. On mobile devices the size fills out the screen nicely and is as I'd like it but when I switch to desktop it also fills out the entire screen and is too big for my liking. Is there a way to set the relative size to for example, half screen when viewing on desktop and then reverting to full-screen if being viewed on mobile?
I tried the different settings on the chartjs site but can't find anything helpful.

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

How to make google chart API responsive?

I am creating two charts Line Chart and Donut Chart on same HTML Page using Google JS API. But these charts are not responsive. How can I make those charts as responsive?
The Google Charts API was probably not designed with responsiveness in mind, specifically. The default size of the chart is to fill the element it's being rendered into, so you can just use CSS and Media Queries like you would normally do to make a responsive design.
The only real problem is that once the chart is drawn, it doesn't change it's size in a desktop window resize-type scenario. In Angular Google Chart we listen for the window's resize event and redraw the chart.
I've seen some of the resize strategy paired with a bit of JavaScript to keep the chart the same aspect ratio no matter how wide it is.
Anything more specific will need a more detailed question. I am intentionally not including any code for this answer, because whatever I write will probably be wrong for your situation.

Famo.us and landscape orientation

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.

Display image without gradient on static card in Glass GDK

When I make a static card with a FULL image layout, it looks like there's a shading gradient that fades from dark to clear from bottom to top. This is great for cards that have text, but if I don't have text, I'd like to see the image without modification.
Card card = new Card(this);
card.setImageLayout(Card.ImageLayout.FULL);
card.addImage(R.drawable.full_wiring);
mViews.add(card.toView());
I'm interested if there's a way to specify this with Cards. I know I could make a regular android view as an alternative.
The latest update seems to have killed static cards. However the XE16 GDK has the new authentication features (https://developers.google.com/glass/develop/gdk/authentication) these will let you put a static card in via the Mirror api. These can have HTML and css elements to do the gradients or other items as you see fit.