我是为Android编程的乞丐。决定在C#上用Xamarin编写应用程序。我有完全设计的车轴。在MainActivity中,我有以下内容:
ImageButton logoButton = FindViewById<ImageButton>(Resource.Id.logoButton);
ImageButton cartButton = FindViewById<ImageButton>(Resource.Id.cartButton);
ImageButton privateButton = FindViewById<ImageButton>(Resource.Id.privateButton);
ImageButton homeButton = FindViewById<ImageButton>(Resource.Id.homeButton);
ImageButton nextButton = FindViewById<ImageButton>(Resource.Id.nextButton);
ImageButton previousButton = FindViewById<ImageButton>(Resource.Id.previousButton);这个代码-引用我在axml中的控件?
发布于 2015-08-02 13:10:14
是。现在您可以更改按钮的文本:
cartbutton.setText("...")或设置按钮侦听器:
cartbutton.setOnClickListener(new OnClicklistener(..){https://stackoverflow.com/questions/31772128
复制相似问题