白小绿

白小绿的笔记

来自Android开发视频教程5(2)

一个Intent对象包含了一组信息:Component nameActionDataCatagoryExtras----都是键值对Flags 可以启动另一个Activiy:Activity02.this.startActivity(intent);视频中有句代码应改为class MyButtonListener implements android.view.View.OnClickListener{}activity02.java中的代码应该为package bxl.activity_02;import android.os.Bundle;import android.app.Activity;import android.content.Intent;import android.view.View;import android.widget.Button;public class Activity02 extends Activity { private Button myButton = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_activity02); myButton = (Button)findViewById(R.id.myButton); myButton.setText(R.string.app_name);myButton.setOnClickListener(new MyButtonListener()); } class MyButtonListener implements android.view.View.OnClickListener{@Overridepublic void onClick(View v) { // TODO Auto-generated method stub //生成一个Intent对象 Intent intent = new Intent(); intent.setClass(Activity02.this, OtherActivity.class);Activity02.this.startActivity(intent); } }} Intent可以调用不同应用程序中的Activity发短信:Uri uri=Uri.parse("smsto://18086241796"); Intent intent=new Intent(Intent.ACTION_SENDTO,uri); intent.putExtra("sms_body", "The SMS text"); startActivity(intent); 

来自诺曼人入侵(1)

The History of English in Ten Minuteschapter 2 The Norman Conquest or excuse my English1066 True to his name, William the Conqueror invades Britain, bringing new concepts from across the channel like the French language, the Doomsday book and the duty free Galois's multipack.French was de rigeur for all official business, with words like 'judge', 'jury', 'evidence' and 'justice' coming in and giving John Grisham's career a kick-start. Latin was still used ad nauseam in Church, and the common man spoke English able to communicate only by speaking more slowly and loudly until the others understood him. Words like 'cow', 'sheep' and 'swine' come from the English-speaking farmers, while the a la carte versions - 'beef', 'mutton' and 'pork' come from the French-speaking toffs beginning a long running trend for restaurants having completely indecipherable menus.All in all, the English have enrolled about 10,000 new words from the Norman. But they still couldn't draft the Lord with...The bonhomie all ended when the English nation took their new warlike lingo of 'armies', 'navies' and 'soldiers' and began the Hundred Years War against France. It actually lasted 116 years, but by the point on one could count any higher in French and English took over as the language of power.

来自莎士比亚(1)

chapter 3 Shakespeare or a plaque on both his housesAs the dictionary tell us, about 2000 new words and phrases were invented by Shakespeare. He gave us handy words like 'eyeball', 'puppy-dog' and 'anchovy' and more show-offy words like 'dauntless', 'besmirch' and 'lacklustre'. He came up with the word 'alligator' soon after he ran out of things to rhyme with 'crocodile'.And a nation of tea-drinkers finally took him to their hearts when he invented the 'hobnob'. Shakespeare knew the power of catchphrases as well as biscuits. Without him we would never eat our 'flesh and blood' 'out of house and home' we'd have to say 'good riddance' to 'the green-eyed monster' and 'breaking the ice' would be 'as dead as a doornail'.If you tried to get your 'money''s worth' you'd be given 'short shrift' and anyone who 'laid it on with a 'trowel' could be 'hoist with his own petard'. Of course it's possible other people used these words first, but the dictionary writers liked looking them up in Shakespeare because there was more cross-dressing and people poking each other's eyes out.Shakespeare's poetry showed the world that English was a language as rich vibrant  language with limitless expressive and emotional power. And he still had time to open all those tearooms in Stratford.

来自Java4Android 41 Java中类集框架-1(1)

类集框架是一组类和接口,位于java.util包中,主要用于存储和管理对象,主要分为集合、列表和映射三大类。集合(Set):对象不按特定方式排序且没有重复对象列表(List):对象按照索引位置排序,可以有重复对象映射(Map):每个元素包含一个键对象和一个值对象,键不可以重复,值可以重复 

来自Android开发视频教程13(0)

xml文件中android:visibility="gone"  设置进度条不可见java程序中firstBar.setVisibility(View.VISIBLE);设置进度条可见声明List ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();HashMap中存放的是键值对声明HashMapHashMap<String, String> map1 = new HashMap<String, String>();

来自Android开发视频教程6(0)

Android平台可以根据用户手机的语言选择调用哪种语言版本的strings.xml文件Activity03.java中的代码如下:package bxl.activity_03;import android.os.Bundle;import android.app.Activity;import android.content.Intent;import android.view.Menu;import android.view.MenuItem;import android.view.View;import android.widget.Button;import android.widget.EditText;import android.widget.TextView;/* * 1.声明四个控件 * 2.为其中两个控件设置显示的值 * 3.创建一个监听器类,监听按钮按下的事件 * 4.将监听器类的对象绑定在按钮对象上 */public class Activity03 extends Activity { private EditText factorOne = null; private TextView symbol = null; private EditText factorTwo = null; private Button calculate = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //取得控件对象 factorOne =(EditText)findViewById(R.id.factorOne); symbol =(TextView)findViewById(R.id.symbol); factorTwo =(EditText)findViewById(R.id.factorTwo); calculate =(Button)findViewById(R.id.calculate); //为其中俩控件设置显示的值 symbol.setText(R.string.symbol); calculate.setText(R.string.calculate); //将监听器绑定到按钮对象上 calculate.setOnClickListener(new CalculateListener()); } @Override //当客户点击MENU时调用该方法 public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, 1, 1, R.string.exit); menu.add(0, 2, 2, R.string.about); return super.onCreateOptionsMenu(menu); }//当客户点击MENU中的某个选项时调用该方法 @Override public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId()==1){ finish(); } return super.onOptionsItemSelected(item); } class CalculateListener implements android.view.View.OnClickListener{@Override public void onClick(View v) { // 取得两个EditText的值 String factorOneStr = factorOne.getText().toString(); String factorTwoStr = factorTwo.getText().toString(); // 将这两个值存放到Intent对象中 Intent intent = new Intent(); intent.putExtra("one", factorOneStr); intent.putExtra("two", factorTwoStr); intent.setClass(Activity03.this, ResultActivity.class); // 使用这个Intent对象来启动ResultActivity startActivity(intent); } }}

来自Android开发视频教程1(0)

25美元许可证 持久使用java支持FlashAndroid四大天王:Activity、Intent、Service、Content Provider工具:Android SDK、Eclipse及其插件金矿:卖软件、卖广告(靠谱)

来自Android开发视频教程14(0)

下载文件和Activity是两个线程,提升用户体验实现线程的两种方法:1.继承Thread类2.实现Runnable接口线程的状态:就绪、运行、阻塞、死亡消息队列:先进先出 

来自Android开发视频教程2(0)

搭建Android开发环境:Android SDK的安装(SDK:命令和类库)ADT的安装和配置(Eclipse插件提高开发效率)Android模拟器的配置 

来自Android开发视频教程7(0)

onCreate()---Called when the activity is first createdonStart()          onRestart()onResume()onPause()onStop()---Called when the activity is no longer visible to the useronDestory()---This can happen either because the activity is finishing (someone called finish() )on it, or because the system is temporarily destroying this instance of the activity to save space

来自Stopping and Restarting an Activity(0)

Notice that no matter what scenario causes the activity to stop, the system always calls onPause() before calling onStop()

来自Android开发视频教程8(0)

A task is a stack of activities.Task可以把不同应用程序中的Activity组织到一起,提高用户体验。要显示窗口模式的Activity,需要在Manifest.xml中设置Activity android.theme的属性为Dialog

来自Android开发视频教程9(0)

Alt+/可以调用代码助手xml文件的注释格式为<!---->列数从0开始

来自Android开发视频教程10(0)

layout_weight属性比较复杂,不同的情况下展示的效果都不同

来自Android开发视频教程11(0)

相对布局 Relative Layoutpadding 内边距margin 外边距 安卓中显示单位:px和dip以及sp的讲解  Xml代码:  <EditText  android:id="@+id/edittext"  android:layout_width="fill_parent"  android:layout_height="wrap_content"  android:textSize="20sp"  />  如上,在android界面布局中形如 android:textSize="20sp" 这样的代码中属性值单位sp代表的是一个距离值。  android 中一般支持如下常用的距离单位:  px (pixels)像素:  每个px对应屏幕上的一个点,这个用的比较多。  dip或dp (device independent pixels)设备独立像素:  一种基于屏幕密度的抽象单位,在每英寸160点的显示器上,1dip=1px。  但随着屏幕密度的改变,dip和px的换 算会发生改变。  这个和设备硬件有关,一般我们为了支持WVGA、HVGA和QVGA cwj推荐使用这个,不依赖像素。  sp (scaled pixels — best for text size) 放大像素:  主要处理字体的大小。可以根据用户字体大小首选项进行缩放。  in (inches)英寸:标准长度单位  mm (millimeters)毫米:标准长度单位  pt (points)点:标准长度单位,1/72 英寸

来自Recreating an Activity(0)

Your activity will be destroyed and recreated each time the user rotates the screen. The saved data that system uses to restore the previous state is called the "instance state" and is a collection of key-value pairs stored in a bundle object. 

来自基础入门(0)

文档及作业下载:http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2011-fall

来自各种基础的类,功能,对象和实例的介绍(0)

Class is a blueprint for instances.Instance: a specific allocation of a classMethod: a function that an object knows how to performInstance Variable(or ''ivar"): a specific piece of data belonging to an object.Encapsulation: keep implementation private and separate from interfacePolymorphism: different objects, same interfaceInheritance: hierarchical organization, share code, customize or extend behaviors.Objective-CStrict superset of CMix C with ObjCOr even C++ with ObjC (usually referrend to as ObjC++)A very simple language, but some new syntaxSingle inheritance, classes inherit from one and only one superclassProtocols define behavior that cross classesDynamic runtimeLoosely typed, if you'd likeClasses and ObjectsClasses declare state and behaviorState (data) is maintained using instance variablesBehavior is implemented using methodsInstance variables typically hidden Accessible only using getter/setter methodsDot Syntaxconvenient shorthand for invoking accessor methodsfloat height = [person height];foat height = person.height;[person setHeight:newHeight];person.height = newHeight;[[person child] setHeight:newHeight];// exactly the same asperson.child.height = newHeight;Dynamic and static typingDynamically-typed object              id anObjectStatically-typed object      Person *anObject Objects represented in format strings using %@ 

来自Android开发视频教程4(0)

Activity实际上是控件的容器R.java是自动生成的,不能更改。创建Activity的要点1.一个Activity就是一个类,并且这个类要继承Activity2.需要复写onCreate方法3.每个Activity都需要在AndroidManifest.xml文件中配置4.为Activity添加必要的控件当一个Activity第一次运行时,就会调用onCreate方法\n是换行

来自iPhone开发概述-必看(0)

iOS设备iPod touchiPhoneiPadMac OS XMacbookMacbook ProMacbook AiriMac掌握原理最重要读、仿、写、查大胆写代码,大胆调试Debug