问题
I have successfully integrated the AdMob via https://github.com/aliokan/cordova-plugin-admob in my Sencha Touch application and it is showing also in Android device. But at bottom it is overlapping with the app. And some portion of app is pushed on upper side means it is not visible. But on orientation change everything is rendering just perfect. What should i do so that without changing the orientation it renders correctly. Any suggestion will be highly appreciated.
EDIT: Here is my view where i am initializing the admob.
Ext.define("MyApp.view.Home", {
extend: 'Ext.Container',
xtype:'home',
config: {
cls:'base',
layout : 'card',
items: [{
docked:'bottom',
cls:'home',
name : 'tabBar',
items:[{
html: ['<div class="home-tab"><div class="left-tab"></div>',
'<div class="tab-container">',
'<div class="tab dash dashboard-tab activeClass" rel="dashboard"></div>',
'<div class="tab test test-drive-tab" rel="test"></div>',
'<div class="tab add" rel="add"></div>',
'<div class="tab garage garage-tab" rel="garage"></div>',
// '<div class="tab garage ss-symbolicons-block ss-home" rel="garage"></div>',
'<div class="tab engine engine-tab" rel="engine"></div></div>',
'<div class="right-tab"></div></div><div class="tab-background"></div> '].join('')
}]
}, {
xtype:'dashboard',
layout : 'card'
}, {
xtype:'testtab',
layout : 'card'
}, {
xtype:'addidea'
}, {
xtype:'garage',
layout : 'card'
}, {
xtype:'engine'
}],
listeners: {
painted: function() {
setTimeout(function() {
var success = function() {
admob.requestAd({
'isTesting': false,
'extras': {
'color_bg': 'AAAAFF',
'color_bg_top': 'FFFFFF',
'color_border': 'FFFFFF',
'color_link': '000080',
'color_text': '808080',
'color_url': '008000'
}
},
successCallback,
failureCallback
);
};
var error = function(message) {
alert('Error');
};
var successCallback = function(el) {
alert(el);
// alert('successCallback');
};
var failureCallback = function() {
alert('failureCallback');
};
var options = {
'publisherId': 'ca-app-pub-5476830338141***/9502253***',
'adSize': admob.AD_SIZE.BANNER
}
admob.createBannerView(options, success, error);
}, 2000);
}
}
}
});
Here the tab bar is simple html and css design, not the default sencha tabbar.
来源:https://stackoverflow.com/questions/23476298/admob-banner-is-overlapping-the-bottom-of-the-app-view-android