- 博客(77)
- 资源 (2)
- 收藏
- 关注
原创 vue父组件向子组件传值
自己记录下vue的父组件给子组件传值:1在父组件中 的子组件标签中添加 属性<el-dialog class="dialog" title :visible.sync="isShowEditDialog" width="90%" lock-scroll :modal-append-to-body="false" append-to-body > <
2020-09-29 10:58:27
277
原创 viewpager过渡动画--PagerTransformer实现
viewpager过渡动画–PagerTransformer实现地址:https://www.jianshu.com/p/6b535cbf13b7
2020-07-06 13:48:50
282
原创 android蓝牙搜索打卡
布局代码:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_wid
2020-05-10 16:36:59
396
原创 android利用MediaRecorder实现录音功能
android用手机录音保存到sd卡中;布局文件:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
2020-05-10 14:42:45
751
2
原创 android调用系统照相机拍照
调用系统照相机拍照,之后将照片保存到sdCard中,从界面中再回显出来:布局文件:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.andr
2020-05-10 14:10:14
870
原创 Android中实现一个简单的照相功能
一个简单的照相功能,拍照之后在另一个activit中显示出拍照的图片。首先是布局文件:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.an
2020-05-10 13:15:09
1602
5
原创 Android存储之一利用外部存储卡存储数据
布局文件:<?xml version="1.0" encoding="utf-8"?><androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.andr
2020-05-10 12:43:06
289
原创 VideoView 的简单视频播放
添加布局文件<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_wi
2020-05-09 19:16:26
164
原创 android用SoundPool 播放声音
1.创建一个SoundPool对象;SoundPool pool=new SoundPool(1, AudioManager.STREAM_MUSIC,0);2.调用SoundPool load()方法;final int soundId= pool.load(this,R.raw.xpy,1);第二个参数是项目资源中的一个音频文件返回值是一个声音id3.调用play()方法; pool.play(soundId,1,1,1,0,0.5f);参数介绍下,soundID,调用load
2020-05-09 17:41:06
440
原创 Android存储之一利用本地存储数据
首先创建布局文件:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout
2020-05-09 14:23:31
439
原创 Android存储之一利用SharePreferences存储数据
布局文件:activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
2020-05-09 13:49:38
203
原创 一个简单的web接口测试程序
创建一个 Dynamic Web project 项目:这个file=>new=>Dynamic Web project打开WebContent目录新建一个Api.jsp文件<%@page import="org.omg.CORBA.Request"%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%out.
2020-05-08 23:23:57
372
原创 网络图片异步加载
离开开发岗位好长时间了,今天研究了一下网络图片的异步加载,有需要的朋友可以研究下,有错误的地方还望大神指点。直接上代码吧:首先创建一个项目布局文件:activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.c
2020-05-08 23:01:29
213
转载 android 改变输入法enter键文字 为搜索 下一个 以及前往
我们大家都知道通过指定EditText的android:imeOptions属性可以修改 输入法enter键的显示情况 例如: android:imeOptions=”actionNext” 下一个配合android:nextFocusForward属性一起使用 android:imeOptions=”actionSearch” 搜索 android:imeOptions=”acti
2017-11-21 16:03:49
1194
原创 将map和泛型为map的list集合插入到指定的数据库表中
将HashMapstatic SQLiteDatabase db; public int insertSQL(String table, HashMap<String, String> map) { long a; try { ContentValues values = new ContentValues(); fo
2017-11-03 10:50:37
4457
原创 将一个输入流打印到控制台
public static void print (InputStream is) throws UnsupportedEncodingException{ InputStreamReader isr =new InputStreamReader(is,"utf-8"); BufferedReader br =new BufferedReader(isr); try {
2017-10-12 17:33:06
6091
原创 oracle通过配置文件增加登录用户
首先是找到orcal的安装路径 D:\app\Administrator\product\11.2.0\dbhome_2\NETWORK\ADMIN 可能不在D盘你自己放哪就在哪找 找到tnsnames.ora文件 打开里边包含你之前通过NetManager设置的用户名及地址# tnsnames.ora Network Configuration File: d:\app\Administr
2017-08-23 10:41:37
1122
原创 访问服务器请求数据
布局文件:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="mat
2017-08-02 11:11:36
683
原创 服务端程序链接oracle数据库
首先创建一个数据库链接类:GetConpackage com.db;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;public class GetCon { public static final String driver ="oracle.jdbc.drive
2017-08-02 10:30:23
407
原创 TextView实现跑马灯的效果;
用textview实现跑马灯的效果; <com.example.dialoge.MyTextView android:id="@+id/textView1" android:layout_width="wrap_content" android:singleLine="true" android:focusable="true"
2017-07-13 11:15:11
278
原创 ListView显示当前选取的item
设置当前item为选中的状态;mMenuListView.setItemChecked(position, true);设置listview显示当前选中的item; mMenuListView.setSelection(position);///
2017-05-24 14:25:20
1136
原创 notifyDataSetChanged()刷新数据不更新原因
使用Listview的时候: 当要动态显示更改后的数据(例如数据库改动), 很多人应该都用过notifyDataSetChanged();这个方法来刷新Listview,显示改后的数据. 引用网上的一片文章:这时候就要注意了: private ArrayList<HashMap<String, Object>> usersList; usersLi
2017-05-24 13:48:48
7238
2
原创 程序全屏去掉上边的ActionBar,和状态栏
其实去掉Actionbar非常简单,我之前也写过有三种方法: 这里只说一种比较简单的方法, 直接在onCreate方法中添加这句就能实现去掉ActionBar, 注意的是必须要在setContentView方法之前调用; requestWindowFeature(Window.FEATURE_NO_TITLE);让手机全屏的方法也只是一行简单的代码: getWindow
2017-04-27 11:03:30
408
原创 AutoCompleteTextView 设置了点击事件需要点击两下解决办法
今天用AutoCompleteTextView 设置了点击事件为了使其弹出提示内容,但是发现需要点击两下才会触发OnClick事件。 在网上找到了一个办法是换成OnTouch方法, 在Android中,onClick、onLongClick的触发是和ACTION_DOWN及ACTION_UP相关的,在时序上,如果我们在一个View中同时覆写了onClick、onLongClick及onTouch
2017-04-26 16:04:30
2037
原创 Android实现类似execel的表格 能回显并能修改表格内容
自定义实现一个水平滚动控件HorizontalScrollViewpackage com.example.view;import android.content.Context;import android.util.AttributeSet;import android.view.View;import android.widget.HorizontalScrollView;/** * 自
2017-04-25 11:03:36
6741
2
原创 AutoCompleteTextView针对SimpleAdapter 源码改动的适配器
主要功能是提示的内容不是以输入的内容开头的,因为AutoCompleteTextView基本用法都是输入什么就提示以输入内容开头的内容。 package com.example.xujiingqing;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map
2017-04-17 12:22:16
491
原创 Android实现类似C#ComBox功能用AutoCompleteTextView实现
android实现既能单选又能输入的控件 很类似C#中ComBox控件;public class MainActivity extends Activity { private AutoCompleteTextView ac_1; private ArrayList<String> list ; private ArrayAdapter<String>adapter ;
2017-04-17 10:40:00
1527
原创 AutoCompleteTextView自定义适配器
在项目中碰到了一次用声母码检索信息的功能,在网上找了半天都是根据ArrayAdapter来写的用自定义的适配器很少。 <AutoCompleteTextView android:id="@+id/actv_1" android:layout_width="match_parent" android:layout_height="
2017-04-14 10:16:17
2098
2
原创 是否减少活动主窗口大小以便腾出空间放软键盘
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" <activity android:name="com.minimaxhk.nurse.StateAddActivity" android:windowSoftInputMode="stateAlwaysHidden|adjust
2017-03-21 11:50:28
335
原创 给按钮点击事件添加音效;
编写布局文件只添加一个button;<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_
2017-02-10 15:44:13
7022
原创 oracle数据库表空间不足解决办法;
查询表的空间;select tablespace_name, file_id, file_name,round(bytes/(1024*1024),0) total_spacefrom dba_data_files order by tablespace_name增加表空间的容量;alter tablespace USERS add datafile 'D:\APP\ADMINISTRA
2017-02-06 15:08:05
1023
原创 根据谷歌源码编辑多次点击事件
编写布局文件;<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="mat
2016-11-03 11:22:35
418
原创 调用手机的震动器
手机的振动器需要添加权限;<uses-permission android:name="android.permission.VIBRATE" /> Vibrator vibrator =(Vibrator) getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(1000);//
2016-10-31 16:27:06
712
原创 给EditText添加一个为空的时候抖动的动画
首先完成动画的效果; 在res目录下创建一个cycle_7.xml文件<?xml version="1.0" encoding="utf-8"?><cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:cycles="7" />在res目录下创建一个shake.xml文件<?xml
2016-10-31 15:44:05
503
原创 设备管理器使用
Android 2.2 SDK提供了一个可管理和操作设备的API叫DevicePolicyManager,使用这个API你可以接管手机的应用权限,对手机做出很多大胆的操作,比如锁屏、恢复出厂设置、设置密码、强制清除密码,修改密码、设置屏幕灯光渐暗时间间隔等操作。这个API让你的程序直接掌握了系统的命脉。DeviceAdminReceiver的具体实现类DeviceAdmin ,它是继承自Receiv
2016-10-28 14:41:51
484
原创 实现左右滑动跳转页面 (父类 及其实现类)
另外两个抽象方法是在页面上添加的按钮实现按钮点击之后页面的跳转;具体代码如下;package com.xu.shoujiweishi.activity;import android.app.Activity;import android.os.Bundle;import android.view.GestureDetector;import android.view.MotionEvent;
2016-10-25 16:46:34
1179
原创 获取手机系统联系人的方法
获取手机系统联系人的方法; /** * 获取系统联系人数据; */ private void initData() { // 读取联系人是耗时操作启动一个线程来查询; new Thread() { public void run() { // 获取内容解析器
2016-10-21 16:02:10
369
原创 MD5加密过程(给指定的字符串设置MD5加密)
注释已经写的非常清楚了直接看代码就好了;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;public class Md5Util { public static void main(String[] args) { String pwd ="123"+"xjq
2016-10-20 15:06:40
3620
原创 下拉刷新控件
package com.minimaxhk.view;import android.content.Context;import android.util.AttributeSet;import android.view.LayoutInflater;import android.view.MotionEvent;import android.view.View;import androi
2016-06-27 14:41:20
334
软件开发参考文档 .docx
2020-05-08
极客 匿名项目的客户端代码
2020-05-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人