toast

20182332 实验五《数据结构与面向对象程序设计》实验报告

三世轮回 提交于 2019-12-02 00:28:26
20182332 实验五《数据结构与面向对象程序设计》实验报告 课程:《程序设计与数据结构》 班级: 1823 姓名: 盛国榕 学号:20182332 实验教师:王志强 实验日期:2019年10月11日 必修/选修: 必修 1.实验内容&过程&结果 任务一: 完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号 将 android:text="Hello World!" 改为 android:text="20182332 SGR" 即可 任务二: 创建 ThirdActivity, 在ThirdActivity中显示自己的学号,修改代码让MainActivity启动ThirdActivity 此题设立一个点击事件即可,通过用户点击触发跳转机制。 任务三: 修改代码让Toast消息中显示自己的学号信息 此题在原有基础上添加了另外两种实现机制:重力Toast,带图标Toast,自定义位置Toast。 任务四: 修改布局让P290页的界面与教材不同 备注: andriod:textSize==>定义文字大小 android:textColor==>定义文字颜色 字体大小:SP。 任务五:运行教材本章相关代码并截图: 以P298为例: 2. 实验过程中遇到的问题和解决过程 ①.虚拟机安装失败: 解决方案:实体机真香啊。。。改用实体机连接手机了

20182315 实验五报告

时光毁灭记忆、已成空白 提交于 2019-12-01 23:51:47
学号 2019-2020-1 《数据结构与面向对象程序设计》实验报告 课程:《程序设计与数据结构》 班级: 1823 姓名: 邹家伟 学号:20182315 实验教师:王志强 实验日期:2019年10月17日 必修/选修: 必修 1.实验内容 初步认识安卓,学会通过一个活动启动另外一个活动。 学习UI组件,UI组件服务于活动交互的。掌握Toast用法。学习String的格式。 学习各种layout的用法,并加以修改。 学习监听器的使用,了解其原理,用途。 2. 实验过程及结果 实验1:起初对安卓语言并不了解,通过查阅大量博客,了解到fest清单作用为声明activity的执行清单。通过fest调用Java里的程序。res中存放各种资源,例如字符串及页面布局,供Java程序调用。 编写Toast对话框,通过百度可知,安卓自带Toast包,可直接调用。也可通过自行编写的方式,设置具体的字符颜色,出现时长,以及插入图片等功能。 学习各种layout布局,通过对该章节的学习,了解到如何自己设计一个界面,并懂得layout中的语法结构 在监听器的学习中,初步了解了监听器的原理,但在使用中,只需会使用其android方法即可。运行两个程序,获得结果 3. 实验过程中遇到的问题和解决过程 问题1:对安卓fest页面内容不了解 问题1解决方案:通过百度,了解到android:icon为app图标

实验五实验报告

筅森魡賤 提交于 2019-12-01 23:13:59
学号 2019-2020-182321 《数据结构与面向对象程序设计》实验五报告 课程:《程序设计与数据结构》 班级: 1823 姓名: 杨凯涵 学号:20182321 实验教师:王志强 实验日期:2019年10月22日 必修/选修: 必修 1.实验内容 Android Stuidio的安装测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十四章: 参考http://www.cnblogs.com/rocedu/p/6371315.html#SECANDROID,安装 Android Stuidio 完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号,自己学号前后一名同学的学号,提交代码运行截图和码云Git链接,截图没有学号要扣分 学习Android Stuidio调试应用程序 Activity测试 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十五章: 构建项目,运行教材相关代码 创建 ThirdActivity, 在ThirdActivity中显示自己的学号,修改代码让MainActivity启动ThirdActivity UI测试参考《Java和Android开发学习指南(第二版)

jQuery toast 淡入淡出提示

不想你离开。 提交于 2019-12-01 22:44:30
#toast{ position: fixed; top: 44%;left:50%;transform: translateX(-50%); min-width: 80px; max-width: 180px; min-height: 18px; padding: 10px; line-height: 18px; text-align: center; font-size: 16px; color: #fff; background: rgba(0, 0, 0, 0.6); border-radius: 5px; display: none; z-index: 999; } /* toast 提示 $("#toast").showMessage('网络错误,请稍后重试',1400); */ $.fn.extend({ showMessage: function( $msg, $time ){ var oDiv = document.createElement("div"); oDiv.setAttribute("id", "toast"); var oBody = document.getElementsByTagName('body')[0]; oBody.append(oDiv); $('#toast').text( $msg ); $('#toast').fadeIn();

android原生TTS+语音引擎 实现纯离线 免费的中英TTS

一曲冷凌霜 提交于 2019-12-01 21:33:23
之前使用百度的语音合成 sdk做了个简单的tts,但是它不是真正的免费和纯离线的,所以在查阅相关资料后,使用Android的原生TTS ,因为它不支持中文,需要借助其他语音引擎可实现纯离线 免费的TTS。 Android原生的TTS是不支持中文合成的,需要借助其他的语音引擎(apk安装包),比如科大讯飞语音引擎3.0,度秘语音引擎3.0以及新版手机基本都内置有语音引擎,可在设置——》语言——》首选引擎进行选择。 具体可参考这篇csdn博客: https://blog.csdn.net/yingchengyou/article/details/79591954 我手机是荣耀10,内置有讯飞语音引擎,其他两个可以在上面网址下载到手机安装。 点击科大讯飞 !可选择发音人,内置语言引擎和讯飞的中英文只有女声,而度秘的在我手机选择不了,估计是版本问题吧。 Android的TextToSpeech类文档可参考这篇csdn博客: https://blog.csdn.net/qq_26971803/article/details/51176592 Android原生TTS类——TextToSpeech使用方法非常简单。 1.实例化 private TextToSpeech textToSpeech = new TextToSpeech(this, this); 2.重写onInit方法

Android, using Toast inside onClickListener

旧巷老猫 提交于 2019-12-01 20:14:53
I am trying to make a toast display some text given certain conditions inside an onClickListener. The app won´t run in the simulator, and I get the following error: "void cannot be converted to Toast" I have searched around, and find several similar problems and solutions on this forum, but none of them applies completely to my problem. The others haven´t used the correct context in the statement, but I really mean that I do. (The name of the javafile (context) is: "Case1Activity") Can anyone help me with this? I have simplified the code a bit: public void onClick(View view) { if

后端spring boot+前端Android交互+mysql增删查改

大兔子大兔子 提交于 2019-12-01 19:26:27
1.概述 使用spring boot作为后端框架与Android端配合mysql进行基本的交互,包含了最基本的增删查改功能. 2.开发环境 win10 IDEA tomcat9.0.27 mysql8.0.17 spring boot 3.后端 (1)新建一个spring boot项目 可以看这里 (2)Entity 新建User类作为实体类: package com.test; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void

Android, using Toast inside onClickListener

老子叫甜甜 提交于 2019-12-01 19:26:14
问题 I am trying to make a toast display some text given certain conditions inside an onClickListener. The app won´t run in the simulator, and I get the following error: "void cannot be converted to Toast" I have searched around, and find several similar problems and solutions on this forum, but none of them applies completely to my problem. The others haven´t used the correct context in the statement, but I really mean that I do. (The name of the javafile (context) is: "Case1Activity") Can anyone

Toast Notifications Not Showing Up on Nexus 7 Tablet

不羁的心 提交于 2019-12-01 19:04:55
I am trying to get a Toast notification to show up on my Nexus 7 tablet - however, they will not show. I use custom Toast messages throughout most of my app, but even something as simple as: Toast.makeText(MyActivity.this, "generic toast message", Toast.LENGTH_LONG).show(); is not working. I have tested this app on other devices, including a Nexus 1 phone (2.3), MyTouch (2.2), and Acer Iconia tablet (4.0). The toast messages appear on all other devices except this Nexus 7 tablet (4.1). Is there a user setting that allows the disabling of Toast notifications in an application? Or are Toast

Toast Notifications Not Showing Up on Nexus 7 Tablet

假如想象 提交于 2019-12-01 19:03:09
问题 I am trying to get a Toast notification to show up on my Nexus 7 tablet - however, they will not show. I use custom Toast messages throughout most of my app, but even something as simple as: Toast.makeText(MyActivity.this, "generic toast message", Toast.LENGTH_LONG).show(); is not working. I have tested this app on other devices, including a Nexus 1 phone (2.3), MyTouch (2.2), and Acer Iconia tablet (4.0). The toast messages appear on all other devices except this Nexus 7 tablet (4.1). Is