Android Xamarain PlotView-更改视图的大小
我想问您如何在代码中更改PlotView的大小Android Xamarain PlotView-更改视图的大小,android,xamarin,Android,Xamarin,我想问您如何在代码中更改PlotView的大小 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="ma
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="25px"
android:minHeight="25px"
android:background="@android:color/background_light">
<OxyPlot.Xamarin.Android.PlotView
android:id="@+id/plotView1"
android:layout_height="200dp"
android:layout_width="200dp"
/>
</LinearLayout>
我想将android:layout\u height=“200dp”更改为其他值
非常感谢此示例将其设置为300dp。将此代码放在活动中的某个位置
var-view=findviewbyd(Resource.Id.plotView1);
var param=view.LayoutParameters;
param.Width=(int)TypedValue.ApplyDimension(ComplexUnitType.Dip,300,Resources.DisplayMetrics);
view.LayoutParameters=param;
如果回答了您的问题,请将答案标记为已接受。否则,您的问题将保留在未回答部分。