I have a word document that I would like to have viewed as an image in order to zoom and scroll. How would I go about doing this, or if this is a dumb and complicated procedure, what is the best way of going about displaying large amounts of text to be scrollable and zoomable. The text is going to be primarily math equations.
Thank you!
My problem is that it opens a browser and then said the file was not found. /mnt/sdcard/CheetSheetTest1Alg.html(No such file or directory)
import java.io.File;
import android.app.Activity;
import android.content.Intent;
import anrdoid.net.Uri;
import android.os.Bundle;
import android.os.Environment;
public class CheatMathActivity extends Activity {
public void onCreate(Bundle savedInstanceState){
super,onCreate(savedInstanceState);
setContentView(R.layout.main);
File file = new File(Environment.getExternalStorageDirectory(), "CheetSheetTest1Alg.html:);
Uri uri = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW).setData(uri);
intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
startActivity(intent);
}
}
Convert the Word document to an HTML file. This can be done by choosing the HTML type in the “Save as” dialog in MS Word.
Then you can either display it using the web browser or using a WebView inside your app. The default Android web browser already supports pinch zoom and scroll.
To open the HTML file on your SDCard using the Android web browser from your app, use the following code: