public class MainActivity extends ActionBarActivity {
TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView) findViewById(R.id.textView);
try {
InputStream inputStream = getResources().getAssets().open("myfile.txt");
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
char buffer[] = new char[inputStream.available()];
inputStreamReader.read(buffer);
inputStreamReader.close();
inputStream.close();
String str = new String(buffer);
textView.setText(str);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}