diff --git a/src/com/beloko/touchcontrols/Settings.java b/src/com/beloko/touchcontrols/Settings.java index 68f55469..0514afe7 100644 --- a/src/com/beloko/touchcontrols/Settings.java +++ b/src/com/beloko/touchcontrols/Settings.java @@ -114,7 +114,7 @@ public class Settings { if (!d.exists()) d.mkdirs(); else - return; + return; // Note: if you move it back to /files, disable this as it may exist AssetManager assetManager = ctx.getAssets(); String[] files = null; diff --git a/src/com/beloko/touchcontrols/TouchControlsEditing.java b/src/com/beloko/touchcontrols/TouchControlsEditing.java index 0c19bce5..19acbf06 100644 --- a/src/com/beloko/touchcontrols/TouchControlsEditing.java +++ b/src/com/beloko/touchcontrols/TouchControlsEditing.java @@ -4,6 +4,7 @@ import in.celest.xash3d.hl.R; import android.app.Activity; import android.app.Dialog; import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -131,11 +132,16 @@ public class TouchControlsEditing { } }); - String png = activity.getFilesDir() + "/" + ci.image + ".png"; - Log.d(TAG,"png = " + png); - BitmapDrawable bm = new BitmapDrawable(png); - - image.setImageDrawable(bm); + //String png = activity.getFilesDir() + "/" + ci.image + ".png"; + //Log.d(TAG,"png = " + png); + //BitmapDrawable bm = new BitmapDrawable(png); + try + { + image.setImageDrawable(Drawable.createFromStream(context.getAssets().open(ci.image + ".png"), null)); + } + catch(Exception e) + { + } return convertView; }