コード例 #1
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Hide the window title.
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.simple_camera_with_distance_controlers);
    mSeekBarMax = (SeekBar) findViewById(R.id.seekBarMax);
    mSeekBarMin = (SeekBar) findViewById(R.id.seekBarMin);
    mSeekBarMax.setOnSeekBarChangeListener(this);
    mSeekBarMin.setOnSeekBarChangeListener(this);
    mSeekBarMax.setMax(100);
    mSeekBarMin.setMax(100);

    mBeyondarFragment =
        (BeyondarFragmentSupport)
            getSupportFragmentManager().findFragmentById(R.id.beyondarFragment);

    // We create the world and fill it ...
    mWorld = CustomWorldHelper.generateObjects(this);
    // .. and send it to the fragment
    mBeyondarFragment.setWorld(mWorld);

    // We also can see the Frames per seconds
    mBeyondarFragment.showFPS(true);
  }
コード例 #2
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Hide the window title.
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    loadViewFromXML();

    // We create the world and fill it
    mWorld = CustomWorldHelper.generateObjects(this);

    mBeyondarFragment.setWorld(mWorld);
    mBeyondarFragment.showFPS(true);

    // set listener for the geoObjects
    mBeyondarFragment.setOnTouchBeyondarViewListener(this);
    mBeyondarFragment.setOnClickBeyondarObjectListener(this);
  }