Wesley13 Wesley13
3年前
android WebView 使用实例
主布局文件:<?xmlversion"1.0"encoding"utf8"?<LinearLayoutxmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_parent"
Easter79 Easter79
3年前
sql 转json
SETANSI\_NULLSON GO SETQUOTED\_IDENTIFIERON GO CREATEPROCEDURE\dbo\.\SerializeJSON\( @ParameterSQLASVARCHAR(MAX) ) AS BEGIN DECLARE@SQLNVARC
Wesley13 Wesley13
3年前
Go 使用 JSON
Encode将一个对象编码成JSON数据,接受一个interface{}对象,返回\\byte和errfuncMarshal(vinterface{}){byte,err}Marshal函数将会递归遍历整个对象,依次按照成员类型对这个对象进行编码,类型转换如下:1bool类型转换成JSON
Stella981 Stella981
3年前
Android 插件化原理解析——Activity生命周期管理
在Java平台要做到动态运行模块、热插拔可以使用ClassLoader技术进行动态类加载,比如广泛使用的OSGi技术。在Android上当然也可以使用动态加载技术,但是仅仅把类加载进来就足够了吗?Activity,Service等组件是有生命周期的,它们统一由系统服务AMS管理;使用ClassLoader可以从插件中创建Activit
Stella981 Stella981
3年前
Android开发之使用Pull解析器生成XML文件
有些时候,我们需要生成一个XML文件,生成XML文件的方法有很多,如:可以只使用一个StringBuilder组拼XML内容,然后把内容写入到文件中;或者使用DOMAPI生成XML文件,或者也可以使用pull解析器生成XML文件,这里推荐大家使用Pull解析器。相关代码如下:publicstaticStringwriteXML(List<Pe
Stella981 Stella981
3年前
Android 控件抖动效果
利用Android自带的动画效果,实现控件的抖动效果,效果资源文件shark.xml<?xmlversion"1.0"encoding"utf8"?<translatexmlns:android"http://schemas.android.com/apk/res/android"android:fr
Stella981 Stella981
3年前
Gallery实现流畅的新闻滚动 方法复写
package com.ename.views;import android.content.Context;import android.util.AttributeSet;import android.view.KeyEvent;import android.view.MotionEvent;
Stella981 Stella981
3年前
Android GridView 添加 HeadView
package com.example.test;import android.content.Context;import android.util.AttributeSet;import android.util.Log;import android.view.MotionEvent;i
Stella981 Stella981
3年前
Android从相机或相册获取图片裁剪
package com.only.android.app; import java.io.File; import android.app.Activity;import android.app.AlertDialog;import android.content.DialogInterfa