物事は単純ですが、想定どおりに機能しません。
生のリソースとしてテキストファイルを追加しました。テキストファイルには、次のようなテキストが含まれています。
b)該当する法律が本ソフトウェアに関する保証を要求する場合、かかる保証はすべて、配信日から最長(90)日間に限定されます。
(c)仮想オリエンテーリングから提供される口頭または書面による情報やアドバイスはありません。そのディーラー、ディストリビューター、代理店、または従業員は、保証を作成するものではなく、ここに提供されている保証の範囲を拡大するものではありません。
(d)(米国のみ)一部の州では黙示の保証の除外が許可されていないため、上記の除外が適用されない場合があります。この保証は、お客様に特定の法的権利を付与するものであり、州によって異なる他の法的権利を有する場合もあります。
画面には次のようなレイアウトがあります。
<LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
                     android:layout_width="fill_parent" 
                     android:layout_height="wrap_content" 
                     android:gravity="center" 
                     android:layout_weight="1.0"
                     android:layout_below="@+id/logoLayout"
                     android:background="@drawable/list_background"> 
            <ScrollView android:layout_width="fill_parent"
                        android:layout_height="fill_parent">
                    <TextView  android:id="@+id/txtRawResource" 
                               android:layout_width="fill_parent" 
                               android:layout_height="fill_parent"
                               android:padding="3dip"/>
            </ScrollView>  
    </LinearLayout>
未加工リソースを読み取るコードは次のとおりです。
TextView txtRawResource= (TextView)findViewById(R.id.txtRawResource);
txtDisclaimer.setText(Utils.readRawTextFile(ctx, R.raw.rawtextsample);
public static String readRawTextFile(Context ctx, int resId)
{
    InputStream inputStream = ctx.getResources().openRawResource(resId);
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    int i;
    try {
        i = inputStream.read();
        while (i != -1)
        {
            byteArrayOutputStream.write(i);
            i = inputStream.read();
        }
        inputStream.close();
    } catch (IOException e) {
        return null;
    }
    return byteArrayOutputStream.toString();
}
テキストは表示されますが、各行の後に奇妙な文字が表示されます[]どうすればその文字を削除できますか?ニューラインだと思います。
ワーキングソリューション
public static String readRawTextFile(Context ctx, int resId)
{
    InputStream inputStream = ctx.getResources().openRawResource(resId);
    InputStreamReader inputreader = new InputStreamReader(inputStream);
    BufferedReader buffreader = new BufferedReader(inputreader);
    String line;
    StringBuilder text = new StringBuilder();
    try {
        while (( line = buffreader.readLine()) != null) {
            text.append(line);
            text.append('\n');
        }
    } catch (IOException e) {
        return null;
    }
    return text.toString();
}