您的位置:首页 > 移动开发 > Android开发

android开发搜集

2016-02-14 23:45 465 查看

1、自适应各种尺寸的图片配置

http://blog.csdn.net/luoyuhhy/article/details/6451901

搜索关键字:android 图片 自适应 分辨率

2、对话框:

http://www.cnblogs.com/salam/archive/2010/11/15/1877512.html

3、相册、相机图片处理:

http://my.oschina.net/onlytwo/blog/71192

4、[Android实例] ListView嵌套GridView(GridView实现横向滑动)

资源地址:http://download.csdn.net/detail/wyyl1/5121975

5、传递对象

list是可序列化对象

传值:

Intent mIntent = new Intent(mContext, ChexiActivity.class);

CarBrand cb = gcb.getFlList().get(position);

Bundle mBundle = new Bundle();

mBundle.putSerializable(“carBrandList”, list);

mIntent.putExtras(mBundle);

mContext.startActivity(mIntent);

取值:

list = (ArrayList)getIntent().getSerializableExtra(“carBrandList”);

6、android.support.v4.view.PagerAdapter获得当前页

pageradapter get current page

mViewPager.getCurrentItem()

资源地址:http://stackoverflow.com/questions/8538035/android-pageradapter-get-current-position

7、android退出应用代码

android.os.Process.killProcess(android.os.Process.myPid());

带对话框的代码:

new AlertDialog.Builder(this).setTitle(“退出”).setMessage(“确定吗?”)

.setPositiveButton(“是”, new OnClickListener() {

@Override

public void onClick(DialogInterface dialog, int which) {

android.os.Process.killProcess(android.os.Process.myPid());

}

}).setNegativeButton(“否”, null).show();

8、android-support-v4.jar源码关联

移除 Android Dependencies

在libs下 右键 android-support-v4.jar Build Path ->Add To Build Path

重新选择android的版本可以重新生成Android Dependencies

资源地址:http://www.cnblogs.com/hanleytowne/archive/2013/01/24/android-support-v4.html

9、禁止 activity 睡眠、Android中设置禁止休眠

getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

资源地址:http://abc20899.iteye.com/blog/1045537

10、2016-02-14

Android快速开发系列 10个常用工具类 http://blog.csdn.net/lmj623565791/article/details/38965311

Android 面试精华题目总结 http://blog.csdn.net/lmj623565791/article/details/24015867

Android AutoLayout全新的适配方式 堪称适配终结者 (Android开发可以直接使用px单位了!)http://blog.csdn.net/lmj623565791/article/details/49990941

浅谈 MVP in Android http://blog.csdn.net/lmj623565791/article/details/46596109

Android Context 上下文 你必须知道的一切 http://blog.csdn.net/lmj623565791/article/details/40481055

11、Android下载-FileDownloader

https://github.com/lingochamp/FileDownloader

简介:Android 文件下载引擎,稳定、高效、简单易用、高并发、独立进程、自动断点续传

记录日期:2016-03-01

12、gradle 快速入门

http://www.cnblogs.com/CloudTeng/p/3417762.html

简介:中文资料

备注:gradle环境变量配置参考:http://jingyan.baidu.com/article/9225544684a97c851648f486.html

记录日期:2016-03-04

13、swiftkey输入法

简介:英文输入法全球排名第一,很好的支持小语种,现在已经支持中文输入

14、Android 学习资料收集

简介:书籍、开发环境/工具、博客、社区、开源项目学习、Android 开发者杂志周刊、Awesome 系列(这个相当不错)、动画系列、Material Design 设计、素材、开源库收集、设计模式、实践篇等

15、【移动适配】移动Web怎么做屏幕适配(一)

简介:https://segmentfault.com/a/1190000004524243s

16、Android Parcelable和Serializable的区别

简介:阅读以下3篇文章可以理解

http://blog.csdn.net/djun100/article/details/9667283

http://lydia-fly.iteye.com/blog/2029269

Android Serializable与Parcelable原理与区别 http://www.2cto.com/kf/201403/288476.html

重点摘要:

为什么要将对象序列化?

1、永久性保存对象,保存对象的字节序列到本地文件中;

2、用过序列化对象在网络中传递对象;

3、通过序列化对象在进程间传递对象。

作用

Serializable的作用是为了保存对象的属性到本地文件、数据库、网络流、rmi以方便数据传输,当然这种传输可以是程序内的也可以是两个程序间的。而Android的Parcelable的设计初衷是因为Serializable效率过慢,为了在程序内不同组件间以及不同Android程序间(AIDL)高效的传输数据而设计,这些数据仅在内存中存在,Parcelable是通过IBinder通信的消息的载体。

效率及选择

Parcelable的性能比Serializable好,在内存开销方面较小,所以在内存间数据传输时推荐使用Parcelable,如activity间传输数据,而Serializable可将数据持久化方便保存,所以在需要保存或网络传输数据时选择Serializable,因为android不同版本Parcelable可能不同,所以不推荐使用Parcelable进行数据持久化。

两种都是用于支持序列化、反序列化话操作,两者最大的区别在于存储媒介的不同,Serializable使用IO读写存储在硬盘上,而Parcelable是直接在内存中读写,很明显内存的读写速度通常大于IO读写,所以在Android中通常优先选择Parcelable。

实现Parcelable接口

1)为什么要实现Parfcelable接口来实现在Intent中传递对象?

a、在使用内存的时候,Parcelable比Serializable性能高,所以推荐使用Parcelable类。

b、Serializable在序列化的时候会产生大量的临时变量,从而引起频繁的GC。

注意:Parcelable不能使用在将数据存储在磁盘上的情况,因为Parcelable不能很好的保存数据的持续性在外界有变化的情况下。因此在这种情况下,建议使用Serializable

2) Android中的新的序列化机制
在Android系统中,针对内存受限的移动设备,因此对性能要求更高,Android系统采用了新的IPC(进程间通信)机制,要求使用性能更出色的对象传输方式。因此Parcel类被设计出来,其定位就是轻量级的高效的对象序列化和反序列化机制。
Parcel的序列化和反序列化的读写全是在内存中进行,所以效率比JAVA序列化中使用外部存储器会高很多。


Parcel类

就应用程序而言,在常使用Parcel类的场景就是在Activity间传递数据。在Activity间使用Intent传递数据的时候,可以通过Parcelable机制传递复杂的对象。

Parcel机制:本质上把它当成一个Serialize就可以了。只是Parcel的对象实在内存中完成的序列化和反序列化,利用的是连续的内存空间,因此更加高效。

17、开源协议选择

简介:http://www.cnblogs.com/Wayou/p/how_to_choose_a_license.html

被推荐的三种许可证 MIT、Apache 和 GPL

18、设计参考

图标: https://github.com/google/material-design-icons

https://github.com/neokree/MaterialNavigationDrawer

https://github.com/rey5137/material

https://github.com/code-mc/material-icon-lib

youtube效果https://github.com/pedrovgs/DraggablePanel

https://github.com/ppamorim/Dragger

填写信息:https://github.com/fenjuly/ToggleExpandLayout

按钮效果:https://github.com/dmytrodanylyk/circular-progress-button https://github.com/dmytrodanylyk/android-process-button

斜标签:https://github.com/linger1216/labelview

动态移动:https://github.com/askerov/DynamicGrid

RecycleVIew分割线:https://github.com/yqritc/RecyclerView-FlexibleDivider

可能是根据字母快速移动:https://github.com/danoz73/RecyclerViewFastScroller

学习实现方法:https://github.com/magiepooh/RecyclerItemDecoration

引导页:https://github.com/ongakuer/CircleIndicator https://github.com/sacot41/SCViewPager

圆形背景的字母:https://github.com/pavlospt/RoundedLetterView https://github.com/amulyakhare/TextDrawable

有趣:https://github.com/cooltechworks/BitmapMerger

图片马赛克:https://github.com/DanielMartinus/Pixelate

圆形进度条:https://github.com/lzyzsd/CircleProgress

有趣的下载进度条:https://github.com/Tibolte/ElasticDownload

加载小图标:https://github.com/81813780/AVLoadingIndicatorView

点击效果有光圈的菜单:https://github.com/Yalantis/Side-Menu.Android

菜单特效:https://github.com/Yalantis/Context-Menu.Android

https://github.com/flavienlaurent/NotBoringActionBar

对话框:https://github.com/orhanobut/dialogplus https://github.com/H07000223/FlycoDialog_Master https://github.com/pedant/sweet-alert-dialog

轮播图:https://github.com/daimajia/AndroidImageSlider

微信雷达效果:https://github.com/skyfishjy/android-ripple-background

文字围绕在图片周围:https://github.com/Narfss/ParallaxEverywhere

背景模糊的Dialog:https://github.com/tvbarthel/BlurDialogFragment

模糊处理:https://github.com/faradaj/BlurBehind

屏幕破碎效果:https://github.com/zhanyongsheng/BrokenView

Bootstrap风格按钮:https://github.com/Bearded-Hen/Android-Bootstrap

画图板:https://github.com/PaNaVTEC/DrawableView

声波:https://github.com/tyorikan/voice-recording-visualizer

字体:https://github.com/vsvankhede/easyfonts

可以动的线条:https://github.com/txusballesteros/snake

这个处理图片专业:facebook出品

http://www.fresco-cn.org/

Android 三大图片缓存原理、特性对比 http://www.trinea.cn/android/android-image-cache-compare/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android