Tuesday, April 8, 2014

Layout reported a lot of mistakes, but do not know where the problem lies, who gets advice


Code:

android: layout_width = "match_parent"
android: layout_height = "match_parent"
>
android: id = "@ + id/textview1"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "center"
android: width = "320px"
android: height = "320px"
android: background = "# f00"
/>
android: id = "@ + id/textview2"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "center"
android: width = "280px"
android: height = "280px"
android: background = "# 0f0"
/>
android: id = "@ + id/textview3"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: width = "240px"
android: height = "240px"
android: layout_gravity = "center"
android: background = "ff0"
/>
android: id = "@ + id/textview4"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "center"
android: width = "200px"
android: height = "200px"
android: baickground = "f0f"
/>

Such errors are all below


This is where the problem?
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Put the xmlns: android = "http://schema.android.com/apk/res/android to xmlns: android =" http://schemas.android.com/apk/res/android "
Reply:

android: layout_width = "match_parent"
android: layout_height = "match_parent"
>
android: id = "@ + id/textview1"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "center"
android: width = "320px"
android: height = "320px"
android: background = "# f00"
/>
android: id = "@ + id/textview2"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "center"
android: width = "280px"
android: height = "280px"
android: background = "# 0f0"
/>
android: id = "@ + id/textview3"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: width = "240px"
android: height = "240px"
android: layout_gravity = "center"
android: background = "# ff0"
/>
android: id = "@ + id/textview4"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_gravity = "center"
android: width = "200px"
android: height = "200px"
android: background = "# f0f"
/>


Do not use with dp sp fonts with px
Reply:
And px does not matter, is the namespace wrong, on the first floor so it should be no problem to modify
Reply:
Thank you for help
Reply:
I know and it does not matter but not recommended dp px

No comments:

Post a Comment