如之前的篇章一样,先上截图
Read Asset 如同标题一样,本Activity主要是能够将要读取的文件放到assets目录下,再通过代码去读取显示到界面。
也就是常说的读取assets资源文件
下面看下布局和代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<TextView android:id="@+id/text"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textStyle="norma