summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/AndroidManifest.xml2
-rw-r--r--android/res/values/styles.xml5
-rw-r--r--android/src/com/artifex/mupdfdemo/MuPDFActivity.java2
-rw-r--r--android/src/com/artifex/mupdfdemo/PageView.java6
4 files changed, 11 insertions, 4 deletions
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 2bc2217f..f91ccd83 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -28,7 +28,7 @@
</activity>
<activity
android:name="MuPDFActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+ android:theme="@style/AppBaseTheme"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
diff --git a/android/res/values/styles.xml b/android/res/values/styles.xml
new file mode 100644
index 00000000..ade851dd
--- /dev/null
+++ b/android/res/values/styles.xml
@@ -0,0 +1,5 @@
+<resources>
+ <style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen">
+ <item name="android:windowBackground">@drawable/tiled_background</item>
+ </style>
+</resources>
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
index 5fea13e3..3133fc17 100644
--- a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
+++ b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
@@ -578,8 +578,6 @@ public class MuPDFActivity extends Activity
RelativeLayout layout = new RelativeLayout(this);
layout.addView(mDocView);
layout.addView(mButtonsView);
- layout.setBackgroundResource(R.drawable.tiled_background);
- //layout.setBackgroundResource(R.color.canvas);
setContentView(layout);
}
diff --git a/android/src/com/artifex/mupdfdemo/PageView.java b/android/src/com/artifex/mupdfdemo/PageView.java
index 756ee2f5..14d6b729 100644
--- a/android/src/com/artifex/mupdfdemo/PageView.java
+++ b/android/src/com/artifex/mupdfdemo/PageView.java
@@ -6,6 +6,7 @@ import java.util.Iterator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
@@ -219,6 +220,8 @@ public abstract class PageView extends ViewGroup {
mBusyIndicator.setBackgroundResource(R.drawable.busy);
addView(mBusyIndicator);
}
+
+ setBackgroundColor(BACKGROUND_COLOR);
}
public void setPage(int page, PointF size) {
@@ -270,6 +273,7 @@ public abstract class PageView extends ViewGroup {
}
protected void onPreExecute() {
+ setBackgroundColor(BACKGROUND_COLOR);
mEntire.setImageBitmap(null);
mEntireBmh.setBm(null);
@@ -293,7 +297,7 @@ public abstract class PageView extends ViewGroup {
mBusyIndicator = null;
mEntire.setImageBitmap(bm);
mEntireBmh.setBm(bm);
- invalidate();
+ setBackgroundColor(Color.TRANSPARENT);
}
};