Back to project page FxExplorer.
The source code is released under:
Apache License
If you think the Android project FxExplorer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package info.breezes.fx.viewer; // w ww . j a v a 2s . com import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.view.WindowManager; import info.breezes.toolkit.ui.Toast; public class MainActivity extends ActionBarActivity { private BigImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//??? setContentView(R.layout.activity_iv_main); imageView = (BigImageView) findViewById(R.id.imageView); if (Intent.ACTION_VIEW.equals(getIntent().getAction())) { Uri uri = getIntent().getData(); imageView.setResource(uri.getPath()); Toast.showText(this, uri.toString()); } } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }