Open tieskedh opened 3 years ago
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="text"/>
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</FrameLayout>
@Test
fun `FrameLayout with EditText and View`() {
assertAST(
fileName = "framelayout-edittext-view.xml",
expected = Layout(
listOf(
FrameLayoutNode(
ViewGroupAttributes(
listOf(
EditTextNode(
ViewAttributes(
width = LayoutSize.MatchParent,
height = LayoutSize.MatchParent
),
text = "",
inputType = InputType.Text
),
ViewNode(
ViewAttributes(
width = LayoutSize.MatchParent,
height = LayoutSize.MatchParent
),
)
)
),
ViewAttributes(
width = LayoutSize.MatchParent,
height = LayoutSize.WrapContent,
),
)
)
)
)
}
The parser seems to close a parent tag for EditText.
Will result in:
Same occurs with LinearLayout.