java: get image from resources

This commit is contained in:
rafal1137 2020-06-23 18:09:32 +02:00
parent 85c6c58f36
commit 9998d3f61d
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
// This needs some refactoring
final ImageButton buttonPopUpMenu = new ImageButton(getApplicationContext());
buttonPopUpMenu.setImageBitmap(getBitmapFromAsset("btn_menu.png"));
buttonPopUpMenu.setImageResource(R.drawable.ic_one_line);
buttonPopUpMenu.setBackgroundResource(0);
final ImageButton btn2 = new ImageButton(getApplicationContext());

View file

@ -121,7 +121,7 @@ public class ETLMain extends Activity {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
ImageView imageView = new ImageView(this);
imageView.setBackground(getSplashScreenFromAsset("etl_splashscreen.png"));
imageView.setBackgroundResource(R.drawable.ic_horizontal_black);
LinearLayout etl_Layout = new LinearLayout(this);