condition i need to change android:layout_below instead of android:layout_below="@id/title1" change to android:layout_below="@id/title2"
Do you want to change it at runtime in the background code?
If so, you can use
relativeLayoutLayoutParams.AddRule(LayoutRules.Below, Resource.Id.title2); to set it.
RelativeLayout.LayoutParams relativeLayoutLayoutParams = new RelativeLayout.LayoutParams(Android.Views.ViewGroup.LayoutParams.MatchParent, Android.Views.ViewGroup.LayoutParams.WrapContent); relativeLayoutLayoutParams.AddRule(LayoutRules.Below, Resource.Id.title2); relativeLayoutLayoutParams.SetMargins(0, 4, 0, 0); listView.LayoutParameters = relativeLayoutLayoutParams;
Please Note:If you have some controls below or above the listView, you need to AddRule for all of them.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Is it possible to change via the xml ?