title: How to open/display documents(.pdf, .doc) without external app?
body: <p>I want to create a program, that open documents without external app. I need this, because i want to scroll the document with the phones orientation(Pitch and Roll). I create a button on the bottom of the screen, and when i hold down the button, i can scroll the document too. If i release the button, i can't scroll it. So, if i open the document with external app, my button disappears, and the sensorManager works neither.</p>
  
  <p>Have someone any idea to solve this problem. Or have someone any idea, how to scroll the document, opened in an external app, with my phones orientation?</p>
  
  <p>(Sorry for my English)</p>
  
  <p>This is my manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.orientationscrolling"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="17" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.orientationscrolling.MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>This is my Layout:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;WebView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/webView1"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="bottom"
      android:orientation="vertical" &gt;
  
  &lt;Button 
     android:id="@+id/mybutt"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:textSize="25sp"
     android:text="Scroll!!"
     android:layout_gravity="right"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is my Code:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.activity_main);
  
      setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
      button = (Button) findViewById( R.id.mybutt );
  
      String pdf = "http://www.pc-hardware.hu/PDF/konfig.pdf";
      String doc="&lt;iframe src='http://docs.google.com/gview?embedded=true&amp;url=http://www.pc-hardware.hu/PDF/konfig.pdf' width='100%' height='100%' style='border: none;'&gt;&lt;/iframe&gt;";
      webView = (WebView) findViewById(R.id.webView1);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.getSettings().setPluginsEnabled(true);
      webView.getSettings().setAllowFileAccess(true);
      webView.loadData( doc , "text/html", "UTF-8");
  }
  </code></pre>