UPDATE
The problem is resolved. It seems that I need both:
android: layout_alignParentLeft = "true"
and:
Android: layout_toLeftOf = "@ id / image"
lines in LinearLayout
& lt; LinearLayout Android :. id = "@ + id / text" android: orientation = "vertical" android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: PaddingLeft = "L0dip" Android: layout_alignParentLeft = "true" Android: layout_toLeftOf = "@ Id / image "Android: gravity =" left "& gt;
I am trying to create a layout where there are two text views on the left hand side, and there is an image on the right:
Everyone is working fine except Since any of the text has a small amount of text in it, when there is a small amount of text in it in a text view, then it is pushed forward and pushed to the right, and now there is no flush with the left hand of the screen.
My question is, how do I do it, it does not matter that every text view will always flush with the left hand of the parent; As it is being pushed to the right, there is a small amount of text inside it.
I include the following links for images of the layout (I can not post the picture yet)
This first screen shot layout works fine, and I How do i want to see
This second screenshot layout is braking. Can you see the line of highlights and how it is being covered in the right direction, I want to improve it.
Here is the code, if someone can help me be great! Thanks!
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" android: padding = "8dp" & gt; & Lt; imageView android: id = "@ + id / image" Android: layout_width = "60dp" Android: layout_height = "60dp" android: padding = "5dp" android: src = "@ drawable / icon" Android: layout_alignParentRight = "true" /> & Lt; Android: layout_height = "wrap_content" Android: paddingLeft = "10dip" Android: layout_toLeftOf = "@Id / Image": LinearLayout Android: ID = "@ + id / text" Android: orientation = "vertical" Android: layout_width = "wrap_content" & Gt; & Lt; TextView android: id = "@ + id / Lesson 1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: textcolor = "# FF7F3300" Android: paddingLeft = "0dip" Android: textSize = "20dip" Android : Layout_AligninPrenalEft = "True" /> & Lt; TextView android: id = "@ + id / Lesson 2" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: textSize = "14dip" Android: paddingLeft = "0dip" Android: textcolor = "# FF267F00" Android : Layout_AligninPrenalEft = "True" /> & Lt; / LinearLayout & gt; & Lt; / RelativeLayout & gt; In
Insert android: layout_alignParentLeft = "true"
Android: Android: Orientation = "Vertical" Android: layout_alignParentLeft = "true" Android: Android: Android: Layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: paddingLeft = "10dip" Android: layout_toLeftOf = "@ id / image "& Gt;
Comments
Post a Comment