java: remove absolete functions for getting images from assets dir

This commit is contained in:
rafal1137 2020-06-23 18:12:40 +02:00
parent 9998d3f61d
commit 7e9d54f2db
2 changed files with 0 additions and 38 deletions

View File

@ -328,24 +328,6 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
return (int) (px / Resources.getSystem().getDisplayMetrics().density);
}
/**
* Get an image stored from Asset Dir of an App
* @param strName name of the image to get
* @return "resized" image
*/
private Bitmap getBitmapFromAsset(String strName) {
AssetManager assetManager = getAssets();
InputStream istr = null;
try {
istr = assetManager.open(strName);
} catch (IOException e) {
e.printStackTrace();
}
Bitmap bitmap = BitmapFactory.decodeStream(istr);
Bitmap resized = Bitmap.createScaledBitmap(bitmap, 80, 80, true);
return resized;
}
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

View File

@ -30,26 +30,6 @@ import cz.msebera.android.httpclient.Header;
public class ETLMain extends Activity {
/**
* Get an splash screen image from Asset Dir of an App
* @param strName name of the splash screen image
* @return image
*/
private Drawable getSplashScreenFromAsset(String strName) {
AssetManager assetManager = getAssets();
InputStream istr = null;
try {
istr = assetManager.open(strName);
} catch (IOException e) {
e.printStackTrace();
}
// It somehow looks ugly and expensive, find a better solution
Bitmap bitmap = BitmapFactory.decodeStream(istr);
Drawable etl_drawable = new BitmapDrawable(getResources(), bitmap);
return etl_drawable;
}
/**
* Copy InputStream to a File.
* @param in inputstream to be saved