摘要: 1、引用方式在源代码*.Java中可以进入如下方式引用:myMenuItem.setIcon(android.R.drawable.ic_menu_save);在*.XML文件中的可以进行如下引用:android:icon="@android:drawable/ic_menu_save"2、图标展示 alert_dark_frame alert_light_frame arrow_down_float arrow_up_float bottom_bar btn_default btn_default_small btn_dialog btn_dropdown btn_min 阅读全文
posted @ 2013-11-21 14:49 Yang2 阅读(2094) 评论(0) 推荐(0) 编辑
摘要: jdk1.7的新特性:1,switch中可以使用字串Java代码String s = "test";switch(s) {case"test":System.out.println("test");case"test1":System.out.println("test1");break;default:System.out.println("break");break;}2,""这个玩意儿的运用List tempList = new ArrayList( 阅读全文
posted @ 2014-04-03 17:35 Yang2 阅读(418) 评论(0) 推荐(0) 编辑
摘要: Intent intent=new Intent(Intent.ACTION_GET_CONTENT);//ACTION_OPEN_DOCUMENT intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("image/jpeg"); if(android.os.Build.VERSION.SDK_INT>=android.os.Build.VERSION_CODES.KITKAT){ startActivityForResult(intent, SELECT_PIC_KI... 阅读全文
posted @ 2014-03-14 10:58 Yang2 阅读(860) 评论(2) 推荐(0) 编辑
摘要: 在通过BitmapFactory.decodeFile(String path)方法将突破转成Bitmap时,遇到大一些的图片,我们经常会遇到OOM(Out Of Memory)的问题。怎么避免它呢? 这就用到了我们上面提到的BitmapFactory.Options这个类。BitmapFactory.Options这个类,有一个字段叫做inJustDecodeBounds。SDK中对这个成员的说明是这样的: If set to true, the decoder will return null (no bitmap), but the out… 也就是说,如果我们把它设为true,那么Bi 阅读全文
posted @ 2014-03-06 17:31 Yang2 阅读(1877) 评论(0) 推荐(2) 编辑
摘要: 系统已经有的东西,如果我们没有新的需求的话,直接调用是最直接的。下面讲讲调用系统相机拍照并保存图片和如何调用系统相册的方法。首先看看调用系统相机的核心方法:Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);startActivityForResult(camera, 100);相机返回的数据通过下面的回调方法取得,并处理@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActiv. 阅读全文
posted @ 2014-03-06 17:19 Yang2 阅读(1751) 评论(0) 推荐(2) 编辑
摘要: Android基础SDK目录介绍 ◆add-ons:该目录下存放第三方为android平台开发的附加功能系统、刚解压缩时该目录为空 ◆build-tools: ◆docs:该文件夹存放了android SDK开发文件盒API文档等 ◆extras:该文件下存放了Goolge提供的USB驱动、Intel提供的硬件加速等附加工具包 ◆platforms:该目录下存放不同版本的android系统、刚解压时该目录为空 ◆platform-tools:该文件夹下存放了android平台相关工具 ◆samples:该文件夹下存放了不同android平台的示例程序 ◆sources:该文件夹下存放了andr 阅读全文
posted @ 2013-11-30 17:02 Yang2 阅读(1185) 评论(0) 推荐(0) 编辑
摘要: ①、定义HeaderViewpackage com.exi.oa.activity.widget.list;import com.exi.oa.R;import android.content.Context;import android.util.AttributeSet;import android.view.Gravity;import android.view.LayoutInflater;import android.view.View;import android.view.animation.Animation;import android.view.animation.Rota 阅读全文
posted @ 2013-11-25 10:47 Yang2 阅读(552) 评论(0) 推荐(0) 编辑
摘要: package com.exi.oa.util;import java.text.DateFormat;import java.util.Calendar;import java.util.Date;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Locale;import s6.lunar.ChineseLunar;import s6.lunar.ChineseLunar.CalElement;public class DateUtil { static Cal... 阅读全文
posted @ 2013-11-25 10:36 Yang2 阅读(10245) 评论(1) 推荐(1) 编辑
摘要: //根据指定的二进制流字符串保存文件并返回保存路径 public static String saveFileByBinary(String str,String attName,Context context){ /***加载附件***/ //获取存储卡路径、构成保存文件的目标路径 String dirName = ""; //SD卡具有读写权限、指定附件存储路径为SD卡上指定的文件夹 dirName = Environment.getExternalStorageDirecto... 阅读全文
posted @ 2013-11-25 10:32 Yang2 阅读(2880) 评论(0) 推荐(0) 编辑
摘要: public static String download(Context context,String docUrl)throws Exception{ /***加载正文***/ //获取存储卡路径、构成保存文件的目标路径 String dirName = ""; //SD卡具有读写权限、指定附件存储路径为SD卡上指定的文件夹 dirName = Environment.getExternalStorageDirectory()+"/Signature/"; ... 阅读全文
posted @ 2013-11-25 10:31 Yang2 阅读(3929) 评论(0) 推荐(0) 编辑
摘要: package com.exi.oa.util;import java.io.File;import android.content.Intent;import android.net.Uri;public class OpenFileUtil { //获取一个用于打开HTML文件的intent public static Intent getHtmlFileIntent(String filePath){ Uri uri = Uri.parse(filePath).buildUpon().encodedAuthority("com.android.htmlf... 阅读全文
posted @ 2013-11-25 10:27 Yang2 阅读(497) 评论(0) 推荐(0) 编辑