5 package com.introlab.rtabmap;
7 import java.io.BufferedReader;
8 import java.io.IOException;
9 import java.io.InputStream;
10 import java.io.InputStreamReader;
12 import android.app.Dialog;
13 import android.content.Context;
14 import android.graphics.Color;
15 import android.os.Bundle;
16 import android.text.Html;
17 import android.text.method.LinkMovementMethod;
18 import android.text.util.Linkify;
19 import android.widget.TextView;
34 public void onCreate(Bundle savedInstanceState) {
35 setContentView(
R.layout.about);
36 TextView tv = (TextView)findViewById(
R.id.info_text);
38 tv.setMovementMethod(LinkMovementMethod.getInstance());
39 tv.setLinkTextColor(
Color.WHITE);
40 Linkify.addLinks(tv, Linkify.ALL);
41 tv.append(Html.fromHtml(
"<b><a href=http://introlab.github.io/rtabmap/index.html#privacy-policy>Privacy Policy</a></b>"));
45 InputStream inputStream =
mContext.getResources().openRawResource(
id);
46 InputStreamReader in =
new InputStreamReader(inputStream);
47 BufferedReader buf =
new BufferedReader(in);
49 StringBuilder
text =
new StringBuilder();
51 while (( line = buf.readLine()) !=
null)
text.append(line);
52 }
catch (IOException
e) {
55 return text.toString();