سلام
example :
https://github.com/PareshMayani/Android-ReadFileAssets
کسی بلد باشه جواب میده دوست عزیز.
example :
https://github.com/PareshMayani/Android-ReadFileAssets
کد پیاچپی:
InputStream input;
try {
input = assetManager.open("helloworld.txt"); //load the txt file from Assets
int size = input.available();
byte buffer = new byte;
input.read(buffer);
input.close();
// byte buffer into a string
String text = new String(buffer);
txtContent.setText(text);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
کسی بلد باشه جواب میده دوست عزیز.