- 浏览: 29751 次
最新评论
文章列表
公司用到一个功能就是根据登录接口返回cookie,保存cookie,用网页打开保持登陆状态。
流程如下:1、获取Cookie 2、设置Cookie
HttpClient httpClient = new DefaultHttpClient();
String loginUrl = "";//你的登录url
HttpPost httpPost = new HttpPost(loginUrl);
CookieStore cookieStore = null;
try {
HttpR ...
1、BackgroundColorSpan 背景色 2、ClickableSpan 文本可点击,有点击事件3、ForegroundColorSpan 文本颜色(前景色)4、MaskFilterSpan 修饰效果,如模糊(BlurMaskFilt
String tempImgSavePath = "/sdcard/a.jpg";(本地图片路径)
File file = new File(tempImgSavePath);
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
intent.setDataAndType(Uri.fromFile(file), "image/*");
startActivity(intent);
点击登录按钮登录,然后在重新下载扩展程序,在安装就可以了
java -cp .;包名(用';'号隔开) 包名+类名
如下:
java -cp .;jsoup-1.3.3.jar com.test.Main
-libraryjars libs/android-support-v4.jar //这里根据你的jar包的路径做改动
-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
Intent chooseIntent = new Intent(Intent.ACTION_SET_WALLPAPER);
// 启动系统选择应用
Intent intent = new Intent(Intent.ACTION_CHOOSER);
intent.putExtra(Intent.EXTRA_INTENT, chooseIntent);
intent.putExtra(Intent.EXTRA_TITLE, "选择壁纸");
startActivity(intent);
/**
*
* @param b bitmap
* @param degrees 角度 0 ~ 360
* @return
*/
public static Bitmap rotate(Bitmap b, int degrees) {
if (degrees != 0 && b != null) {
Matrix m = new Matrix();
m.setRotate(degrees, (float) b.getWidth() / 2,
(float) b.getHeight() / 2);
// m.s ...
/** * drawable 转 bitmap * @param drawable * @return */ public Bitmap drawable2Bitmap(Drawable drawable){ BitmapDrawable bd = (BitmapDrawable)drawable; return bd.getBitmap(); }
/** * bitmap 转 drawable * @param bitmap * @return */ public Drawable bitmap2Drawable(Bitmap bitmap){ ret ...