上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: CharSequence string2=getString(R.string.yourWish); 阅读全文
posted @ 2013-12-24 13:39 爱编程hao123 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Toast.makeText(MainActivity.this,"提示",Toast.LENGTH_LONG).show(); 三个参数,一本身.this二 提示内容 三 参数 Toast.LENGTH_LONG 长时间 Toast.LENGTH_SHORT 短时间 阅读全文
posted @ 2013-12-24 13:36 爱编程hao123 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 在 drawable 文件夹中添加一个 advancedbutton.xml 设置设置 ImageButton 的 android:background 属性值 阅读全文
posted @ 2013-12-24 10:37 爱编程hao123 阅读(264) 评论(0) 推荐(0) 编辑
摘要: mImageButton1.setImageResource(R.drawable.lostfocusimage); 阅读全文
posted @ 2013-12-23 16:40 爱编程hao123 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 第一步:建立Android 工程:ImageButtonDemo。第二步:编写Activity 的子类别:ImageButtonDemo,其程序代码如下:package com.a3gs.imagebutton;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.ImageButton;import android.widget.TextView;public class ImageButt 阅读全文
posted @ 2013-12-23 15:36 爱编程hao123 阅读(1113) 评论(0) 推荐(0) 编辑
摘要: public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);/* 取得TextView、EditText */mTextView01 = (TextView) findViewById(R.id.myTextView);mEditText01 = (EditText) findViewById(R.id.myEditText);/* 设置EditText 用OnKeyListener 事件来启动 */mEditText01.se 阅读全文
posted @ 2013-12-23 15:16 爱编程hao123 阅读(1570) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://daikainan.iteye.com/blog/1405575Toast 是一个 View 视图,快速的为用户显示少量的信息。 Toast 在应用程序上浮动显示信息给用户,它永远不会获得焦点,不影响用户的输入等操作,主要用于 一些帮助 / 提示。Toast 最常见的创建方式是使用静态方法 Toast.makeText我使用的是 SDK 2.21. 默认的显示方式Java代码1 // 第一个参数:当前的上下文环境。可用getApplicationContext()或this 2 // 第二个参数:要显示的字符串。也可是R.string中字符串ID 3 // 第三个参数:显 阅读全文
posted @ 2013-12-23 14:51 爱编程hao123 阅读(198) 评论(0) 推荐(0) 编辑
摘要: MainActivity.javaprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);Button button=(Button)findViewById(R.id.button1);button.setOnClickListener(new OnClickListener(){public void onClick(View v){Intent intent=new Intent();inten 阅读全文
posted @ 2013-12-23 14:47 爱编程hao123 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 主activityprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);Button button=(Button)findViewById(R.id.button1);button.setOnClickListener(new OnClickListener(){public void onClick(View v){Intent intent=new Intent(); //声明一个intent 阅读全文
posted @ 2013-12-21 17:25 爱编程hao123 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 这个问题很简单哦!你按下键盘上的小键盘数字键的Numlk+7键,这样,你就可以变为横向了,相反,你再次按下,就切换到原来的竖向了! 阅读全文
posted @ 2013-12-21 17:08 爱编程hao123 阅读(183) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页