Reputation:
I have two activities.
One pass attributes to another.
Code of passing
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);
};
Code of receiving
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");
}
And i have block, where I write this attributes, but it hidden.
How i can make it visible when attributes wrote in this block?
Upvotes: 0
Views: 2247
Reputation: 1306
I assume display is your block so it should be like this in Xamarin
display.Visibility = ViewStates.Visible;
From android's native
display.setVisibility(View.VISIBLE);
Upvotes: 2