上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 阅读:https://developer.android.com/training/graphics/opengl/environment.html接下来学学怎么使用OpenGL。首先,在manifest里声明:还要声明支持,不支持的手机不会运行你的程序:代码:public class OpenGLES20 extends Activity { private GLSurfaceView mGLView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(save... 阅读全文
posted @ 2013-11-05 20:11 yutoulck 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/displaying-bitmaps/index.htmlBitmap非常消耗内存,因此学会怎么处理它非常重要。有几点需要注意:1、安卓为每个系统分配16MB的内存使用,但这并不是一定的,有些限制会高点。2、Bitm... 阅读全文
posted @ 2013-11-05 16:53 yutoulck 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/camera/index.html先学学怎么从相机获取相片。首先要有权限: ...private void dispatchTakePictureIntent(int actionCode) { Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, actionCode);}//查询是否有程序能够照相public ... 阅读全文
posted @ 2013-11-04 21:00 yutoulck 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/managing-audio/index.html系统将音频流分为了很多种:stream for playing music, alarms, notifications, the incoming call ringer, system sounds, in-call volume, and DTMF tones.默认情况下,音量调整按钮控制当前正在活动的音频流。setVolumeControlStream(AudioManager.STREAM_MUSIC);使用上面的方法,就能让物理按键对当前声明的音频流 阅读全文
posted @ 2013-11-04 20:32 yutoulck 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 阅读并转自:http://blog.csdn.net/v_JULY_v/article/details/64194662010年中兴面试题编程求解:输入两个整数 n 和 m,从数列1,2,3.......n 中 随意取几个数,使其和等于 m ,要求将其中所有的可能组合列出来。 // 21题递归方法 //copyright@ July && yansha //July、yansha,updated。 #include #include using namespace std; listlist1; void ... 阅读全文
posted @ 2013-11-02 22:26 yutoulck 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/basics/intents/index.htmlImplicit intents指的是你没有明确指明哪个程序来启动,只是告诉了系统你的Action或者其他数据就行了,一般还带有Data。Uri number = Uri.parse("tel:5551234");Intent callIntent = new Intent(Intent.ACTION_DIAL, number);URI Data 的代码写法.// Map point based on addressUri location 阅读全文
posted @ 2013-11-02 11:43 yutoulck 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/basics/data-storage/index.htmlSharedPreferences适用于存储少量的键值对数据,由框架管理,可以只供本程序使用也可共享。Note: The SharedPreferences APIs are only for reading and writing key-value pairs and you should not confuse them with the Preference APIs, which help you build a user interface 阅读全文
posted @ 2013-11-02 00:22 yutoulck 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/basics/fragments/index.html关于低版本兼容Fragment的,V4支持包的Activity使用FragmentActivity,V7的使用ActionBarActivity。文字使用到了自适应,系统会根据屏幕的不同来选择不同的布局文件,所以当你要从代码进行不同的布局的时候,要根据布局文件的某些特征。import android.os.Bundle;import android.support.v4.app.FragmentActivity;public class MainActivi 阅读全文
posted @ 2013-11-01 22:22 yutoulck 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/guide/topics/resources/runtime-changes.html前言不再累述,就表达一种情况:有可能在Activity restart的时候,有些数据通过系统自带的onRestoreInstanceState()会有很糟糕的效果并且代价很高,因此你有两种选择:Retain an object during a configuration changeAllow your activity to restart when a configuration changes, but carry a statefu 阅读全文
posted @ 2013-11-01 18:45 yutoulck 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 阅读:https://developer.android.com/training/basics/activity-lifecycle/index.html这是ACtivity的状态以及各个方法的执行步骤,我们没有必要继承所有的方法,但是,有几个原则必须遵守,那就是:Does not crash if the user receives a phone call or switches to another app while using your app.Does not consume valuable system resources when the user is not activ 阅读全文
posted @ 2013-11-01 17:09 yutoulck 阅读(179) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页