-
Notifications
You must be signed in to change notification settings - Fork 192
Layouts
Kiran Kumar edited this page Jan 24, 2017
·
9 revisions
A proteus layout is a json object
where keys
are view attributes and values
are values that will assigned to that view attribute.
{
"type": "LinearLayout",
"layout_width": "match_parent",
"layout_height": "wrap_content",
"orientation": "vertical",
"padding": "16dp",
"background": "#ffffff",
"children": [
{
"type": "TextView",
"text": "Hello World !!",
"textColor": "#000000",
"textSize": "12sp"
}
]
}
-
type
: The type of view to create. -
children
: The children of this view.
Note : The value of type
is used by LayoutBuilder
to lookup the right Parser
to parse the attributes. If you implement your class which extends a WrappableParser
then make sure you register it for the right type
Next: Components