Android and the layouts

Asked

Viewed 65 times

0

I started programming for android a little while ago but I have some doubts about the layouts . there is how I make a canvas without layout and I tell where each object will be drawn?

  • Power can but is not recommended...

  • Everything that is done in xml can be done in java. Gives is more work/code.

  • If you were going to develop an android game it would not be possible to do with the layouts(relative, horizontal, vertical..) @Wakim

1 answer

1

Do you want to know if you can make a screen without at least the layout XML? if that is the answer NO!

You can create an empty XML and add them via code, but at least one layout . xml should exist.

UPDATE~

Paul, it is possible yes, just call the setContentView passing a Any Viewgroup and go adding the Widgets and View’s dynamically. - Wakim 1 min ago

Actually, it’s possible, but I don’t think it’s a good idea.

  • Paul, it is possible yes, just call the setContentView passing a ViewGroup any and go adding the Widgets and View’s dynamically.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.