标签:
setContentView(R.layout.activity_main); tv = (TextView) findViewById(R.id.tv); // 声明资源变量 Resources res = getResources(); //获得输入流 InputStream in = res.openRawResource(R.raw.text); Scanner sc = new Scanner(in); while(sc.hasNext()){ tv.append(sc.next()); } }
标签:
原文地址:http://www.cnblogs.com/84126858jmz/p/4911638.html