Fixed issue with the bitmap skin
This commit is contained in:
parent
4365c9b74b
commit
332888b8c5
2 changed files with 12 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.ab.x48" android:installLocation="auto" android:versionCode="52" android:versionName="1.52">
|
||||
package="org.ab.x48" android:installLocation="auto" android:versionCode="53" android:versionName="1.53">
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name">
|
||||
<activity android:name=".X48"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -368,6 +368,16 @@ public class HPView extends SurfaceView implements SurfaceHolder.Callback, Runna
|
|||
if (c != null) {
|
||||
|
||||
if (backBuffer == null) {
|
||||
|
||||
Typeface regularBold = Typeface.createFromAsset(x48.getAssets(), "ArchivoNarrow-Bold.ttf");
|
||||
boolean antialias = true;
|
||||
|
||||
systemOptionsPaint = new Paint();
|
||||
systemOptionsPaint.setTypeface(regularBold);
|
||||
systemOptionsPaint.setAntiAlias(antialias);
|
||||
systemOptionsPaint.setTextSize((int) (12f * scale));
|
||||
systemOptionsPaint.setColor(Color.BLACK);
|
||||
|
||||
if (x48.isBitmapSkin()) {
|
||||
BitmapFactory.Options opts = new BitmapFactory.Options();
|
||||
opts.inScaled = false;
|
||||
|
@ -488,7 +498,6 @@ public class HPView extends SurfaceView implements SurfaceHolder.Callback, Runna
|
|||
|
||||
Typeface asana = Typeface.createFromAsset(x48.getAssets(), "Asana-Math.ttf");
|
||||
//asana = Typeface.create(asana, Typeface.BOLD);
|
||||
Typeface regularBold = Typeface.createFromAsset(x48.getAssets(), "ArchivoNarrow-Bold.ttf");
|
||||
|
||||
int regularbuttonTextHeaderSizeDpi = (int) (11f * scale);
|
||||
int regularbuttonTextSizeDpi = (int) (17f * scale);
|
||||
|
@ -496,8 +505,6 @@ public class HPView extends SurfaceView implements SurfaceHolder.Callback, Runna
|
|||
int asanabuttonTextHeaderSizeDpi = (int) (15f * scale);
|
||||
int asanabuttonTextSizeDpi = (int) (21f * scale );
|
||||
|
||||
boolean antialias = true;
|
||||
|
||||
asanaHeadGreenPaint = new Paint();
|
||||
asanaHeadGreenPaint.setTypeface(asana);
|
||||
asanaHeadGreenPaint.setAntiAlias(antialias);
|
||||
|
@ -522,12 +529,6 @@ public class HPView extends SurfaceView implements SurfaceHolder.Callback, Runna
|
|||
asanaFootWhitePaint.setTextSize(asanabuttonTextHeaderSizeDpi);
|
||||
asanaFootWhitePaint.setColor(Color.WHITE);
|
||||
|
||||
systemOptionsPaint = new Paint();
|
||||
systemOptionsPaint.setTypeface(regularBold);
|
||||
systemOptionsPaint.setAntiAlias(antialias);
|
||||
systemOptionsPaint.setTextSize((int) (12f * scale));
|
||||
systemOptionsPaint.setColor(Color.BLACK);
|
||||
|
||||
regularHeadGreenPaint = new Paint();
|
||||
regularHeadGreenPaint.setTypeface(regularBold);
|
||||
regularHeadGreenPaint.setAntiAlias(antialias);
|
||||
|
@ -918,9 +919,7 @@ public class HPView extends SurfaceView implements SurfaceHolder.Callback, Runna
|
|||
|
||||
|
||||
if (systemOptionDisplayed) {
|
||||
// context.getString(R.string.show_menu) returns null on certains devices
|
||||
// probably some resources are not yet loaded at this stage? for the time being... :
|
||||
c.drawText("Touch the screen to show system options", systemOptions_x, systemOptions_y, systemOptionsPaint);
|
||||
c.drawText(x48.getString(R.string.show_menu), systemOptions_x, systemOptions_y, systemOptionsPaint);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue