
android
文章平均质量分 72
treeshy
In any relationship it's important to have boundaries that are respeceted by all parties involved.
展开
-
android *** AsyncTask 代码
http://android-doc.com/reference/android/os/AsyncTask.htmlxml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmln原创 2016-02-05 21:43:59 · 568 阅读 · 1 评论 -
android *** TimePickerDialog && DatePickerDialog
javapackage com.example.tree;import android.support.v7.app.ActionBarActivity;import android.text.Html;import android.text.Spanned;import android.text.method.LinkMovementMethod;import android.u原创 2016-02-04 11:58:33 · 209 阅读 · 0 评论 -
context部分解释
转载必须注明出处 :http://blog.youkuaiyun.com/qinjuning 前言:本文是我读《Android内核剖析》第7章 后形成的读书笔记 ,在此向欲了解Android框架的书籍推荐此书。 大家好, 今天给大家介绍下我们在应用开发中最熟悉而陌生的朋友-----Context类 ,说它熟悉,是应为我们在开发转载 2016-03-04 09:07:42 · 255 阅读 · 0 评论 -
java读取文件的两种方法:java.io和java.lang.ClassLoader
java读取文件的两种方法:java.io和java.lang.ClassLoader什么时候使用java.io,什么时候使用java.lang.ClassLoader呢?(注:要是之前读xml文件时清晰知道java读取文件有这两种方法就好了!可以少走很多去理解相对路径的弯路!)自己的总结:*java.io:相对于当前用户目录的相对路径读取;注重与磁盘文件打交道或者纯j转载 2016-03-04 09:15:23 · 268 阅读 · 0 评论 -
深入分析Java ClassLoader原理
转载地址:http://blog.youkuaiyun.com/xyang81/article/details/7292380一、什么是ClassLoader? 大家都知道,当我们写好一个Java程序之后,不是管是CS还是BS应用,都是由若干个.class文件组织而成的一个完整的Java应用程序,当程序在运行时,即会调用该程序的一个入口函数来调用系统的相关功能,而这些功能都被封转载 2016-03-04 09:39:54 · 218 阅读 · 0 评论 -
Android中Parcelable接口用法
1. Parcelable接口Interface for classes whose instances can be written to and restored from a Parcel。 Classes implementing the Parcelable interface must also have a static field called CREATOR, which i转载 2016-03-04 10:06:18 · 236 阅读 · 0 评论 -
Android 内核--Context对象
http://www.cnblogs.com/a284628487/p/3188215.htmlContext(在Android中翻译为场景):一个Activity就是一个Context,一个Service也是一个Context,应用程序中有多少个Activity或者Service,就会有多少个Context对象; Android把"场景"抽象为Context类,用户和操作系统的每一次转载 2016-03-04 10:26:41 · 245 阅读 · 0 评论 -
android *** ProgressDialog
http://android-doc.com/reference/android/app/ProgressDialog.htmlxml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"原创 2016-02-04 18:10:38 · 230 阅读 · 0 评论 -
android *** Toast
可以用toast加载一个xml出来主xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:android1="http://schemas.android.com/a原创 2016-02-04 18:58:47 · 243 阅读 · 0 评论 -
android *** 自定义Dialog
通过dialog弹出一个对话框主xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:android1="http://schemas.android.com原创 2016-02-04 19:25:47 · 289 阅读 · 0 评论 -
Android实现数据存储技术
转载地址:http://www.cnblogs.com/hanyonglu/archive/2012/03/01/2374894.html 本文介绍Android中的5种数据存储方式。 数据存储在开发中是使用最频繁的,在这里主要介绍Android平台中实现数据存储的5种方式,分别是:1 使用SharedPreferences存储数据2 文件存储数据3 SQLite数转载 2016-03-05 11:22:05 · 302 阅读 · 0 评论 -
Failed to find the style corresponding to the id 2130772027
Failed to find the style corresponding to the id 2130772027Failed to find the style corresponding to the id 2130771996java.lang.NullPointerExceptionFailed to load AppCompat ActionBar with unknow原创 2016-03-19 15:26:56 · 1747 阅读 · 0 评论 -
java.lang.IllegalArgumentException: column '_id' does not exist
关闭java.lang.IllegalArgumentException: column '_id' does not exist标签: eclipse数据库sqliteincludenulllayout2012-01-18 23:55 3888人阅读 评论(9)收藏举报本文章已收录于:在使用SimpleCur转载 2016-03-22 09:52:11 · 386 阅读 · 0 评论 -
Android R.java文件丢失的原因
今天手贱把string.xml删掉了,然后clean一下之后懵逼了。。。。r文件不见了。。。然后下面是转载的内容。。。 R.java这个文件是会自动生成的。但是有时候你写错xml文件的时候,R.java是不会自动生成对应的值。这个时候我们会很习惯去clean一下这个项目,这个时候会突然发现,R.java竟然不见了。 这个时候的你肯定非常的气转载 2016-02-28 15:39:34 · 329 阅读 · 0 评论 -
Android SQLite性能分析
作为Android预置的数据库模块,对SQLite的深入理解是非常有必要的,可以从中找到一些优化的方向。这里对SQLite的性能和内存进行了一些测试分析,对比了不同操作的执行性能和内存占用的情况,粗略地列在这里算是作个小结。1. 基本架构先了解一下SQLite主要架构 (详见《The Definitive Guide to SQLite》), 需要关注的是Compiler和转载 2016-03-24 10:32:58 · 379 阅读 · 0 评论 -
Android *** android-doc阅读《进程与线程》
青色为引用doc内容,黑色是自己的感受~如果某个应用程序组件是第一次被启动,且这时应用程序也没有其他组件在运行,则Android系统会为应用程序创建一个包含单个线程的linux进程。默认情况下,同一个应用程序的所有组件都运行在同一个进程和线程里(叫做“main”主线程)。如果组件启动时,已经存在应用程序的进程了(因为应用程序的其它组件已经在运行了),则此组件会在已有的进程和线程中启动运原创 2016-05-03 09:38:27 · 308 阅读 · 0 评论 -
Android *** Error: cannot resolve symbol bindingadapter
今天开始使用bindingadapter注释的时候却发现怎么也导不了import android.databinding.BindingAdapter;BindingAdapter始终显示红色错误提示,弄了一个多小时才发现自己没有在主module的build.gradle下配置好,参考这篇官方文档:https://developer.android.com/topic/libraries/原创 2016-09-13 12:49:41 · 2141 阅读 · 0 评论 -
Android *** transition不起作用
写acitivity之间的动态效果的时候发现没有动态效果。。。于是发现自己忘了加ActivityOptions transitionActivityOptions = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, sharedView, transitionName);。。。。以及。。。a原创 2016-09-13 21:01:59 · 1610 阅读 · 0 评论 -
android *** AlertDialog
今天学习了android的AlertDialog。网址http://android-doc.com/reference/android/app/Dialog.htmlxml文件如下<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://sche原创 2016-02-04 11:29:03 · 239 阅读 · 0 评论 -
Activity的生命周期
Activities在系统中是以Activity栈的形式存在的。当一个新的Activity被开始时,这个Activity就被放在了栈的顶端,并且变成了现在正在运行的Activity,而在这个新Activity开始running之前的那个Activity被这个新的Activity压了下去,而且直到这个新的Activity退出之前都不会再出现。一个Activity有这四个状态:1:如果一个Ac转载 2016-03-03 21:22:57 · 349 阅读 · 0 评论 -
Android Context完全解析,你所不知道的Context的各种细节
转载请注明出处:http://blog.youkuaiyun.com/guolin_blog/article/details/47028975前几篇文章,我也是费劲心思写了一个ListView系列的三部曲,虽然在内容上可以说是绝对的精华,但是很多朋友都表示看不懂。好吧,这个系列不仅是把大家给难倒了,也确实是把我给难倒了,之前为了写瀑布流ListView的Demo就写了大半个月的时间。那么本篇文章我们就讲点转载 2016-03-03 20:22:58 · 232 阅读 · 0 评论 -
android *** Activity 01
初次接触android开发,知道android是由一个一个活动组成的。。。写了一个主界面控制副界面的代码。android里的目录:src存java代码;gen存android资源文件标识符,不需要自己维护;assets保存应用的资源文件,如音频或视频等不经常被用户修改的文件;bin包含编译生成的apk的应用程序xx.apk;lib包含第三方类库jar包;res中drawable高清超高清文件,原创 2016-01-29 20:19:55 · 468 阅读 · 0 评论 -
android *** Activity 02
学习了activity的值回传,用到了startActivityForResult(Intent intent,int requestCode),setResult(int resultCode,Intent data),重写了onActivityResult(int requestCode,int resultCode,Intent data)。具体代码如下Mai原创 2016-01-30 13:03:41 · 258 阅读 · 0 评论 -
android *** Activity 03
昨天开了一个公众号,写点小故事,自己的,别人的,也可能是瞎编的,希望我的观众会喜欢。今天学习Activity的生命周期,不是很熟,大概写一下吧。以下内容皆为引用http://android-doc.com/guide/components/activities.htmlactivity可能处于三种基本的状态:Resumed activity在屏幕的前台并且拥有用户的焦点。原创 2016-01-30 20:52:00 · 384 阅读 · 0 评论 -
android *** Layout 01
学习了android xml的线性布局<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientat原创 2016-01-31 14:33:43 · 203 阅读 · 0 评论 -
android *** Layout 02
相对布局主要是这个android:layout_alignParentTopIf "true", makes the top edge of this view match the top edge of the parent.android:layout_centerVerticalIf "true", centers this child vertically within i原创 2016-01-31 16:19:43 · 199 阅读 · 0 评论 -
android *** Layout 03
layout下的一些方法说明 android:background="#CCDDCC",为布局添加背景颜色 android:layout_width="wrap_content",布局的长宽 android:layout_height="wrap_content" android:layout_marginLeft原创 2016-01-31 21:12:46 · 232 阅读 · 0 评论 -
android *** Layout 04
今天学习了grid布局,android api里讲的还是比较细致了,就直接贴网站吧http://android-doc.com/guide/topics/ui/layout/gridview.html话说我真是越来越懒了。。。原创 2016-02-01 09:40:44 · 220 阅读 · 0 评论 -
android *** Layout 05 button
写了一下button,大概用法 http://android-doc.com/guide/topics/ui/controls/button.html 里就讲的很清楚了,主要是在button的setOnClickListener里面有一些特别的给activity implements一个OnClickListener接口,这个接口如下: public interface OnClic原创 2016-02-01 11:39:08 · 221 阅读 · 0 评论 -
android *** Layout 06 RadioButton && ToggleButton && Switch
都很简单,基本上从 http://android-doc.com/guide/topics/ui/controls/togglebutton.html 这上面都可以学习到的东西,但是还是贴一下代码好了对于radiobutton,在xml下先注册一个radiogroup,然后在其下写几个单选的radiobutton,radiobutton下注册onClick,然后在相应的activity原创 2016-02-01 13:56:51 · 245 阅读 · 0 评论 -
android *** Layout 07 EditText
学一个写一个。。。。照例贴地址。。。http://android-doc.com/guide/topics/ui/controls/text.html先废话几句,最开始在activity.java文件里面写Button button;button=(Button)this.findViewById(R.id.button1);居然报错了 !!!android.wid原创 2016-02-01 15:21:00 · 242 阅读 · 0 评论 -
android *** Layout 08 AutoCompleteTextView && Adapter
学了一个AutoCompleteTextView与适配器,适配器贴个网站就ok了http://blog.youkuaiyun.com/fznpcy/article/details/8658155AutoCompleteTextView主要还是靠适配器,有两种方式,一种是直接在activity里面设置,一种是在xml里面设置。另外在AutoCompleteTextView的输入框里,只有输入两个字符原创 2016-02-01 16:54:30 · 262 阅读 · 0 评论 -
android *** Layout 09 CheckBox
照例贴地址,东西都比较简单。http://android-doc.com/guide/topics/ui/controls/checkbox.html在xml下新建几个CheckBox,然后在checkbox下注册onClick即可activity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/原创 2016-02-01 18:23:37 · 242 阅读 · 0 评论 -
android *** Layout 10 DatePicker && TimePicker
照例贴地址,http://android-doc.com/guide/topics/ui/controls/pickers.html主要还是监听器的设置。xml文件如下<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.an原创 2016-02-01 18:53:00 · 452 阅读 · 0 评论 -
android *** Layout 11 ProgressBar && RatingBar && SeekBar
ProgressBar是进度条,网站 http://android-doc.com/reference/android/widget/ProgressBar.htmlxml代码<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schema原创 2016-02-01 20:00:45 · 316 阅读 · 0 评论 -
android *** Layout 12 Spinner
Spinner为向下拉取选择,主要还是在于创建一个adapter获取数据或者直接在xml中定义数据,以及监听器的设置,这里的监听器是用接口来实现的地址为 http://android-doc.com/guide/topics/ui/controls/spinner.html中间还出了一个错:activity_main cannot be resolved or is not a field原创 2016-02-01 21:07:38 · 686 阅读 · 0 评论 -
android *** Layout 13 ScrollView
http://android-doc.com/reference/android/widget/ScrollView.html网址如下,ScrollView视图主要是给用户一个滚动的窗口,然后ScrollView里面只有一个LinearLayout的 布局,且只能有这一个,其余其他的内容只能在linearLayout里面添加。再有就是可以直接在xml下的文件里给linearLayout添加原创 2016-02-02 20:00:15 · 273 阅读 · 0 评论 -
android *** Layout 13 Adapter
网站如下http://android-doc.com/reference/android/widget/Adapter.html网站里对Adapter介绍很清楚,主要是将数据库里的一些复杂数据转化成为能够看见的数据,好比显示器将电流转化成图像信息。贴一个http://blog.youkuaiyun.com/a_large_swan/article/details/7535337然后就可原创 2016-02-02 21:31:46 · 432 阅读 · 0 评论 -
Android *** android studio Error:Failed to resolve: com.android.support:appcompat-v7:23.+
下午装了android studio,然后新建一个helloworld的project却报了这么一个错误:android studio Error:Failed to resolve: com.android.support:appcompat-v7:23.+网上没有什么好的答案,后来我在sdk manager里面把extras里面的android support repository下载之后原创 2016-09-05 19:41:08 · 5811 阅读 · 1 评论