O'Reilly logo

Hello, Android, 4th Edition by Ed Burnette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Super-Size Me

In this chapter, we’ve added a few more dimensions and colors. Let’s define them now so we can get rid of all those errors. First, the dimensions:

ticTacToev2/src/main/res/values/dimens.xml
 
<dimen​ name=​"activity_horizontal_margin"​​>​8dp​</dimen>
 
<dimen​ name=​"activity_vertical_margin"​​>​8dp​</dimen>
 
<dimen​ name=​"tile_size"​​>​30dp​</dimen>
 
<dimen​ name=​"tile_margin"​​>​0dp​</dimen>
 
<dimen​ name=​"tile_padding"​​>​3dp​</dimen>
 
<dimen​ name=​"control_padding"​​>​20dp​</dimen>
 
<dimen​ name=​"small_board_padding"​​>​2dp​</dimen>
 
<dimen​ name=​"small_board_margin"​​>​2dp​</dimen>
 
<dimen​ name=​"elevation_low"​​>​4dp​</dimen>

You may be wondering how I came up all the values for margins, tile sizes, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required