Back to project page zionhs.
The source code is released under:
GNU General Public License
If you think the Android project zionhs listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Zion High School Application for Android * Copyright (C) 2013 Youngbin Han<sukso96100@gmail.com> */* w w w. j av a 2s . c om*/ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.licubeclub.zionhs; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.widget.TextView; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; public class Doc_Copying extends ActionBarActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_docs); getSupportActionBar().setDisplayHomeAsUpEnabled(true); TextView helloTxt = (TextView)findViewById(R.id.doc); helloTxt.setText(readTxt()); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } private String readTxt(){ InputStream inputStream = getResources().openRawResource(R.raw.copying); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); int i; try { i = inputStream.read(); while (i != -1) { byteArrayOutputStream.write(i); i = inputStream.read(); } inputStream.close(); } catch (IOException e) { e.printStackTrace(); } return byteArrayOutputStream.toString(); } }