1.右键->source->genearate getter and setter 快捷方式生成get和set方法
2.服务器端java EE 开发参考:http://www.ibm.com/developerworks/cn/opensource/os-eclipse-tomcat/
3.设置横屏
Xml代码
android:screenOrientation="landscape"
或者在代码中:
Java代码
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
3.网络服务许可 <uses-permissionandroid:name="android.permission.INTERNET" />
4.android的形式是对话框用android:theme="@android:style/Theme.Dialog"
5.添加控制台的窗口 windows-show view
6.判断一个文本框中的值是否为空if("".equals(input_user_name.getText().toString().trim()))
不为空 str != null && str.length() > 0
7.在界面中加入一个图片<imageView android:src=”@drawable/” >
8.改变按钮的颜色android:background
9. android:autoLink="all" 设置超文本链接
android:textSize="18sp"文本大小
android:password="true"是否密码
android:background="@color/white" 背景色/也可以
是xml配置
android:textColor="@文本颜色
android:gravity="center_vertical|center_horizontal"
文字起始头位置
style="@style/myStyle_Text1"
10.修改字体显示大小:
1:进入设置窗口 windows -> preferences
2:进入修改字体的选项卡。 General -> Appearance -> Colors andFonts
3:选中"Basic"子选项里的"TextFont"。
4:点右边那个"Edit"按钮,修改字体。
11.修改默认编码格式,如将GBK修改为UTF-8:
1:进入设置窗口 windows -> preferences
2:进入工作空间设置选项卡。 General ->WorkSpace
3:找个Text File encoding,选择other,即可设置不同的编码格式,如选择UTF-8,点击应用保存即可;
12.决定先启动哪一个activity是根据声明的顺序的。13.
android:phoneNumber="true"//只能输入电话号码
Android:inputType="date"//设置文本类型
android:imeOptions=“//选择下面的名称”
14.java中换行/r/t
15.
1. actionUnspecified 未指定,对应常量EditorInfo.IME_ACTION_UNSPECIFIED.效果:
2. actionNone 没有动作,对应常量EditorInfo.IME_ACTION_NONE效果:
3. actionGo 去往,对应常量EditorInfo.IME_ACTION_GO 效果:
4. actionSearch 搜索,对应常量EditorInfo.IME_ACTION_SEARCH效果:
5. actionSend 发送,对应常量EditorInfo.IME_ACTION_SEND 效果:
6. actionNext 下一个,对应常量EditorInfo.IME_ACTION_NEXT 效果:
7. actionDone 完成,对应常量EditorInfo.IME_ACTION_DONE 效果:
16.判断json含有哪个键有json.has(" ").