1 / 31
文档名称:

Android百科.doc

格式:doc   页数:31页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Android百科.doc

上传人:aluyuw1 2016/7/11 文件大小:0 KB

下载得到文件列表

Android百科.doc

相关文档

文档介绍

文档介绍:1. android dp 和 px 之间转换 public class DensityUtil { /** * 根据手机的分辨率从 dip 的单位转成为 px( 像素) */ public static int dip2px(Context context, float dpValue) { final float scale = ().getDisplayMetrics().density; return (int) (dpValue * scale + ); } /** * 根据手机的分辨率从 px( 像素) 的单位转成为 dp */ public static int px2dip(Context context, float pxValue) { final float scale = ().getDisplayMetrics().density; return (int) (pxValue / scale + ); }} 2. android INSTALL_PARSE_FAILED_MANIFEST_MALFORMED INSTALL_PARSE_FAILED_MANIFEST_MALFORMED Nothing, the application was built with a previous version of Google's SDK. In other words, it's old and needs rebuilt with the latest version of the SDK running on the phone. Google just frooze v1 of the SDK like a month ago. Before that the SDK was changing so don't be surprised if stuff won't install. From here forward the public APIs we developers use are frozen but features will be added and bugs fixed. 3. android root 下禁用组件 pm .htc.. 4. android 对话框样式<style name="MyDialog" parent="***@android:"> <item name="android:windowNoTitle">true</item> <item name="android:windowBackground">***@color/ha</item> </style> 根据 uri 获取路径 Uri uri = (); String[] proj ={ }; Cursor actualimagecursor = managedQuery(uri,proj,null,null,null); int actual_image_column_index = (); (); String img_path = (actual_image_column_index); File file = new File(img_path); 6. android 根据 uri 获取真实路径 public static String getRealFilePath( final Context context, final Uri uri ){ if( null == uri ) return null; final String scheme = (); String data = null; if( scheme == null ) data = (); else if( ( scheme )){ data = (); } else if( ( s