There is no method to automatically change your Android app’s container size for showing Google AdMob ads. While it does re-adjust itself whenever the orientation changes, it does not resize itself to the correct size.

Try changing your device’s orientation from portrait to landscape mode and you will see that the height is the same. The result is that the height of the ad container shown is too big just like when its orientation is in portrait mode.

The workaround to make the ad container resize correctly according to orientation change like the image below is to remove the ad container in your layout view and add it back.

ad_orientation

Say this is your code for adding the ad container view to your layout view.

Then place the method in the onConfigurationChanged().

Most people want to do everything possible to drive safely. There are times when safety is even more important than usual. During the holidays when traffic is at a year round high, on snowy winter roads and at night when it is difficult to see properly are all times when it is more difficult to drive safely. You will want to be particularly careful during these times and follow some additional safety tips.

Slowing down may not help you arrive at your destination on time but it can help prevent accidents when the roads are covered with ice, snow or rain. If you know that inclement weather is coming, try leaving home beforehand to reduce the amount of time spent on slick roads. Most experts recommend avoiding travel when there is ice present unless it is an absolute necessity. You may want to consider renting a hotel room near your place of employment if you live more than a few miles away and your workplace doesn’t have a weather policy in place to allow you to miss work as needed.

You should also slow down when you are driving at night. Some studies have shown the people tend to drive faster than usual when it is dark or foggy outside because it is difficult to register how fast you are going when you can’t spot landmarks along the road. You can also consider using special tools to assist you in driving safely after dark. For instance, rear view mirror dimmers work to reduce glare from traffic and allow you to see the road clearly. You can find auto dimming rear view mirrors online.

Allowing yourself more time can ensure you arrive at your destination without delay when there is a lot of traffic. You should note local events such as festivals or sports events to determine how much traffic will be on the road. The holidays are one time of year when it is common to be delayed by traffic. Leave home about a half-hour earlier than usual to keep frustration and rushing to a minimum. You can arrive on time and stress free when you plan ahead and follow some simple safety tips.

By default when you add items in Android’s action bar, the icon will not be shown if it will be shown as overflow.

To make sure an icon appears beside the menu item label like this:

android_menu_overflow

Add a sub menu tag within the item tag like this:

Since this menu item in the action bar is forced to become overflow permanently (appear as icon all the time), I extracted the PNG file ic_action_overflow from the Android menu icon pack and set it to this menu item.

This is it. The XML code above should display the way as the image posted above.

Related Posts Plugin for WordPress, Blogger...