Thursday, 15 August 2013

android - Mismatch in heights of ImageViews in Linear layout -


itemprop = "text">

Here I enclose in a parent layout (with vertical orientation) to display 4 ImageViews in two different linear layouts I'm trying to But there is a mismatch in the heights, how can I solve it?

Enter image details here

Here's my XML code snippet Is:

  & lt; LinearLayout Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_marginTop = "10dp" Android: Gravity = "Center" Android: Orientation = "Horizontal" & gt; & Lt; Android: layout_highth = "wrap_content" android: layout_marginLeft = "10dp" Android: layout_marginRight = "5dp" Android: Content Circles = "@String / Homescreen_emp_info" android: id = "@ + id / empinfo_logo" android: layout_width = "wrap_content" Android: Gravity = "True" Android: src = "@ Drable / Employee_Info" /> & Lt; Android: layout_marginLeft = "5dp" Android: layout_marginRight = "10dp" Android: Content Circles = "@ String / Homescreen_leave_info" android: id = "@ + id / leaveinfo_logo" android: layout_width = "wrap_content" android: layout_height = "wrap_content" Android: Gravity = "left" Android: src = "@drawable / leave_info" /> & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_marginTop = "10dp" Android: Gravity = "Center" Android: Orientation = "Horizontal" & gt; & Lt; Android: layout_marginLeft = "10dp" Android: layout_marginRight = "5dp" Android: Content Circles = "@String / HomeScreen" "Android": layout_width = "wrap_content" android: layout_width = "wrap_content" android: id = "@ + id / holidays_logo" Android: src = "@drawable / holiday" /> & Lt; Android: layout_marginLeft = "5dp" Android: layout_marginRight = "10dp" Android: Content Circles = "@ String / Homescreen_leave_req" android: id = "@ + id / leavereq_logo" android: layout_width = "wrap_content" android: layout_height = "wrap_content" Android: Gravity = "left" Android: src = "@drawable / leave" / "" & lt; / LinearLayout & gt;  

Note: All images are dimensions only

Use this code:

  & lt; LinearLayout Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_marginTop = "10dp" Android: Gravity = "Center" Android: Orientation = "Horizontal" & gt; & Lt; Android: layout_height = "wrap_content" android: content = "@ string / homescreen_emp_info" Android: src = "@drawable / employee_info" /> & Lt; Android: layout_highth = "wrap_content" Android: layout_marginLeft = "5dp" Android: Content Circles = "@ String / Homescreen_leave_info" Android: Gravity = "Left" Android: id = "@ + id / leaveinfo_logo" android: layout_width = "wrap_content" Android: src = "@drawable / leave_info" /> & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_marginTop = "10dp" Android: Gravity = "Center" Android: Orientation = "Horizontal" & gt; & Lt; Android: layout_height = "wrap_content" android: layout_marginRight = "5dp" Android: Content Circles = "@ String / Homescreen_holidays" Android: src = "@ Drawable: Android version: id =" @ + id / holidays_logo "android: layout_width =" wrap_content " / Holiday "/> & Lt; Android: layout_highth = "wrap_content" android: layout_marginLeft = "5dp" Android: Content Circles = "@ String / Homescreen_leave_req" Android: Gravity = "Left" Android: id = "@ + id / leavereq_logo" Android: layout_width = "wrap_content" Android: src = "@drawable / leave_request" /> & Lt; / LinearLayout & gt;  

No comments:

Post a Comment