上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: public void onActivityResult(int requestCode, int resultCode, final Intent data) { if (RESULT_OK == resultCode && 1 == requestCode) { LayoutInflater inflater = getLayoutInflater(); View layout = inflater.inflate(R.layout.dialog, (ViewGroup) ... 阅读全文
posted @ 2012-12-25 13:29 merryjd 阅读(424) 评论(0) 推荐(0)
摘要: //设置button的点击事件bt1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(in... 阅读全文
posted @ 2012-12-25 13:27 merryjd 阅读(810) 评论(0) 推荐(0)
摘要: //定义四种类型的Animation final Animation translAnimation = new TranslateAnimation(0, 300, 0, 300); final Animation scaleAnimation = new ScaleAnimation(0f, 1f, 0f, 1f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); final Animation alp... 阅读全文
posted @ 2012-12-25 13:22 merryjd 阅读(672) 评论(0) 推荐(0)
摘要: package com.example.demousercount;import android.os.Bundle;import android.app.Activity;import android.content.SharedPreferences;import android.content.SharedPreferences.Editor;import android.view.Menu;import android.widget.TextView;public class DemoUserCount extends Activity { //声明一个SharedPrefere... 阅读全文
posted @ 2012-12-25 13:14 merryjd 阅读(213) 评论(0) 推荐(0)
摘要: requestWindowFeature(Window.FEATURE_NO_TITLE); 阅读全文
posted @ 2012-12-25 13:12 merryjd 阅读(190) 评论(0) 推荐(0)
摘要: 1.xml布局文件代码 1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5 tools:context=".DemoGetImage" 阅读全文
posted @ 2012-12-19 14:42 merryjd 阅读(724) 评论(0) 推荐(0)
摘要: Toast toast = Toast.makeText(MainActivity.this, "11", Toast.LENGTH_SHORT);toast.show(); 阅读全文
posted @ 2012-12-19 13:45 merryjd 阅读(236) 评论(0) 推荐(0)
摘要: View的setOnClickListener的添加方法(转载) 阅读全文
posted @ 2012-12-19 13:33 merryjd 阅读(175) 评论(0) 推荐(0)
摘要: 答疑一:adb的全称为Android Debug Bridge,就是起到调试桥的作用。通过adb我们可以在Eclipse中方面通过DDMS来调试Android程序说白了就是debug工具。 adb的工作方式比较特殊采用监听Socket TCP 5554等端口的方式让IDE和Qemu通讯默认情况下adb会daemon相关的网络端口所以当我们运行Eclipse时adb进程就会自动运行。 答疑二:借助adb工具我们可以管理设备或手机模拟器的状态。还可以进行很多手机操作,如安装软件、系统升级、运行shell命令等等。其实简而言说,adb就是连接Android手机与PC端的桥梁,可以让用... 阅读全文
posted @ 2012-12-05 09:31 merryjd 阅读(3013) 评论(0) 推荐(0)
摘要: //注册spinnerfinal Spinner spinner = (Spinner) findViewById(R.id.mySpinner);//写监听器 spinner.setOnItemSelectedListener(new OnItemSelectedListener() {//写监听方法 public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {//存数据 s1 = spinner.getSelectedItem().toString(); }//重写方法 阅读全文
posted @ 2012-12-03 14:35 merryjd 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页