Zum Inhalt springen

Android Training/Building a Simple User Interface/en: Unterschied zwischen den Versionen

Neue Version von externer Quelle importiert
(Neue Version von externer Quelle importiert)
(Neue Version von externer Quelle importiert)
Zeile 139: Zeile 139:
To improve the layout efficiency when you specify the weight, you should change the width of the <code>EditText</code> to be zero (0dp). Setting the width to zero improves layout performance because using <code>"wrap_content"</code> as the width requires the system to calculate a width that is ultimately irrelevant because the weight value requires another width calculation to fill the remaining space.
To improve the layout efficiency when you specify the weight, you should change the width of the <code>EditText</code> to be zero (0dp). Setting the width to zero improves layout performance because using <code>"wrap_content"</code> as the width requires the system to calculate a width that is ultimately irrelevant because the weight value requires another width calculation to fill the remaining space.


Here’s how your complete activity_my.xmllayout file should now look:
Here’s how your complete <code>activity_my.xml</code> layout file should now look:
''res/layout/activity_my.xml''
''res/layout/activity_my.xml''
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
372

Bearbeitungen

Cookies helfen uns bei der Bereitstellung von Android Wiki. Durch die Nutzung von Android Wiki erklärst du dich damit einverstanden, dass wir Cookies speichern.