登录
首页 » Android » Android 演示开关灯效果

Android 演示开关灯效果

于 2023-05-07 发布 文件大小:80.47 kB
0 168
下载积分: 2 下载次数: 1

代码说明:

Android 演示开关灯效果,单击按钮后开灯,再次单击则关灯,很逼真的演示了开关灯特效,开灯后灯光点亮的效果很逼真哦。主要是添加按钮事件,改变图片的状态,设置程序状态的方法:   public void setBulbState(boolean state){//true on false off   //设置图片状态   ImageView iv=(ImageView)findViewById(R.id.ImageView01);   iv.setImageResource((state)?R.drawable.bulb_on:R.drawable.bulb_off);//设置图片状态   //设置ToggleButton状态   ToggleButton tb=(ToggleButton)this.findViewById(R.id.ToggleButton01);   tb.setChecked(state);//设置ToggleButton状态

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • FrameLayoutTest
    android学习工程,主要用framelayout帧布局来实现霓虹灯效果,类似于流水灯一样。(android study engineering, layout of framelayout frame to achieve the neon effect, similar to the light water.)
    2013-04-23 23:20:25下载
    积分:1
  • code
    2023-01-07 10:30:05下载
    积分:1
  • indicator android tab切换例子源码(支持Fragment)
    indicator android tab切换例子源码(支持Fragment)
    2015-04-22下载
    积分:1
  • android 刮刮乐效果 实例源码下载
    android 刮刮乐效果 实例源码下载
    2014-09-20下载
    积分:1
  • Androidtelnetloading
    带Loading效果的Android远程登录代码+实例,用于在后台请求服务器是否登录成功,返回[0]登录状态,[1]是否网络错误。代码中可以学习到许多Android编程的小技巧,比如弹出对话框、初始化注册view组件、清空监听按钮、检查注册表单(Loading effect the Android remote login code+ instance, is used to request the server in the background, whether the login is successful, return [0] logged in [1] is a network error. Code can learn many Android programming tips, such as pop-up dialog box, initialize the registration view components, empty the monitoring button, check the registration form)
    2013-04-18 11:28:15下载
    积分:1
  • Android-application-development
    本文详细在介绍了Android开发环境搭建的基础上,详述了Android应用程序的框架,UI系统的实现,以及2D,3D接口的控制和使用,是Android应用开发入门的经典教程。(This paper introduces in detail in the Android development environment to build, based on the details of the Android application framework, UI system implementation, as well as 2D, 3D interface to control and use, is a classic Android Application Development Tutorial.)
    2013-08-03 10:25:49下载
    积分:1
  • 最全代码动画
    分享一下非常好的动画大全,非常适合想要完善android UI的广大  码友。
    2022-03-24 07:19:45下载
    积分:1
  • Android-introduction
    安卓系统入门介绍,非常不错哦! 想学安卓的人不要错过。(android introduction, nice)
    2013-09-16 08:31:21下载
    积分:1
  • android 转盘抽奖源码(原生态)下载
    android 转盘抽奖源码(原生态)下载
    2015-03-06下载
    积分:1
  • AD可用QFN全系列封装lib
    AD10可用的QFN系列全品种的封装文件,已经做成lib,加载即可用
    2019-04-17下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载