登录
首页 » Android » Android 仿微信按住按钮语音发送实现聊天对话

Android 仿微信按住按钮语音发送实现聊天对话

于 2022-01-26 发布 文件大小:794.77 kB
0 334
下载积分: 2 下载次数: 1

代码说明:

Android仿微信语音对话聊天的实现,按住 按钮后可录音并发放语音,可播放动画、播放音频,仿微信那样如果前一下正在播放,当点另一个,会先把前一个正在播放的停掉,录音完成后的回调,获取音量大小的Runnable,判断手指的横坐标是否超出按钮的范围,改变文本内容及button的背景色。一些技巧值得学习:   设置MediaRecorder的音频源为麦克风,设置音频的格式,设置音频的编码为amr,随机生成文件的名,mMediaRecorder.getMaxAmplitude()的取值范围:1-32767。只有准备完毕了,AudioRecorderButton才会计时并显示dialog。   手指上滑,取消发送,松开手指,取消发送,通过level去更新voice上的图片   技巧,避免使用switch的冗余代码。

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

发表评论

0 个回复

  • [安卓开源]带详细注释的水果消消看源码
    说明:  一款游戏,有详细注释,可以运行在安卓平台上。(A game, with detailed annotations, can run on Android platform.)
    2020-06-21 14:20:02下载
    积分:1
  • c++ 电池管理源码下载
    c++ 电池管理源码下载
    2016-10-26下载
    积分:1
  • 2015全国大学生电子设计竞赛风力摆
    脉冲宽度调制是一种模拟控制方式,根据相应载荷的变化来调制晶体管基极或MOS管栅极的偏置,来实现晶体管或MOS管导通时间的改变,从而实现开关稳压电源输出的改变。这种方式能使电源的输出电压在工作条件变化时保持恒定,是利用微处理器的数字信号对模拟电路进行控制的一种非常有效的技术。脉冲宽度调制是利用微处理器的数字输出来对模拟电路进行控制的一种非常有效的技术,广泛应用在从测量、通信到功率控制与变换的许多领域中。(Pulse width modulation (PWM) is an analog control method, which modulates the bias of transistor base or MOS gate according to the change of load, so as to change the turn-on time of transistor or MOS and realize the change of output of switching regulated power supply. This method can keep the output voltage of the power supply constant when the working conditions change. It is a very effective technology to control the analog circuit by using the digital signal of the microprocessor. Pulse width modulation (PWM) is a very effective technology to control analog circuits by using the digital output of microprocessors. It is widely used in many fields, from measurement, communication to power control and conversion.)
    2020-06-22 16:20:02下载
    积分:1
  • pglduisj
    这是一款Android平台下的仿苹果通信界面UI源码,目前只是来电界面,去电因为没法发送DTMF,没法实现拨号盘功能,所以去电界面没实现,另外具备免提切换按键功能,希望能给大家带来帮助。 (This is a Android platform imitation Apple communication UI interface source code, currently only incoming interface to electricity because can t send DTMF, can not realize dialing disk function, so to electrical interface is not achieved, it also possess the hands-free key function switching, hope can bring a help to everybody.)
    2016-05-25 19:17:39下载
    积分:1
  • android使用静态变量共享数据
    在andorid开发中,经常会遇到在一个界面中控制另一个界面上数据的情况,这里的静态变量就是这种应用情景的实现,在一个activity中定义静态变量,在另一个activity中获取到这个变量并改变它的数值,这样就实现了静态变量在两个activity之间共享数据的功能。
    2023-03-09 03:50:04下载
    积分:1
  • db
    说明:  用android对SQLite数据库实现简单的增、删、改(SQLite database using android simple to add, delete, change)
    2012-05-22 00:11:20下载
    积分:1
  • android实现拍照保存预览相册取消退出
    拍照 预览相册 取消 等常用功能
    2014-08-26下载
    积分:1
  • mapView
    android的地图编辑器实例,告诉你如何写地图(android map editor instance, tell you how to write map)
    2013-07-23 09:25:56下载
    积分:1
  • 安卓 圆形进度条 自定义
    一个android 自定义的圆形进度条
    2022-08-20 03:36:48下载
    积分:1
  • 安卓实现实时天气预报功能
    安卓实现较为完整的天气预报功能,可以罗列出全国所有的省市县,也可查看全国任意城市的天气信息,并可自由的切换任意城市,查看其它城市的天气。
    2022-03-25 01:32:09下载
    积分:1
  • 696516资源总数
  • 106648会员总数
  • 8今日下载