![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
手机Feature开发
andli0726
这个作者很懒,什么都没留下…
展开
-
手机屏幕方向切换:横屏 竖屏
public class Main extends Activity { EditText et; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button...原创 2011-11-24 19:47:44 · 721 阅读 · 0 评论 -
设置手机壁纸
public class Main extends Activity { int[] imgIds = { // 图片资源的id数组 R.drawable.w1, R.drawable.w2, R.drawable.w3, R.drawable.w4 }; int setImgID = -1; // 被选中的图片在id数组中的索引 BaseAdapter ba = new B...原创 2011-11-24 19:57:14 · 257 阅读 · 0 评论 -
手机震动设置
public class Main extends Activity { Vibrator vibrator; // 声明一个Vibrator对象 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main...原创 2011-11-24 20:04:17 · 289 阅读 · 0 评论 -
设置音量
public class Main extends Activity { MediaPlayer mp; // 声明MediaPlayer对象 AudioManager am; // 声明AudioManager对象 @Override public void onCreate(Bundle savedInstanceState) { super.onCreat...原创 2011-11-24 20:14:51 · 111 阅读 · 0 评论 -
闹钟设置
public class Main extends Activity { Calendar c = Calendar.getInstance(); final int DIALOG_TIME = 0; //设置对话框id AlarmManager am; //声明AlarmManager对象 public void onCreate(Bundle savedInstan...原创 2011-12-02 08:18:52 · 193 阅读 · 0 评论 -
获取手机电量
package wyf.wpf; //声明包语句import android.app.Activity;import android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;import android.content.IntentFi...原创 2011-12-02 08:19:07 · 167 阅读 · 0 评论