I just added an onCreateOptionsMenu to make an Action Bar for my app. The action bar is working, however the map fragment doesn't fully load. Whereas before it did so. It shows just grey where the map should be. Although the fragment is clearly there, ebcause of the zoom and location icons.
public class MainActivity extends Activity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu items for use in the action bar
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_activity_actions, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Get a handle to the xml Map Fragment
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(
R.id.map)).getMap();
...
Here is the xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
logcat
08-27 21:49:38.524: W/GA-SERVICE(1368): Thread[Thread-1969,5,main]: Exception sending hit: HttpHostConnectException
08-27 21:49:38.524: W/GA-SERVICE(1368): Thread[Thread-1969,5,main]: Connection to https://ssl.google-analytics.com refused
08-27 21:49:38.524: W/GA-SERVICE(1368): Thread[Thread-1969,5,main]: Empty hitIds passed to deleteHits.
08-27 21:49:39.625: D/ActivityThread(29611): handleBindApplication:com.google.android.gms.maps
08-27 21:49:39.625: D/ActivityThread(29611): setTargetHeapUtilization:0.75
08-27 21:49:39.625: D/ActivityThread(29611): setTargetHeapMinFree:2097152
08-27 21:49:39.645: I/MultiDex(29611): install
08-27 21:49:39.645: I/MultiDex(29611): MultiDexExtractor.load(/data/app/com.google.android.gms-2.apk, false)
08-27 21:49:39.655: I/MultiDex(29611): loading existing secondary dex files
08-27 21:49:39.655: I/MultiDex(29611): load found 1 secondary dex files
08-27 21:49:39.655: I/MultiDex(29611): install done
08-27 21:49:39.675: I/ProviderInstaller(29611): Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'