private void IconPlus2_Click(object sender, EventArgs e) { if (kt2 == false) { kt2 = true; textView2.Visibility = ViewStates.Visible; IconPlus2.SetImageResource(Resource.Drawable.minus_icon); } else { kt2 = false; textView2.Visibility = ViewStates.Gone; IconPlus2.SetImageResource(Resource.Drawable.plus_icon); } }
protected override void OnCreate(Bundle savedInstanceState) { RequestWindowFeature(WindowFeatures.NoTitle); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.FAQ); // Create your application here IconPlus1 = FindViewById <ImageButton>(Resource.Id.IconPlus1); IconPlus1.SetImageResource(Resource.Drawable.plus_icon); IconPlus2 = FindViewById <ImageButton>(Resource.Id.IconPlus2); IconPlus2.SetImageResource(Resource.Drawable.plus_icon); textView1 = FindViewById <TextView>(Resource.Id.textview1); textView2 = FindViewById <TextView>(Resource.Id.textview2); // IconPlus1.Click += IconPlus1_Click; IconPlus2.Click += IconPlus2_Click; // ImageButton img_Back = FindViewById <ImageButton>(Resource.Id.imageButton_Back); img_Back.Click += Img_Back_Click; }