Skip to content

Commit

Permalink
[Android]Fix container layout issue (microsoft#2308)
Browse files Browse the repository at this point in the history
  • Loading branch information
FAREAST\xishui committed Jan 17, 2019
1 parent 4f14723 commit c9d3693
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ else if ((container = Container.dynamic_cast(baseCardElement)) == null)
ContainerStyle styleForThis = container.GetStyle().swigValue() == ContainerStyle.None.swigValue() ? containerStyle : container.GetStyle();
LinearLayout containerView = new LinearLayout(context);

containerView.setOrientation(LinearLayout.VERTICAL);
if(container.GetHeight() == HeightType.Stretch)
{
containerView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT, 1));
containerView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 1));
}
else
{
containerView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}

VerticalContentAlignment contentAlignment = container.GetVerticalContentAlignment();
Expand Down

0 comments on commit c9d3693

Please sign in to comment.