- 浏览: 161666 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
yzd_java:
你的uploadFile.html怎么没有贴出来
uploadify 3.2.1+spring mvc上传文件 -
u013107014:
不能多选,不能阅览,搞J8
uploadify 3.2.1+spring mvc上传文件 -
u013107014:
什么JB鬼?
uploadify 3.2.1+spring mvc上传文件 -
11104078:
uploadify 3.2.1+spring mvc上传文件 -
xujun738:
楼主,为什么我按照你说的做,只生成了一级,点展开树结点的时候就 ...
zk生成多级树
最近做了一个简单的天气预报,话不多说上代码
实时天气的handler:
四天内天气的handler
activity
发送天气
实时天气的handler:
package com.handler; import java.util.ArrayList; import java.util.List; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import com.javaBean.Weather; /** * 显示当天的详细天气情况 * @author wdw * */ public class NonceXmlHandler extends DefaultHandler { private List<Weather>nowWeatherList; private boolean tag; private Weather weather; public List<Weather> getNowWeatherList() { return nowWeatherList; } public void setNowWeatherList(List<Weather> nowWeatherList) { this.nowWeatherList = nowWeatherList; } //构造方法 public NonceXmlHandler() { nowWeatherList = new ArrayList<Weather>(); tag = false; } @Override public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException { String tagName = localName.length()!=0 ? localName : name; tagName = tagName.toLowerCase(); if (tagName.equals("current_conditions")) { tag = true; weather = new Weather(); } if (tag) { if (tagName.equals("temp_c")) { weather.setLowTemp(attributes.getValue("data")); } else if (tagName.equals("temp_f")) { weather.setHighTemp(attributes.getValue("data")); } else if (tagName.equals("icon")) { weather.setImgUrl(attributes.getValue("data")); } else if (tagName.equals("condition")) { weather.setCircs(attributes.getValue("data")); } else if (tagName.equals("wind_condition")) { weather.setWind(attributes.getValue("data")); } else if (tagName.equals("humidity")) { weather.setHumidity(attributes.getValue("data")); } } } @Override public void endElement(String uri, String localName, String name) throws SAXException { String tagName = localName.length()!=0 ? localName : name; tagName = tagName.toLowerCase(); if(tagName.equals("current_conditions")) { tag = false; nowWeatherList.add(weather); } super.endElement(uri, localName, name); } }
四天内天气的handler
package com.handler; import java.util.ArrayList; import java.util.List; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import com.javaBean.Weather; /** * * @author wdw * */ public class XmlHandler extends DefaultHandler{ private List<Weather>weatherList; private boolean tag; private Weather weather; //list的get/set方法 public List<Weather> getWeatherList() { return weatherList; } public void setWeatherList(List<Weather> weatherList) { this.weatherList = weatherList; } //构造方法 public XmlHandler() { weatherList = new ArrayList<Weather>(); tag = false; } @Override public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException { String tagName = localName.length()!=0 ? localName : name; tagName = tagName.toLowerCase(); if (tagName.equals("forecast_conditions")) { tag = true; weather = new Weather(); } if (tag) { if (tagName.equals("day_of_week")) { weather.setDayString(attributes.getValue("data")); } else if (tagName.equals("low")) { weather.setLowTemp(attributes.getValue("data")); } else if (tagName.equals("high")) { weather.setHighTemp(attributes.getValue("data")); } else if (tagName.equals("icon")) { weather.setImgUrl(attributes.getValue("data")); } else if (tagName.equals("condition")) { weather.setCircs(attributes.getValue("data")); } else if (tagName.equals("wind_condition")) { weather.setWind(attributes.getValue("data")); } } } @Override public void endElement(String uri, String localName, String name) throws SAXException { super.endElement(uri, localName, name); String tagName = localName.length()!=0 ? localName : name; tagName = tagName.toLowerCase(); if(tagName.equals("forecast_conditions")) { tag = false; weatherList.add(weather); } } }
activity
package com.weather; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; import java.util.List; import java.util.Timer; import java.util.TimerTask; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import com.database.WeatherDAO; import com.handler.NonceXmlHandler; import com.handler.XmlHandler; import com.javaBean.Weather; import com.util.LunarCalendarUtils; import android.R.integer; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.Intent; import android.database.Cursor; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.Parcelable; import android.util.Log; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.widget.AdapterView; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.Spinner; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; import android.widget.AdapterView.OnItemSelectedListener; /** * * @author wdw * */ public class WeatherActivity extends Activity { private Spinner selectCity; private EditText inputCity; private Button onSure; private TextView showCity; private ImageView weaView; private Handler weatherHandler; private Dialog progressDialog; private Timer timer; public static final String STR_DESKTOP_TO_APP_EXPAND = "DESKTOP_TO_APP_FLAG_EXPAND"; public static final String STR_DESKTOP_TO_APP_ID = "DESKTOP_TO_APP_FLAG_ID"; public static final String STR_DESKTOP_TO_APP_TYPE = "DESKTOP_TO_APP_FLAG_TYPE"; private Intent myIntent; private final String ACTION_ADD_SHORTCUT="com.android.launcher.action.INSTALL_SHORTCUT"; private String weatherStr; private final int MENU_SENDTOP=Menu.FIRST; private final int MENU_EXIT=Menu.FIRST+1; private WeatherDAO weatherDAO; private Cursor myCursor; private TableLayout table; private LunarCalendarUtils calendarUtils; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myIntent = new Intent(this,SendWeather.class); weatherDAO = new WeatherDAO(this); timer = new Timer(); selectCity = (Spinner)findViewById(R.id.weaSpCity); inputCity = (EditText)findViewById(R.id.weaEtCity); onSure = (Button)findViewById(R.id.weaBtSearch); showCity = (TextView)findViewById(R.id.weaTvCity); weaView = (ImageView)findViewById(R.id.weaIv); progressDialog = new AlertDialog.Builder(this) .setTitle("读取数据中") .setMessage("正在加载数据,请稍等!") .create(); weatherHandler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); final String cityName = inputCity.getText().toString(); searchWeather(cityName); searchNowWeather(cityName); progressDialog.hide(); } }; selectCity.setOnItemSelectedListener(new OnItemSelectedListener(){ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { inputCity.setText(selectCity.getSelectedItem().toString()); } public void onNothingSelected(AdapterView<?> parent) { // TODO Auto-generated method stub } }); onSure.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { progressDialog.show(); timer.schedule(new TimerTask(){ @Override public void run() { Message message = new Message(); message.setTarget(weatherHandler); message.sendToTarget(); } }, 100); } }); showCity.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { searchNowWeather(inputCity.getText().toString()); goTO(); } }); } /**创建menu*/ @Override /*创建menu*/ public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.add(0, MENU_SENDTOP, 1, "发送快捷方式").setIcon(android.R.drawable.ic_menu_share); menu.add(0,MENU_EXIT,2,"返回桌面").setIcon(android.R.drawable.ic_menu_revert); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_SENDTOP: searchNowWeather(inputCity.getText().toString()); weatherStr=showCity.getText().toString(); Parcelable icon =Intent.ShortcutIconResource.fromContext(this, R.drawable.weather); Intent addShortCut = new Intent(ACTION_ADD_SHORTCUT); addShortCut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon); addShortCut.putExtra(Intent.EXTRA_SHORTCUT_NAME, weatherStr); myIntent.setData(Uri.parse(weatherStr)); Bundle bundle = new Bundle(); bundle.putString("weather", weatherStr); myIntent.putExtras(bundle); addShortCut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, myIntent); sendBroadcast(addShortCut); goTO(); break; case MENU_EXIT: goTO(); finish(); break; } return super.onOptionsItemSelected(item); } /**查询当天天气*/ public void searchNowWeather(String city) { SAXParserFactory spf = SAXParserFactory.newInstance(); try { SAXParser sParser = spf.newSAXParser(); XMLReader reader = sParser.getXMLReader(); NonceXmlHandler nowHandler = new NonceXmlHandler(); reader.setContentHandler(nowHandler); URL url = new URL("http://www.google.com/ig/api?hl=zh-cn&weather="+URLEncoder.encode(city)); InputStream iStream = url.openStream(); InputStreamReader isr = new InputStreamReader(iStream,"GBK"); InputSource source = new InputSource(isr); reader.parse(source); List<Weather> weatherList = nowHandler.getNowWeatherList(); for (Weather weather:weatherList) { weaView.setImageDrawable(loadImage(weather.getImgUrl())); weaView.setMinimumHeight(80); String strLine = System.getProperty("line.separator"); showCity.setText(inputCity.getText().toString()+"实时天气:" +strLine+weather.getLowTemp() + "℃" +" 、 "+weather.getCircs() +strLine+weather.getWind() +strLine+weather.getHumidity()); } weatherStr = showCity.getText().toString(); } catch (Exception e) { new AlertDialog.Builder(this) .setTitle("解析错误") .setMessage("获取当天天气数据失败,请稍候再试。") .setNegativeButton("确定", null) .show(); } } /**查询四天内的天气*/ public void searchWeather(String city) { SAXParserFactory spf = SAXParserFactory.newInstance(); try { SAXParser sp = spf.newSAXParser(); XMLReader reader = sp.getXMLReader(); XmlHandler handler = new XmlHandler(); reader.setContentHandler(handler); URL url = new URL("http://www.google.com/ig/api?hl=zh-cn&weather=" + URLEncoder.encode(city)); InputStream is = url.openStream(); InputStreamReader isr = new InputStreamReader(is,"GBK"); InputSource source = new InputSource(isr); reader.parse(source); List<Weather> weatherList = handler.getWeatherList(); table = (TableLayout)findViewById(R.id.weaTable); table.removeAllViews(); for(Weather weather : weatherList) { TableRow row = new TableRow(this); row.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); row.setGravity(Gravity.CENTER_VERTICAL); ImageView img = new ImageView(this); img.setImageDrawable(loadImage(weather.getImgUrl())); img.setMinimumHeight(80); row.addView(img); TextView day = new TextView(this); day.setText(weather.getDayString()); day.setGravity(Gravity.CENTER_HORIZONTAL); row.addView(day); TextView temp = new TextView(this); temp.setText(weather.getLowTemp() + "℃ - " + weather.getHighTemp() + "℃"); temp.setGravity(Gravity.CENTER_HORIZONTAL); row.addView(temp); TextView condition = new TextView(this); condition.setText(weather.getCircs()); condition.setGravity(Gravity.CENTER_HORIZONTAL); row.addView(condition); TextView wind = new TextView(this); wind.setText(weather.getWind()); wind.setGravity(Gravity.CENTER_VERTICAL); row.addView(wind); table.addView(row); } } catch (Exception e) { new AlertDialog.Builder(this) .setTitle("解析错误") .setMessage("获取天气数据失败,请稍候再试。") .setNegativeButton("确定", null) .show(); } } //加载天气图片 private Drawable loadImage(String imgUrl) { try { return Drawable.createFromStream((InputStream) new URL("http://www.google.com/" + imgUrl).getContent(), "demo"); }catch (MalformedURLException e) { Log.e("exce",e.getMessage()); } catch (Exception e) { Log.e("exce", e.getMessage()); } return null; } @Override protected void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); goTO(); } //发送快捷方式 public void goTO() { searchNowWeather(inputCity.getText().toString()); weatherStr=showCity.getText().toString(); Intent intent = new Intent("com.android.CLICK"); Bundle bundle1 =new Bundle(); bundle1.putString("weather", weatherStr); intent.putExtras(bundle1); WeatherActivity.this.sendBroadcast(intent); } //插入天气 public void insert() { weatherDAO.weatherInsert(weatherStr, table.toString()); } //更新天气 public void update(int id,String timeString,String todayString) { weatherDAO.updateWeather(id, timeString, todayString); } }
发送天气
引用
package com.weather;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.PendingIntent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.content.DialogInterface;
import android.content.Intent;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.EditText;
import android.widget.Toast;
import android.telephony.SmsManager;
/**
* 发送短信界面
* @author wdw
*
*/
public class SendWeather extends Activity {
private EditText editNumber;
private EditText messagEditText;
private String weatherString;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showDialog();
//得到数据
try {
Bundle bundle = this.getIntent().getExtras();
weatherString=bundle.getString("weather");
messagEditText.setText(weatherString);
} catch (Exception e) {
e.printStackTrace();
}
editNumber.requestFocus();
}
/**检查字符串是否为电话号码的格式*/
public static boolean isPhoneNumberValid(String phoneNumber)
{
// boolean isValid=false;
// String expression="^\\(?(\\d{3})\\)?[- ]?(?(\\d{3})\\)?[- ]?(\\d{5})$";
// String expression2="^\\(?(\\d{3})\\)?[- ]?(?(\\d{4})\\)?[- ]?(\\d{4})$";
// CharSequence inputStr=phoneNumber;
// /*创建pattern*/
// Pattern pattern=Pattern.compile(expression);
// /*将pattern以参数传入Matcher*/
// Matcher matcher=pattern.matcher(inputStr);
// Pattern pattern2=Pattern.compile(expression2);
// Matcher matcher2=pattern2.matcher(inputStr);
// if(matcher.matches()||matcher2.matches())
// {
// isValid=true;
// }
return true;
}
//弹出框
public void showDialog()
{
LayoutInflater factory = LayoutInflater.from(this);
final View view = factory.inflate(R.layout.send_weather, null);
LinearLayout layout=(LinearLayout)view.findViewById(R.id.sendWeather);
editNumber=(EditText)layout.findViewById(R.id.numberEdit);
messagEditText=(EditText)layout.findViewById(R.id.weatherEdit);
new AlertDialog.Builder(this).setTitle("发送温情").setView(view)
.setPositiveButton("发送", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which) {
//取得短信收件人电话
String number = editNumber.getText().toString();
//取得短信内容
String message = messagEditText.getText().toString();
/*构建default 的instance的SmsManager*/
SmsManager smsManager =SmsManager.getDefault();
/*检查电话格式与短信字数是否超过70个字符*/
if(number.equals("")) {
Toast.makeText(SendWeather.this, "请输入发送号码!", Toast.LENGTH_LONG).show();
onCreate(null);
return;
} else
{
if(isPhoneNumberValid(number)==true&&isWithin(message)==true)
{
try
{
PendingIntent pendingIntent =PendingIntent.getBroadcast(SendWeather.this, 0, new Intent(),0);
smsManager.sendTextMessage(number, null, message,pendingIntent , null);
}
catch(Exception e)
{
e.printStackTrace();
}
// Toast.makeText(NoteActivity.this, "发送成功!", Toast.LENGTH_LONG).show();
// Intent intent = new Intent(NoteActivity.this,MyNote.class);
// startActivity(intent);
finish();
}
else{
if(isPhoneNumberValid(number)==false)
{
if(isWithin(message)==false)
{
Toast.makeText(SendWeather.this,
"电话号码格式错误和短信内容超过70字请检查!", Toast.LENGTH_LONG).show();
onCreate(null);
}
else{
Toast.makeText(SendWeather.this,
"电话号码格式错误请检查!", Toast.LENGTH_LONG).show();
onCreate(null);
}
}
else if(isWithin(message)==false)
{
Toast.makeText(SendWeather.this,
"短信内容超过70字请删除部分内容!", Toast.LENGTH_LONG).show();
onCreate(null);
}
}
}
}
})
.setNegativeButton("取消", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which) {
// Intent intent = new Intent(NoteActivity.this,MyNote.class);
// startActivity(intent);
finish();
}
}).show();
}
/**判断短信长度*/
public static boolean isWithin(String text)
{
if(text.length()<=70)
{
return true;
}
else{
return false;
}
}
/**结束*/
public void finish()
{
super.finish();
}
}
import android.app.Activity;
import android.app.AlertDialog;
import android.app.PendingIntent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.content.DialogInterface;
import android.content.Intent;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.EditText;
import android.widget.Toast;
import android.telephony.SmsManager;
/**
* 发送短信界面
* @author wdw
*
*/
public class SendWeather extends Activity {
private EditText editNumber;
private EditText messagEditText;
private String weatherString;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showDialog();
//得到数据
try {
Bundle bundle = this.getIntent().getExtras();
weatherString=bundle.getString("weather");
messagEditText.setText(weatherString);
} catch (Exception e) {
e.printStackTrace();
}
editNumber.requestFocus();
}
/**检查字符串是否为电话号码的格式*/
public static boolean isPhoneNumberValid(String phoneNumber)
{
// boolean isValid=false;
// String expression="^\\(?(\\d{3})\\)?[- ]?(?(\\d{3})\\)?[- ]?(\\d{5})$";
// String expression2="^\\(?(\\d{3})\\)?[- ]?(?(\\d{4})\\)?[- ]?(\\d{4})$";
// CharSequence inputStr=phoneNumber;
// /*创建pattern*/
// Pattern pattern=Pattern.compile(expression);
// /*将pattern以参数传入Matcher*/
// Matcher matcher=pattern.matcher(inputStr);
// Pattern pattern2=Pattern.compile(expression2);
// Matcher matcher2=pattern2.matcher(inputStr);
// if(matcher.matches()||matcher2.matches())
// {
// isValid=true;
// }
return true;
}
//弹出框
public void showDialog()
{
LayoutInflater factory = LayoutInflater.from(this);
final View view = factory.inflate(R.layout.send_weather, null);
LinearLayout layout=(LinearLayout)view.findViewById(R.id.sendWeather);
editNumber=(EditText)layout.findViewById(R.id.numberEdit);
messagEditText=(EditText)layout.findViewById(R.id.weatherEdit);
new AlertDialog.Builder(this).setTitle("发送温情").setView(view)
.setPositiveButton("发送", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which) {
//取得短信收件人电话
String number = editNumber.getText().toString();
//取得短信内容
String message = messagEditText.getText().toString();
/*构建default 的instance的SmsManager*/
SmsManager smsManager =SmsManager.getDefault();
/*检查电话格式与短信字数是否超过70个字符*/
if(number.equals("")) {
Toast.makeText(SendWeather.this, "请输入发送号码!", Toast.LENGTH_LONG).show();
onCreate(null);
return;
} else
{
if(isPhoneNumberValid(number)==true&&isWithin(message)==true)
{
try
{
PendingIntent pendingIntent =PendingIntent.getBroadcast(SendWeather.this, 0, new Intent(),0);
smsManager.sendTextMessage(number, null, message,pendingIntent , null);
}
catch(Exception e)
{
e.printStackTrace();
}
// Toast.makeText(NoteActivity.this, "发送成功!", Toast.LENGTH_LONG).show();
// Intent intent = new Intent(NoteActivity.this,MyNote.class);
// startActivity(intent);
finish();
}
else{
if(isPhoneNumberValid(number)==false)
{
if(isWithin(message)==false)
{
Toast.makeText(SendWeather.this,
"电话号码格式错误和短信内容超过70字请检查!", Toast.LENGTH_LONG).show();
onCreate(null);
}
else{
Toast.makeText(SendWeather.this,
"电话号码格式错误请检查!", Toast.LENGTH_LONG).show();
onCreate(null);
}
}
else if(isWithin(message)==false)
{
Toast.makeText(SendWeather.this,
"短信内容超过70字请删除部分内容!", Toast.LENGTH_LONG).show();
onCreate(null);
}
}
}
}
})
.setNegativeButton("取消", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int which) {
// Intent intent = new Intent(NoteActivity.this,MyNote.class);
// startActivity(intent);
finish();
}
}).show();
}
/**判断短信长度*/
public static boolean isWithin(String text)
{
if(text.length()<=70)
{
return true;
}
else{
return false;
}
}
/**结束*/
public void finish()
{
super.finish();
}
}
发表评论
-
读写文本
2011-08-23 13:38 1581ldap http://www.360doc.com/cont ... -
短信数据库
2011-07-11 17:09 1173转自http://www.opda.com.cn/thread ... -
tabhost
2011-06-30 21:14 1035for (int i =0; i < tabWid ... -
增加主件
2011-06-22 17:56 971转自:http://ziyu-1.iteye.com/blog ... -
ProgressDialog
2011-06-21 18:08 1065写一个handler myHandler = new Han ... -
android intent调用
2011-06-12 13:09 1494转自:http://blog.csdn.net/y ... -
创建sdcard
2011-06-07 09:56 1271最近在做一个下载附件的小项目需要用到sdcard,在看了几位大 ... -
重写对话框dialog
2011-06-02 16:25 2838转自:http://wang-peng1.iteye.com/ ... -
listview问题
2011-06-01 14:06 1176http://www.cnblogs.com/helong/a ... -
urlconnection和httpclient
2011-05-23 17:16 4897urlconnection: String urlAddres ... -
转载android网络编程
2011-05-11 15:08 1293转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明 ... -
android网络编程
2011-05-09 09:57 2700转自:http://www.linuxidc.co ... -
android基础之Application
2011-05-09 09:32 2027远程Web服务器记录android客户端的登陆状态: 在And ... -
android基础
2011-02-24 15:40 1225View重绘和内存泄露的好像是面试经常问的问题 去点editt ... -
android 地图
2010-12-01 10:59 1227http://vip.du8.com/books/sepc0x ... -
android常见问题
2010-11-29 17:52 1191转自:http://eclc.sysu.edu.c ... -
android翻译
2010-11-19 13:01 1115通过网上一位仁兄的实例我 最近练习了一个在线翻译的项目下面把主 ... -
播放器之seekBar
2010-11-03 16:11 15461.在播放器上加入滚动条的代码如下,把goOn()放到on ... -
android sqlite
2010-09-26 16:54 4759今天做项目的时候为了测试我把模拟器里的项目删除了,然后重新运行 ... -
android开发
2010-09-20 13:31 1525原地址http://www.dnbcw.com/bianche ...
相关推荐
Android应用源码45套安卓源码合集: android中文离线发音引擎FOCTTS使用源码.rar Android应用源码(精)LBS签到应用源码.rar Android应用源码(精)xUtils2.2.5.rar Android应用源码(精)仿博客园客户端源码.rar Android...
Android应用源码13套安卓源码合集: android应用源码仿ireader书架.rar android应用源码动画效果 translate、scale、alpha、rotate 切换Activity动画.rar android应用源码可以报警的手电.rar android应用源码图片...
《Android应用程序开发教程(第2版)》教学课件02Android UI设计.pdf《Android应用程序开发教程(第2版)》教学课件02Android UI设计.pdf《Android应用程序开发教程(第2版)》教学课件02Android UI设计.pdf《Android应用...
《Android应用开发范例精解》通过通俗易懂的开发实例及项目案例,详细介绍了Android应用开发的知识体系及实用开发技术。 《Android应用开发范例精解》共14章,分为3篇。第1篇为基础篇,涵盖Android背景及开发环境和...
《Android应用程序开发教程(第2版)》教学课件01Android系统与开发环境.pdf《Android应用程序开发教程(第2版)》教学课件01Android系统与开发环境.pdf《Android应用程序开发教程(第2版)》教学课件01Android系统与开发...
Android应用源码11套安卓源码合集: Android Gps日志记录程序源码.rar Android listview 滑动删除(具体效果360手机卫士后台通知).rar Android MP3播放器,带卡拉OK字幕.rar Android “遇见”android应用源码.rar ...
在本资源"android应用锁的实现"中,我们可能找到一个简单实现这一功能的示例代码。以下是关于Android应用锁实现的一些关键知识点: 1. **权限管理**:在Android系统中,为了实现应用锁,首先需要获取相应的权限。...
根据提供的信息,我们可以推断出《Android应用开发揭秘》这本书主要涵盖了Android应用程序的开发流程及相关技术,适合初学者作为入门指南。尽管具体内容未给出详细章节或摘要,但基于标题、描述及常见Android开发...
作为一本Android应用开发书籍,本书既适合Android初学者,也适合具备了一定Android开发经验丹需要开发案例的高级读者。 本书分为三个部分,共18章,由浅入深地详细介绍了Android的每个开发细节。 本书基础翔实,...
《Android应用开发完全自学手册》是一本全面介绍Android应用开发的指南,涵盖了从基础到进阶的各个环节。这本书旨在帮助初学者系统地学习并掌握Android应用的开发技能,通过源代码解析来提升实践能力。 第1章:...
《Android应用程序开发(第三版)》是由王向辉、张国印、沈洁三位专家编著的教材,这本书深入浅出地介绍了Android平台上的应用开发技术。课件源程序是学习此书的重要辅助资料,提供了丰富的实例和练习,帮助读者更好...
在Android应用程序中,有一类特殊的消息,是专门负责与用户进行交互的,它们就是触摸屏和键盘等输入事件。触摸屏和键盘事件是统一由系统输入管理器InputManager进行分发的。也就是说,InputManager负责从硬件接收...
《Android应用开发详解》源码,完整版,值得看一看。 《Android核心技术和开发详解》各章案例的全部源代码,第一章将要介绍的是Android开发起步的相关知识,首先对Android平台进行简单的介绍,其中包括Android的背景...
Android应用案例开发大全(第3版) 源码 part3/part7 本书以Android手机综合应用程序开发为主题,通过11个典型范例全面且深度地讲解了单机应用、网络应用、商业案例、2D/3D游戏等多个开发领域。 全书共分12章,主要以...
《Android应用开发》通过丰富而翔实的实例展示了在Android平台下开发手机应用软件所必需的概念和技术。书中不仅对Android应用程序的开发环境和调试方法进行了详细介绍,而且对Android软件开发的一些关键技术和API...
《Android应用测试与调试实战》高清完整版是Android应用测试与调试领域最为系统、深入且极具实践指导意义的著作,由拥有近10年从业经验的资深软件开发工程师和调试技术专家撰写,旨在为广大程序员开发高质量的...
Android应用程序框架是构建Android应用的核心组成部分,它为开发者提供了丰富的工具和组件,使得开发者能够高效地开发出功能丰富、用户体验良好的移动应用。在Android中,MVC(Model-View-Controller)设计模式是一...
Android应用开发详解是一本Android应用开发书籍,既适合Android初学者,也适合具备了一定Android开发经验但需要开发案例的高级读者。 该书分为三个部分,共18章,由浅入深地详细介绍了Android的每个开发细节。 该书...
首先,Android应用的生命周期是由系统控制的,通常情况下,用户卸载应用时,系统会停止应用的所有服务,清理其进程,并删除所有数据和文件。然而,开发者有时希望在应用被卸载前执行一些清理或记录操作,例如关闭...