Exemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maps);

    SpannableString s = new SpannableString("Pregled svih ruta");
    s.setSpan(
        new TypefaceSpan(this, "Choplin.otf"), 0, s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

    mToolbar = (Toolbar) findViewById(R.id.toolbar);

    setSupportActionBar(mToolbar);
    getSupportActionBar().setDisplayShowHomeEnabled(true);
    getSupportActionBar().setTitle(s);

    mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);

    LinearLayoutManager llm = new LinearLayoutManager(this);
    mRecyclerView.setLayoutManager(llm);

    NavigationDrawerFragment drawerFragment =
        (NavigationDrawerFragment)
            getSupportFragmentManager().findFragmentById(R.id.fragment_navigation_drawer);
    drawerFragment.setUp(
        R.id.fragment_navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout), mToolbar);

    initializeData();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_full_screen_map);

    SpannableString s = new SpannableString("Pregled obliznjih ruta");
    s.setSpan(
        new TypefaceSpan(this, "Choplin.otf"), 0, s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

    doubleClickIndicator = false;

    mMarkers = new ArrayList<>();
    buildGoogleApiClient();

    SupportMapFragment mapFragment =
        (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);

    mGoogleMap = mapFragment.getMap();

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayShowHomeEnabled(true);
    getSupportActionBar().setTitle(s);

    NavigationDrawerFragment drawerFragment =
        (NavigationDrawerFragment)
            getSupportFragmentManager().findFragmentById(R.id.fragment_navigation_drawer);
    drawerFragment.setUp(
        R.id.fragment_navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout), toolbar);
  }