首页 > 移动平台 > 详细

android.widget.Button cannot be cast to android.widget.Gallery

时间:2014-03-19 23:41:02      阅读:725      评论:0      收藏:0      [点我收藏+]

        Gallery g = (Gallery)findViewById(R.id.secondButton);  因为这句运行报错,放鼠标在这上面时显示

@Deprecated

This class was deprecated in API level 16.
This widget is no longer supported. Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library.

删除Gallery g = (Gallery)findViewById(R.id.secondButton);就可以了   

用这种表示   secondButton = (Button)findViewById(R.id.secondButton);

求大神求解



android.widget.Button cannot be cast to android.widget.Gallery,布布扣,bubuko.com

android.widget.Button cannot be cast to android.widget.Gallery

原文:http://blog.csdn.net/u013365404/article/details/21561855

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!