How can you draw a dynamic square type in View Example: 
I have a view on activating, I get it
View myview = (View)findViewById(R.id.myview); Next, you need to draw such squares as in the screenshot and write to this view and not set setContentView for the entire activation. Prompt articles or classes that will help me in this.
Began to understand a little:
public class OverlayView extends View { public OverlayView(Context context, AttributeSet attributeSet) { super(context, attributeSet); setWillNotDraw(false); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); if(this.Hall == null) return; Paint paint = new Paint(); paint.setColor(Color.YELLOW); canvas.drawRect(10, 10, 50, 50, paint); paint.setColor(Color.BLACK); canvas.drawRect(10+50+10, 10, 50, 50, paint); } } <applicationcinema.com.cinema.UI.OverlayView android:id="@+id/hall_plan_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:background="@color/standard_background" /> For some reason, the second black square is not drawn, it seems that the function drawRect can only be called once.
RecyclerViewwith theGridLayoutManager. - post_zeewRecyclerViewthan to draw by hand. - post_zeewRecyclerViewis not the same asGridView. - post_zeew