Android文字栏位:行与文字之间的距离 [英] Android text field: distance between line and text

查看:84
本文介绍了Android文字栏位:行与文字之间的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Material Design建议对齐项目,以使文本位于4dp基线上().它还建议元素之间的特定填充.

Google Material Design recommends to align items so that text falls on a 4dp baseline (source). It also recommends specific paddings between elements.

我是一名设计师,我认为遵循这些原则确实有助于获得清晰可见的布局.但是,我们团队中的开发人员很难将设计转换为代码.

I am a designer and I think working with these principles really helps to have a clear and visually pleasing layout. However, the developers in my team are having trouble to turn the designs into code.

一个示例:接受单行文本输入字段.根据Google Material Design(和我的设计),底部线条之间的距离应为12dp.开发人员说不可能控制线条和文本之间的距离.这是真的?如果是这样,则Google的设计指南提出了一种行为,该行为无法由Google自己的Android API来实现.

An example: Take In a single-line text input field. According to Google Material Design (and my design) the distance between the line at the bottom should be 12dp. The developer says it is not possible to control the distance between the line and the text. Is this true? If so, Google's design guidelines propose a behaviour that can't be implemented by Google's very own Android APIs.

一方面,我不想让开发人员的生活变得不必要地艰难.另一方面,在没有任意设置距离的情况下,应用程序的外观确实获得了很多收获.

On one hand, I don't want to make the devs' lives unnecessarily hard. On the other, the appearance of an app really gains a lot when distances are not set arbitrarily.

我有一个网站开发背景,其中垂直节奏是一个常见问题.实际上,该问题非常普遍,因此已记录了一些解决方法(

I have a background in web development where vertical rhythm is a common problem. In fact the problem is so common that a couple of approaches are documented to solve it (example). Isn't it the same with Android?

总的来说,我对开发人员有多少设计保真度?您能指出我正确的方向,他们可以为该问题寻求解决方案吗?

On a more general note, how much design fidelity can I expect from the developers? Can you point me into the right direction where they can look for solutions to this problem?

推荐答案

在您的EditText上设置android:paddingBottom="12dp".

Set android:paddingBottom="12dp" on your EditText.

这篇关于Android文字栏位:行与文字之间的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆