This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
– Makefile (全局的Makefile文件) | |
– bionic (Bionic含义为仿生,这里面是一些基础的C库源代码) | |
– bootloader (引导加载器) | |
build目录中的内容不是目标所用的代码,而是编译和配置所需要的脚本和工具) | |
– build (build目录中的内容不是目标所用的代码,而是编译和配置所需要的脚本和工具) | |
– cts (Android兼容性测试套件标准) | |
– libcore (核心库相关) | |
Dalvik虚拟机 针对嵌入式设备优化的Java | |
Java虚拟机) | |
– dalvik ( Dalvik虚拟机,针对嵌入式设备优化的Java虚拟机) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This class holds the per-item data in our Loader. | |
*/ | |
public static class AppEntry { | |
public AppEntry(AppListLoader loader, ApplicationInfo info) { | |
mLoader = loader; | |
mInfo = info; | |
mApkFile = new File(info.sourceDir); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy from | |
// http://stackoverflow.com/a/2175688/1350593 | |
public class ExampleActivity extends Activity implements LoaderManager.LoaderCallbacks<Cursor> { | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
getLoaderManager().initLoader(0, null, this); | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Links&Blogs: | |
http://developer.android.com/guide/components/index.html | |
http://developer.android.com/training/index.html | |
http://www.vogella.com/tutorials.html | |
http://cyrilmottier.com/ | |
Books: | |
http://book.douban.com/subject/6902972/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implement this method to intercept all touch screen motion events. This | |
* allows you to watch events as they are dispatched to your children, and | |
* take ownership of the current gesture at any point. | |
* | |
* <p>Using this function takes some care, as it has a fairly complicated | |
* interaction with {@link View#onTouchEvent(MotionEvent) | |
* View.onTouchEvent(MotionEvent)}, and using it requires implementing | |
* that method as well as this one in the correct way. Events will be | |
* received in the following order: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
我现在用的是这个: | |
https://github.com/kevinsawicki/http-request | |
最近比较热门的有这个: | |
http://square.github.io/okhttp/ | |
2013 Google I/O讲了一个新的: | |
https://developers.google.com/events/io/sessions/325304728 | |
https://android.googlesource.com/platform/frameworks/volley/+/master [source code] | |
http://www.javacodegeeks.com/2013/06/android-volley-library-example.html [example] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoadMoreListView extends ListView implements OnScrollListener { | |
private static final String TAG = "LoadMoreListView"; | |
/** | |
* Listener that will receive notifications every time the list scrolls. | |
*/ | |
private OnScrollListener mOnScrollListener; | |
private LayoutInflater mInflater; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A {@link HttpRequest.ConnectionFactory connection factory} which uses OkHttp. | |
* <p/> | |
* Call {@link HttpRequest#setConnectionFactory(HttpRequest.ConnectionFactory)} with an instance of | |
* this class to enable. | |
*/ | |
public class OkConnectionFactory implements HttpRequest.ConnectionFactory { | |
private final OkHttpClient client; | |
public OkConnectionFactory() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String getLocalizedName(Resources res, int bucketId, | |
String name) { | |
if (bucketId == MediaSetUtils.CAMERA_BUCKET_ID) { | |
return res.getString(R.string.folder_camera); | |
} else if (bucketId == MediaSetUtils.DOWNLOAD_BUCKET_ID) { | |
return res.getString(R.string.folder_download); | |
} else if (bucketId == MediaSetUtils.IMPORTED_BUCKET_ID) { | |
return res.getString(R.string.folder_imported); | |
} else if (bucketId == MediaSetUtils.SNAPSHOT_BUCKET_ID) { | |
return res.getString(R.string.folder_screenshot); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2012 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
OlderNewer