Ionic - AdMob Pro Below Tab Bar - angularjs

I have followed the tutorial/installation guide set out on the ReadMe.md file and am trying to find a way to position the banner at the bottom of the view but on top of the tab bar which I currently have.
Currently the banner ads show below the tab bar (see image) but they should site on top of it and at the same time not overlap the content. Is there a setting I am missing here?
Code:
AdMob.createBanner( {
adId: admobid.banner,
position: AdMob.AD_POSITION.BOTTOM_CENTER,
isTesting: true, // TODO: remove this line when release
overlap: false,
offsetBottomBar: true,
offsetTopBar: false
} );

Related

Remove SonataAdmin logo

I am trying to remove SonataAdmin logo. I don't want any picture. Every param that I put in my .yml file I get a broken picture icon on my admin view.
I have checked the conifguration and there is no wirtten documentation of how to hide logo.
sonata_admin:
templates:
user_block: '#AdminTemplates/user_block.html.twig'
title: My App
title_logo: /bundles/sonataadmin/logo_title.png //-- this part
Put your logo file here
src/AppBundle/Resources/public/images/your_logo.png
install asset :
$ php bin/console assets:install
And I think you have just to delete the first slash / in the title_logo :
# app/config/config.yml
sonata_admin:
templates:
user_block: '#AdminTemplates/user_block.html.twig'
title: My App
title_logo: bundles/app/images/your_logo.png //-- this part
The point here is to make a transparent image , so you can't see the logo, otherwise , there is no way to do it .

Building timeline for video editor using React JS

Especially looking for an idea or way around to achieve this.
I am trying to build a video editor/mixture as in the above image using react js. This UI primarily targets to align different video/image media with timelines. As user drag video/image in any of the layer, it just needs to expand or shrink with time scale.
Three screens are for three different videos. A feature like a crop/split is not required. This UI collect information and send it to the server which will do the rest of the processing. Required contents are already on our servers.
Any solution/possible direction on collecting media information drag into layers with the time scale on the top ?. What are the best resources to achieve this UI using React JS?
You should be using timeline of vis.js with the following options :
var start = new Date(1970, 0, 1, 0, 0, 0, 0);
var end = new Date(1970, 00, 01, 0, 1, 0, 0);
var options = {
zoomKey: "ctrlKey",
horizontalScroll: true,
verticalScroll: true,
orientation: "top",
moveable: true,
zoomable : true,
editable: true,
min: start,
max: end,
start: start,
end: end,
zoomMax: 10000000,
zoomMin: 1000,
stack:false,
showCurrentTime: true,
multiselect: true,
multiselectPerGroup: true,
};
This will give you a multiline scrollable (both horizontal and vertical) sliding timeline which is the basis of a video editor.
I suggest your timeLine component to have a module and scale both provided by its father component. The nested divs have their own module length, but not scale, and the same happens with the timeLine component. So, you only talk about modules length. Then i.e. you set the equivalence 1 module = 50px
I hope this help you!

Calling setTitleTextAttributes on UIBarButtonItem does not have any impact on iOS 11

I am using an appearance proxy in didFinishLaunchingWithOptions to set UIBarButtonItem title font across the project like this:
UIBarButtonItem.appearance().setTitleTextAttributes([
NSAttributedStringKey.font: customFont
]
, for: .normal)
What I would like to do is to change this font based on user choice?
So upon the user choosing a font I store it in UserDefaults and I send a local notification to those view controllers I know have UIBarButtonItems and I reset each directly like this:
navigationItem.leftBarButtonItems?.forEach { $0.setTitleTextAttributes([NSAttributedStringKey.font: ...], for: .normal) }
navigationItem.rightBarButtonItems?.forEach { $0.setTitleTextAttributes([NSAttributedStringKey.font: ...], for: .normal) }
navigationItem.backBarButtonItem?.setTitleTextAttributes([NSAttributedStringKey.font: customFont], for: .normal)
This works as expected in iOS 10 but in iOS 11 it doesn't have an immediate impact on either left, right or back bar button items.
The back bar button item gets adjusted to the new font if a view controller is popped and then pushed again to the navigation stack - the bar button items don't change until the next app run.
I am naturally doing the same thing with navigation bar title so in the AppDelegate:
UINavigationBar.appearance().titleTextAttributes = [
NSAttributedStringKey.font: ...
]
if #available(iOS 11.0, *) {
UINavigationBar.appearance().largeTitleTextAttributes = [
NSAttributedStringKey.font : ...
]
}
And in each view controller I reset these values again and titles instantly change font.
I tried to set bar button items title text attributes to the new font in each control state, namely: [.normal, .highlighted, .disabled] with no luck.
I also tried to set navigationItem.leftBarButtonItem to a new instance of UIBarButonItem hoping this will have the new font but the button disappears completely :D
Last thing I tried was to call setNeedsDisplay and layoutIfNeeded on the navigation bar but still nothing happens.
A sample project of the case could be found here
Here's a super hacky mechanism to work around what appears to be an obvious bug (or undocumented optimization):
for controlState in [UIControlState.disabled, .highlighted, .normal] {
self.changeBarButtonFont(barButtonItem: self.updateButton, font: font, controlState: controlState)
self.changeBarButtonFont(barButtonItem: self.selectButton, font: font, controlState: controlState)
}
private func changeBarButtonFont(barButtonItem: UIBarButtonItem, font: UIFont, controlState: UIControlState) {
barButtonItem.title = barButtonItem.title! + " "
barButtonItem.setTitleTextAttributes([NSAttributedStringKey.font : font], for: controlState)
DispatchQueue.main.async
{
barButtonItem.title = barButtonItem.title?.trimmingCharacters(in: CharacterSet.whitespaces)
}
}
Note that this does not work 100% as rapid taps on the 'Change font' won't register. But perhaps you could work this out?

How to change Hugo's post image

I want to change hugo's post image.
+++
title = "how to read the book"
draft = false
date = "2017-01-25T21:39:26-06:00"
image = "book.jpg"
+++
Hello World. New Book Review.
I put book.jpg under mywebsite/static/images/ directory. But the post still using the default image.
Any suggestions?
I solved this issue by changing image = "book.jpg" to thumbnail = "images/book.jpg"
I followed the official guide from https://gohugo.io/overview/quickstart/ originally. It is very confusing.
If you're using front matter to configure your posts, follow these steps:
In your config.yaml file, make sure the cover parameters are set to not hide images
cover:
hidden: false # hide everywhere but not in structured data
hiddenInList: false # hide on list pages and home
hiddenInSingle: false # hide on single page
Add the image to the static folder (ex. meteor.png)
In your post's front matter, add the following lines to reference the image
---
title: "Impact Fanatics"
date: 2022-09-27T18:03:38-04:00
draft: false
relative: true
cover:
image: /meteor.png
---

Ext.js4 -- Adding a box to the top of a panel rather than to the bottom

I am using Ext.js 4. I have a panel which contains log messages returned from the server.
The following will append the most recent messages to the that panel:
// show log on the log panel
logPanel.add( { xtype: 'box', autoEl: { cn: theText } } );
I also add a separator bar between messages:
// add a separator bar
logPanel.add( { xtype: 'box', autoEl: { html: '<hr/>'} } );
I thought about clearing the panel before adding new messages, so only the most recent messages appear, and this works (when placed before the above):
// the following will remove prior log messages...
logPanel.removeAll();
But what I would really like to do is simply put the most recent messages BEFORE the previous messages (the default action of the add method is AFTER).
Any suggestions on how I could do that? Thanks in advance.
Use the insert method: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.container.AbstractContainer-method-insert

Resources