- 博客(18)
- 收藏
- 关注
原创 Gradle compile
tasks.withType(JavaCompile) { options.encoding = "UTF-8"}解决 gbk 编码错误。
2015-09-30 02:10:55
581
原创 关于spring Entity 在不同包下的无法扫描的解决方案
1 如果是jar 文件 在persistentUnit 定义中加上标签去指定扫描的包 org.hibernate.ejb.HibernatePersistence libs/sqljdbc.jar
2015-05-26 09:56:12
4092
原创 RoboGuice @Nullable a easy solution
/** * Created by Administrator on 2014-12-28. */@Retention(RUNTIME)@Target( { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })@BindingAnnotationpublic @interface Nullable {}
2014-12-28 11:57:46
385
原创 ANDROID SDK 更新
1 sdk Manager中的Tools->Options...->Others选中“Force https://… sources to be fetched using http://…”2 修改host #android update203.208.46.146 dl-ssl.google.com203.208.46.146 dl.google.co
2014-11-13 00:51:55
401
android TextView setTextColor
TextView setTextColor 该方法 支持两种参数 1 tv.setTextColor(getResources().getColor(colorRef));2 tv.setTextColor(getResources().getColorStateList(colorRef));第二种设置 才支持复杂的文字颜色 比如 state_...
2013-07-31 12:15:42
216
原创 android attr 属性 类型
1. reference:参考某一资源ID。(1)属性定义:(2)属性使用:2. color:颜色值3. boolean:布尔值4. dimension:尺寸值。5. float:浮点值。6....
2012-05-18 17:09:20
190
原创 不滚动的listView(解决带head foot 计算)
package test.test;import android.content.Context;import android.util.AttributeSet;import android.util.Log;import android.view.View;import android.widget.ListAdapter;import android.widget...
2012-05-17 14:36:07
119
转载 android fontMetrics 使用说明
FontMetrics对象 它以四个基本坐标为基准,分别为: ・FontMetrics.top ・FontMetrics.ascent ・FontMetrics.descent ・FontMetrics.bottom 实例JAVA代码如下: Paint textPaint = new Paint( Paint.
2012-04-23 17:10:29
1947
原创 android 向 模拟器 发送短信 打电话
1.启动android emulator,查看标题栏找出端口。一般是android emulator (5554),其中5554就是端口。2.打开命令行,输入telnet localhost 5554。程序将会连接到android console,返回Android Console: type 'help' for a list of commandsOK模
2012-01-16 15:35:33
618
原创 android avd 路径配置
ANDROID_SDK_HOME D:\Program Files\Android\android-sdk 修改Path 添加 %ANDROID_SDK_HOME%\tools
2011-12-21 21:12:37
469
原创 android 退出程序 个人解决方法
// 杀死各种activity for (WeakReference a : al) { if (a.get() != null) { a.get().finish(); } } // 清空缓存 al.removeAll(al); android.os.Process.sendSignal(android.os.Process.myPid()
2011-12-21 15:50:59
1240
转载 android intent 功能大全
android 中intent是经常要用到的。不管是页面牵转,还是传递数据,或是调用外部程序,系统功能都要用到intent 。在做了一些intent的例子之后,整理了一下intent,希望对大家有用。由于intent内容太多,不可能真的写全,难免会有遗落,以后我会随时更新。如果你们有疑问或新的intent内容,希望交流。★intent大全:1.从google搜索内容Inte
2011-12-16 14:52:16
1937
原创 android 软键盘布局 及 关闭 弹出
软键盘正常情况下 会挤压activity的 布局空间。。在androidManifest 文件中 对相应的activity 设置 android:windowSoftInputMode="adjustPan" 这样软键盘就在activity contentView 上方。 隐藏软键盘 InputMethodManager imm = (InputMethodMan
2011-12-15 15:37:05
756
原创 onInterceptTouchEvent 与 OnTouchEvent
onInterceptTouchEvent 会拦截touch事件方法 如果返回true 则子控件不再接收事件。 false- 继续给子控件处理 与 OnTouchEvent正好相反。 onDispatchTouchEvent 当自身控件是个group时将派发touch 事件给子view ,在此可以拦截touchEvent
2011-12-05 19:10:41
474
原创 android ExpandableListView position - packPostion - group/childposition
ExpandableListView 的位置对应关系 绝对位置 flatPosition 就是scroll 时对应的位置 要转化成对应的 group child position packPosition=ExpandableListView . getExpandableListPosition(flatPosition );//判断位置类型 是g
2011-12-02 16:03:13
1481
原创 android listview grid 滚动加载实例
/**adapter **/ SimpleAdapter sa = new SimpleAdapter(context, data, R.layout.grid_item_for_contact, new String[] { "photo", "employeesName" }, new int[] { R.id.iv_head, R.id.name }// ,//80 )
2011-12-02 11:04:47
1152
原创 android Html.fromHtml 存在问题
不想为每个 listview item 定义一个布局 (十几个listview )想到使用 html 标签 实现在一个textview 上显示全部文字信息 public static final String HTMLTEXT = new StringBuilder().append("").append(TITLES[0]) .append(": my chose ...
2011-11-24 10:19:30
431
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人