官术网_书友最值得收藏!

Baseline alignment

Aligning text across multiple views using their baselines can be fiddly, especially when text is of different sizes. Fortunately, constraint layouts offer a simple and easy way to achieve this.

Any constrained view or widget designed to contain text, will contain a bar across its center. Hover over this for a moment, until it flashes, and then drag it to the view whose text you wish to align it with, as seen here:

Baseline alignment.

You will probably be familiar with the gravity attributes that the relative layout class uses to control positioning.

Baseline constraints can only be connected to other baselines.

The constraint layout introduces a new approach, allowing us to control the relative distances either side of the view.

主站蜘蛛池模板: 霍山县| 渭南市| 宾川县| 冷水江市| 左贡县| 启东市| 遂川县| 富蕴县| 昭平县| 万荣县| 光山县| 施秉县| 景泰县| 河东区| 佛坪县| 乌拉特中旗| 古交市| 郴州市| 陕西省| 密云县| 乐清市| 丰台区| 报价| 方城县| 桃园市| 红桥区| 赤峰市| 昭觉县| 青川县| 闵行区| 全椒县| 贡山| 梨树县| 旅游| 青田县| 清新县| 富源县| 慈溪市| 舟曲县| 思南县| 富宁县|