@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.context_menu_home: startActivity(Utils.createHomeIntent(this)); return true; default: return super.onOptionsItemSelected(item); } }
private String getRawResourceContent(int rawResourceId) { String content = ""; InputStream input = null; try { input = getResources().openRawResource(rawResourceId); content = Utils.copyStreamToString(input); } catch (IOException e) { Log.e(IMongolduuConstants.LOG_TAG, "exception", e); } finally { if (input != null) { try { input.close(); } catch (IOException e) { } } } return content; }