I want to create images which will go down from the upper part of the screen.
For up to today I have this:
ImageView mario = (ImageView) findViewById
You can create a layout with something like
View view = (View) findViewById(R.layout.current_layout); //the layout you set in `setContentView()`
LinearLayout picLL = new LinearLayout(CurrentActivity.this);
picLL.layout(0, 0, 100, 0);
picLL.setLayoutParams(new LayoutParams(1000, 60));
picLL.setOrientation(LinearLayout.HORIZONTAL);
((ViewGroup) view).addView(picLL);
What parameters you pass in layout()
are obviously going to depend on what you want. Then you can create separate Views
to add to the Layout
you just created. But I highly advise reading through the docs to understand what all can be done here.
ViewGroup
View
Edit
ImageView myImage = new ImageView(this);
picLL.addView(myImage);
//set attributes for myImage;