- 博客(27)
- 收藏
- 关注
原创 android sdk --- Notification用法实例
需求:选择spinnerde代码:public class MainActivity extends Activity { private NotificationManager myNotiManager; private Spinner mySpinner; private ArrayAdapter myAdapter; private static final S
2014-09-10 09:26:46 655
原创 android sdk --- toast显示图片实例
需求:diani代码:public class MainActivity extends Activity { private Button mButton; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVi
2014-09-09 09:04:19 956
原创 android sdk--- 发送短信实例学习
需求: 代码:public class MainActivity extends Activity { private Button mButton; private EditText mEditText1; private EditText mEditText2; protected void onCreate(Bundle savedInstanceState
2014-09-05 09:08:43 718
转载 C++中的三种继承public,protected,private(转)
三种访问权限public:可以被任意实体访问protected:只允许子类及本类的成员函数访问private:只允许本类的成员函数访问 三种继承方式public 继承protect 继承private 继承 组合结果基类中 继承方式 子类中public & public继承 => publicpublic & protected继承
2014-09-04 14:28:48 662
原创 android sdk --- dial的用例
需求:在editText中输入号码,dianj代码:public class MainActivity extends Activity { private Button mButton; private EditText mEditText; protected void onCreate(Bundle savedInstanceState) { super.
2014-09-04 09:09:37 540
原创 android sdk——listView的用法
需求:效果: 代码:private static final String[] array = { "sunday","monday","tuesday","wednesday","thursday","friday","saturday", "one","two","three","four","five","six","seven","eight","nine
2014-08-22 09:48:48 622
转载 保存android的颜色数值
颜色和不透明度 (alpha) 值以十六进制表示法表示。任何一种颜色的值范围都是 0 到 255(00 到 ff)。对于 alpha,00 表示完全透明,ff 表示完全不透明。表达式顺序是“aabbggrr”,其中“aa=alpha”(00 到 ff);“bb=blue”(00 到 ff);“gg=green”(00 到 ff);“rr=red”(00 到 ff)。参考1:http://b
2014-08-22 09:47:10 1029
原创 编译——warning处理
1.missing braces around initializer发生在结构体中多维或多个数组初始化的时候,其错误发生的原因是没有用大括号明确的区分出初始化数据的归类如:
2014-08-19 10:14:20 990
原创 android sdk---ImageView的切换
eclipse 项目文件浏览界面消失了:jWINDOW--->SHOW VIEW-->Package Exploer
2014-08-14 09:21:17 536
原创 android sdk---checkBox多选实例
public CheckBox myCheckBox1; public CheckBox myCheckBox2; public CheckBox myCheckBox3; public TextView myTextView1; public TextView myTextView2; @Override protected void onCreate(Bun
2014-08-12 09:30:34 562
原创 android sdk---checkBox的用法实例
MainActivity.java代码:public CheckBox myCheckBox; public TextView myTextView1; public TextView myTextView2; public Button myButton; @Override protected void onCreate(Bundle savedInstan
2014-08-11 09:36:53 507
原创 记录toast使用例子
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); myTextView = (TextView)findViewById(R.id.textView1); myEdit
2014-08-07 22:34:07 791
原创 记录editText中 的 字符串 同步 显示在 textview中的代码
记录editText protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); myTextView = (TextView)findViewById(R.id.textView
2014-08-07 22:20:19 789
原创 google-sdk-动态更新手机主题(简单版)
参照google sdk 实例开发的例子:protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTheme(R.style.Theme_Transparent); setTheme(R.sty
2014-08-07 11:27:51 530
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人