I'm using this example:
try {
AssetManager assetManager = getResources().getAssets();
InputStream inputStream = assetManager.open("nome-do-arquivo.txt");
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String linha;
while((linha = bufferedReader.readLine())!=null){
nome = linha;
id = bufferedReader.readLine() // Aqui é um tipo inteiro
}
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
No arquivo txt
is thus
fulano
R.drawble.image
I would like to make R.drawble.image
store in an integer type because I tried to convert from String
to int
but it did not work.