summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/IntermediateFragment.java
blob: c88a29a28a0f5b7ec8485c4e1b8280d1ffb0111e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.mapbox.mapboxsdk.testapp.activity.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class IntermediateFragment extends Fragment{

  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    TextView textView = new TextView(inflater.getContext());
    textView.setText("Hello World");
    textView.setTextSize(24);
    textView.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
        ((MapFragmentActivity)getActivity()).replaceFragment(new SecondFragment());
      }
    });
    return textView;
  }
}