自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 android EditText 字数监听并显示

android EditText 字数监听并显示在开发应用的时候,经常会限制用户输入的字数,比如发表评论或者其它什么的,下面来个简单的demoEditText et_content;//定义一个文本输入框TextView tv_num;// 用来显示剩余字数int num = 10;//限制的最大字数 et_content = (EditText)...

2016-03-25 09:34:56 467

原创 BGABadgeView-Android

bingoogolapple / BGABadgeView-AndroidAndroid徽章控件867173介绍:各式各样的徽章控件。运行效果:使用说明:demo中演示了:微博底部tab显示最新微博条数微博列表用户头像显示显示右下角vip徽章微信消息界面用户新消息微信消息...

2016-03-11 12:43:12 170

原创 Android PopupWindow的使用技巧

PopupWindow是Android上自定义弹出窗口,使用起来很方便。PopupWindow的构造函数为public PopupWindow(View contentView, int width, int height, boolean focusable)contentView为要显示的view,width和height为宽和高,值为像素值,也可以是MATCHT_PAR...

2016-01-13 18:56:38 105

原创 android gridview item 清除触摸默认背景的方法

android 中,可以使用android:listSelector="@android:color/transparent"  消除item默认的背景  ,如gridview

2016-01-11 21:03:00 204

android adapter getChildAt(int)方法使用

android 中  adapter 可以使用getChildAt(int position)方法,来获取item的View对象

2016-01-11 21:01:23 579

ListView多布局,对item中各个组件添加独立监听器的方法

首先,给出自定义OnClickListener代码:/* * 自定义的OnClickListener,提供给外部容器(Activity/Fragment 回调使用) */public interface showMessageItemOnClickListener extends OnClickListener{ /** * * @param viewID ...

2015-12-15 21:00:48 241

原创 Android中常见的热门标签的流式布局的实现

一、概述:在日常的app使用中,我们会在android 的app中看见 热门标签等自动换行的流式布局,今天,我们就来看看如何自定义一个类似热门标签那样的流式布局吧(源码下载在下面最后给出)类似的自定义布局。下面我们就来详细介绍流式布局的应用特点以及用的的技术点:1.流式布局的特点以及应用场景    特点:当上面一行的空间不够容纳新的TextView时候,    才开辟下一行的空间...

2015-12-10 23:38:23 78

原创 Android RecyclerView+CardView实现瀑布流效果

所需要的库及库工程库:android-support-v7-recyclerview.jar :v21.xandroid-support-v4.jar :v21.x库工程:android-support-v7-appcompat:v21.xandroid-support-v7-cardview 注意:cardView必须使用库工程,而不能使用jar包,原因是其引...

2015-12-10 23:18:08 545

原创 Hello Android - 调用打电话和发短信及intent一些其他用法

1.打电话可以自己写界面,在button的单击事件中添加如下代码即可:   Intent intent = new Intent();   intent.setAction("android.intent.action.CALL");   intent.setData(Uri.parse("tel:"+ mobile));//mobile为你要拨打的电话号码,模拟器中为模拟器编号也...

2015-12-07 10:51:14 128

原创 The Struts dispatcher cannot be found. This is usually caused by using Struts ta

The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. 异常  在jsp页面中引用了:<font color="blue"><s:property value="#session.existA...

2015-06-24 23:49:37 129

原创 错误: Invalid action class configuration that references an unknown class named

错误: Invalid action class configuration that references an unknown class named 的原因分析:①:在页面中定义了后台没有的属性/或者是对象的属性。 比如前台定义了一个name属性,后台根本没有这个属性②:在页面中使用标签接收了后台传递过来的对象的值(包含若干属性)。比如后台有一个类Person:[j...

2015-06-23 22:51:51 527

原创 Oracle 基础语法

一、基础语法基本create or replace procedure [proc name] asbeginend ;带参以及输出参数create or replace procedure [proc name] ([param name] [ data type] , [ out param name] out [ data type])as...

2015-06-09 15:18:06 95

原创 oracle创建表空间及用户

/*分为四步 *//*第1步:创建临时表空间  */create temporary tablespace user_temp  tempfile 'D:\oracle\oradata\Oracle9i\user_temp.dbf' size 50m  autoextend on  next 50m maxsize 20480m  extent management...

2015-06-08 10:37:48 71

原创 struts2校验器使用简明

首先,给出包结构截图:  这里UserAction使用模型驱动: 我们需要对UserAction类中的user_regist方法使用校验规则,校验器命名为:ClassName-[ActionName]-validation.xml       ActionName对应着ClassName中的执行方法,若不填写则表示校验器对ClassName下的所有执行方法都生效。...

2015-06-08 00:22:39 144

原创 Struts2中的ModelDriven机制及其运用

ModelDriven 为什么需要ModelDriven 所谓ModelDriven,意思是直接把实体类当成页面数据的收集对象。比如,有实体类User如下: package cn.com.leadfar.struts2.actions; public class User {    private int id;    private Str...

2015-06-07 14:08:04 57

原创 getHibernateTemplate().findByCriteria()使用

getHibernateTemplate().findByCriteria()使用用了这么多次getHibernateTemplate().findByCriteria(),现在才发现它很好用,可以解决很多查询问题。 getHibernateTemplate().findByCriteria(criteria)可以查询不需要分页的数据,getHibernateTemplate()...

2015-06-07 11:31:07 969

原创 使用ssh框架时出现 failed to lazily initialize 或者 no session 异常

Stacktracesorg.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.eduask.beans...

2015-06-07 11:22:40 141

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除