安装Android Studio后,运行模拟器出现错误:
emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!

安装Android Studio后,运行模拟器出现错误:
emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!

Android开发学习
Android开发中,需要读取手机中的通讯录。
Android开发学习
Android开发中,会需要对自己定义自己的弹出提示层,不使用系统默认的。
Android开发学习:开发过程中会需要对App应用进行判断是否是首次启动,或安装后第一次打开应用。
package com.zhengdecai.isfirststart;
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.widget.TextView;
import android.widget.Toast;
/**
* 首次启动判断
*
* @author 郑德才
*
*/
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView isFisrt =(TextView) findViewById(R.id.isFisrt);
SharedPreferences sharedPreferences = this.getSharedPreferences(
"share", MODE_PRIVATE);//此处表示该应用程序专用
boolean isFirstRun = sharedPreferences.getBoolean("isFirstRun", true);//此处表示如果key "isFirstRun"对应的value没有值则默认为true,否则就把对应的value取出赋值给变量isFirstRun
Editor editor = sharedPreferences.edit();
editor.putBoolean("isFirstRun", false); //此处表示putBoolean(key, value),将value写入对应的key,而且是一一对应的
editor.commit(); //将isFirstRun写入editor中保存
if (isFirstRun) {
Log.d("debug", "第一次运行");
editor.putBoolean("isFirstRun", false);
Toast.makeText(this, "是第一次运行程序喔!", Toast.LENGTH_SHORT).show();
isFisrt.setText("是第一次运行程序喔!");
editor.commit();
} else {
Log.d("debug", "不是第一次运行");
Toast.makeText(this, "已经不是第一次运行程序了!", Toast.LENGTH_SHORT).show();
isFisrt.setText("已经不是第一次运行程序了!");
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}Android开发学习
Android开发中,对应用程序创建手机桌面快捷方式
Android开发学习
Android开发中,需要用到模仿QQ联系人的菜单展开收缩效果
package com.zhengdecai.awaveinfo;
import android.app.Activity;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
Android开发学习
Android开发中,自动显示搜索历史成列表
Android开发学习
Android开发中,经常见到通过WebService接口进行数据访问查询,介绍一下网上找到的手机号吗归属地查询实例
Android开发学习
Android开发中,经常见到通过WebService接口进行数据访问查询,介绍一下网上找到的天气情况查询实例
实例:天气情况查询
新建布局文件:activity_main.xml,使用ListView显示地区列表,代码内容:
Android开发学习
切换菜单,第三种:切换菜单-点击侧栏按钮进行切换,使用SlidingMenu,使用控件Fragment
Android开发学习
切换菜单,第二种:点击进行ImageView切换,使用控件ViewPager
Android开发学习
切换菜单,第一种:点击进行Tab切换,使用控件TabHost