quinta-feira, 9 de abril de 2015

GoogleMaps View Android, segurando carregamento

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_frm_estabelecimentos);
        MostrarCarregando(true);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                if (!isFinishing()) {
                    FragmentManager fm = getFragmentManager();
                    MapaFragment mapFragment = new MapaFragment();
                    fm.beginTransaction()
                            .replace(R.id.mapContainer, mapFragment, "mapFragment").commit();
                }
            }
        }, 1000);
        Carregando();
    }
Postar um comentário