C# 设置布局可见xamarin
我有两项活动 一个过程属性转换为另一个过程属性 通行证C# 设置布局可见xamarin,c#,android,xamarin,C#,Android,Xamarin,我有两项活动 一个过程属性转换为另一个过程属性 通行证 add.Click += delegate { var intent = new Intent (this, typeof(CartActivity)); intent.PutExtra ("title", (string)(firstitem ["post_title"])); intent.PutExtra ("price", (string)(firstitem
add.Click += delegate {
var intent = new Intent (this, typeof(CartActivity));
intent.PutExtra ("title", (string)(firstitem ["post_title"]));
intent.PutExtra ("price", (string)(firstitem ["price"] + " грн"));
intent.PutExtra ("weight", (string)(firstitem ["weight"] + "г"));
StartActivity (intent);
};
接收代码
private void Display (){
LinearLayout display = FindViewById<LinearLayout> (Resource.Id.linearLayout13);
TextView productname = FindViewById<TextView> (Resource.Id.posttittle);
TextView price = FindViewById<TextView> (Resource.Id.price);
TextView weight = FindViewById<TextView> (Resource.Id.weight);
productname.Text = Intent.GetStringExtra("title");
price.Text = Intent.GetStringExtra("price");
weight.Text = Intent.GetStringExtra("weight");
}
private void显示(){
LinearLayout display=findviewbyd(Resource.Id.linearLayout13);
TextView productname=FindViewById(Resource.Id.PostTitle);
TextView price=findviewbyd(Resource.Id.price);
TextView-weight=findviewbyd(Resource.Id.weight);
productname.Text=Intent.GetStringExtra(“标题”);
price.Text=Intent.GetStringExtra(“价格”);
weight.Text=Intent.GetStringExtra(“重量”);
}
我有块,我在那里写这些属性,但它是隐藏的
在这个块中写入属性时如何使其可见?我假设显示是您的块,所以在Xamarin中应该是这样的
display.Visibility = ViewStates.Visible;
来自android的原生版本
display.setVisibility(View.VISIBLE);