我在Android应用程序中的滑动抽屉中有一个按钮。问题在于它不像普通按钮那样对任何点击作出反应。滑动抽屉中的按钮!
我猜测问题在于它与普通视图上的按钮不同。 如果我实现一个按钮以正常的方式这样
myAgenda = (Button)findViewById(R.id.BtnMyAgenda); myAgenda.setOnClickListener(this);
public void onClick(View v) {
switch(v.getId()){
case R.id.BtnMyAgenda:
test.setAnimation(leftLeft);
test.startAnimation(leftLeft);
break;
}
我猜有什么错误与上面的代码,因为按钮处于SlidingDrawer,而不是在“正常”的观点。 任何想法如何解决这个问题?