Methods Summary |
---|
public void | loadModel()
Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
intent.setClassName("com.android.modelviewer",
"com.android.modelviewer.A3DSelector");
startActivityForResult(intent, FIND_A3D_MODEL);
|
public void | onActivityResult(int requestCode, int resultCode, android.content.Intent data)
if (resultCode == RESULT_OK) {
if (requestCode == FIND_A3D_MODEL) {
Uri selectedImageUri = data.getData();
Log.e("Selected Path: ", selectedImageUri.getPath());
mView.loadA3DFile(selectedImageUri.getPath());
}
}
|
public void | onCreate(android.os.Bundle icicle)
super.onCreate(icicle);
// Create our Preview view and set it as the content of our
// Activity
mView = new SimpleModelView(this);
setContentView(mView);
|
public boolean | onCreateOptionsMenu(android.view.Menu menu)
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.loader_menu, menu);
return true;
|
public boolean | onOptionsItemSelected(android.view.MenuItem item)
// Handle item selection
switch (item.getItemId()) {
case R.id.load_model:
loadModel();
return true;
case R.id.display_options:
return true;
case R.id.sensor:
mView.toggleSensor();
return true;
default:
return super.onOptionsItemSelected(item);
}
|
protected void | onPause()
// Ideally a game should implement onResume() and onPause()
// to take appropriate action when the activity looses focus
super.onPause();
mView.pause();
|
protected void | onResume()
// Ideally a game should implement onResume() and onPause()
// to take appropriate action when the activity looses focus
super.onResume();
mView.resume();
|