0

I have two folders (each of which contains 50 text files). I put a button which will call the particular text file which will be called when the button is clicked. Sorry incase the way I am asking is not proper. Please help me to get the solution

MainActiviy

        @Override
        public void on Click(View view) {
            String text="";

            Buffered Reader b r = null;
            File Reader f r = null;


            try {
                f r = new File Reader("assets\\Job\\Job1.txt");
                b r = new Buffered Reader(f r);
                String line;
                in t count=0;
                while ((line = b r. read Line()) != null) {
                    count++;
                    if(count==19) {
                        System .out. print ln(line);
                    }
                }
            } catch (IO Exception e) {
                e. print Stack Trace();
            } finally {
                try {
                    if (b r ! = null)
                        b r . close();
                    if (f r != null)
                        f r. close();
                } catch (IO Exception ex) {
                    ex. print Stack Trace();
                }
            }

            t v_ new. set Text(text);
        }
    });
}
}
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

0 Answers0