- 浏览: 281741 次
- 性别:
- 来自: 广州
最新评论
-
xianwubiao:
坑爹。。。。。
IOS之简单选择器UIPickerView(省份+城市) -
yanransysu:
为啥结果没有显示图片嘞,我都已经把你共享的文件给放进去了?
IOS之集合视图UICollectionView -
ajxjwha:
获取的总是空,为什么?!
IOS之简单选择器UIPickerView(省份+城市) -
如果宅:
附件下载下来是图片!
IOS之集合视图UICollectionView -
ikrboy:
小红星凯 写道找不到pickview 那个协议怎么搞?步骤写得 ...
IOS之简单选择器UIPickerView(省份+城市)
文章列表
三部分
1.MyClock.java(设置界面)
2.CallAlarm.java(BroadcastReceiver)
3.AlarmAlert.java(闹钟响应)
1.MyClock.java(设置界面)
private EditText etHour1, etMinute1, etHour2, etMinute2;
private TextView txTime1, txTime2;
private Button buSet1, buCancel1, buSet2, buCancel2;
private Calendar calendar = Cal ...
两部分ControlService.java(Activity)和MyService.java(Service)
MyService.java
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;
public class MyService extends Service {
/* 建立Handler对象 ...
添加权限
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />
private TextView myTextView1;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.phone_state);
myTextView1 = ...
private Button myButton;
private TextView myTextView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sd_size);
myButton = (Button) findViewById(R.id.button1);
myTextView = (TextView) findViewById(R.id.textView1 ...
private EditText title_ed;
private EditText content_ed;
private Button save;
private Button read;
private Button delete;
private TextView tv_title;
private TextView tv_content;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContent ...
private int intLevel;
private int intScale;
private Button mButton01;
private AlertDialog d;
private BroadcastReceiver mBatInfoReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
/*
* 如果捕捉到的ac ...
添加权限
<uses-permission
android:name="android.permission.RECEIVE_SMS"></uses-permission>
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content ...
添加权限
<uses-permission
android:name="android.permission.CHANGE_CONFIGURATION"></uses-permission>
在manifest.xml中的activity中设置configuration的属性
<activity
android:name=".ConfigChange"
android:label="@string/app_name"
android:configChange ...
添加权限
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />
private TelephonyManager telMgr;
private SimpleAdapter listItemAdapter; // ListView的适配器
private ArrayList<HashMap<String, Object>> listItem; // ListView的数据源,这里是一个HashMap的列表
pr ...
添加权限
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
MyGesture.java
private Gesture ges;
private GestureLibrary lib;
private GestureOverlayView overlay;
private Button button01, button02 , button03;
private EditText et;
private Str ...
添加权限
<uses-permission
android:name="android.permission.GET_TASKS"></uses-permission>
private ListView myList;
private ActivityManager mActivityManager;
private Button button1;
public void onCreate(Bundle savedInstanceState) {
super.onCreat ...
添加权限:
<uses-permission
android:name="android.permission.SET_WALLPAPER"></uses-permission>
private Button button1;
private Button button2;
private ImageView imageView1;
private ImageView imageView2;
private ImageView imageView3;
public void onCreate(Bund ...
File cacheDir;
File fileDir;
/* 取得目前Cache目录 */
cacheDir = this.getCacheDir();
/* 取得目前File目录 */
fileDir = this.getFilesDir();
Wifi的五种状态
WifiManager.WIFI_STATE_ENABLED//已打开
WifiManager.WIFI_STATE_DISABLING//正在关闭
WifiManager.WIFI_STATE_ENABLING//正在打开
WifiManager.WIFI_STATE_DISABLED//已关闭
WifiManager.WIFI_STATE_UNKNOWN//未知
一、打开关闭Wifi
添加权限
<uses-permission
android:name="android.permission.C ...
添加权限:
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />
private TelephonyManager telMgr;
private TextView tv_state;
private TextView tv_number;
private TextView tv_operator_number;
private TextView tv_operator;
private TextView tv_country;
@S ...