mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 06:32:10 +08:00
Fix icons in TouchControlsEditing
This commit is contained in:
@@ -114,7 +114,7 @@ public class Settings {
|
||||
if (!d.exists())
|
||||
d.mkdirs();
|
||||
else
|
||||
return;
|
||||
return; // Note: if you move it back to <datadir>/files, disable this as it may exist
|
||||
|
||||
AssetManager assetManager = ctx.getAssets();
|
||||
String[] files = null;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user