Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add style guide for order of properties in Android views
Alphabetized is pretty much the standard, but we felt that `id`, `layout_width`, and `layout_height` should be listed first. `id` is the property you care about most (if it is present), and should be quick to find at a glance. `layout_width` and `layout_height` are required on all views, and affect the layout of the view most, so they should also be separated from the rest.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
> | ||
<TextView | ||
android:id="@+id/system_name" | ||
android:layout_height="48sp" | ||
android:layout_width="match_parent" | ||
android:background="@color/brand_red" | ||
android:gravity="center_vertical" | ||
android:layout_alignBottom="@id/system_image" | ||
android:layout_alignLeft="@id/system_image" | ||
android:paddingLeft="12dp" | ||
android:textColor="@color/base_font_color" | ||
android:textSize="18sp" | ||
/> | ||
</LinearLayout> |