-
android 静态壁纸实例源码下载
一款还不错的静态壁纸代码 核心代码:package com.example.wallpaperchange;import android.os.Bundle;import android.app.Activity;import android.app.AlarmManager;import android.app.PendingIntent;import android.app.Service;import android.content.Intent;import android.view.View;import android.view.View.OnClickListener;import android.widget.Button;import android.widget.Toast; public class MainActivity extends Activity { AlarmManager aManager; Button start,stop; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); start = (Button)findViewById(R.id.start); stop = (Button)findViewById(R.id.stop); aManager = (AlarmManager)getSystemService(Service.ALARM_SERVICE); //指定ChangeService组件 Intent intent = new Intent(MainActivity.this,ChangeService.class); //创建PendingIntent对象 final PendingIntent pi = PendingIntent.getService( MainActivity.this, 0, intent, 0); start.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub aManager.setRepeating(AlarmManager.RTC_WAKEUP, 0, 5000, pi); start.setEnabled(false); stop.setEnabled(true); Toast.makeText(MainActivity.this, "壁纸定时更换启动成功", 5000).show(); } }); stop.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub start.setEnabled(true); stop.setEnabled(false); aManager.cancel(pi); } }); } }
- 2014-06-03下载
- 积分:1
-
视频监控客户端与服务器端
视频监控客户端与服务器端
- 2014-09-22下载
- 积分:1
-
android ocr 图像识别 实例源码
tess-two.tesseract3.01-leptonica1.68-LibJPEG6b
- 2014-11-22下载
- 积分:1
-
android viewpager 动态加载数据
android 动态加载数据
- 2015-03-16下载
- 积分:1
-
利用MATLAB进行弹道仿真源代码
不可多得的导弹仿真源程序 非常的经典 绝对不会后悔
- 2020-05-25下载
- 积分:1
-
android 自定义软键盘 例子源码下载
android 自定义软键盘 例子源码下载
- 2015-04-20下载
- 积分:1
-
spring实战第五版源码(含英文版pdf)
【实例简介】spring实战第五版源码_102812
- 2021-07-25 00:31:04下载
- 积分:1
-
android联系人带字母检索源码
android联系人带字母检索源码/** * 联系人列表适配器。 * * @author guolin */public class ContactAdapter extends ArrayAdapter { /** * 需要渲染的item布局文件 */ private int resource; /** * 字母表分组工具 */ private SectionIndexer mIndexer; public ContactAdapter(Context context, int textViewResourceId, List objects) { super(context, textViewResourceId, objects); resource = textViewResourceId; } @Override public View getView(int position, View convertView, ViewGroup parent) { Contact contact = getItem(position); LinearLayout layout = null; if (convertView == null) { layout = (LinearLayout) LayoutInflater.from(getContext()).inflate(resource, null); } else { layout = (LinearLayout) convertView; } TextView name = (TextView) layout.findViewById(R.id.name); LinearLayout sortKeyLayout = (LinearLayout) layout.findViewById(R.id.sort_key_layout); TextView sortKey = (TextView) layout.findViewById(R.id.sort_key); name.setText(contact.getName()); int section = mIndexer.getSectionForPosition(position); if (position == mIndexer.getPositionForSection(section)) { sortKey.setText(contact.getSortKey()); sortKeyLayout.setVisibility(View.VISIBLE); } else { sortKeyLayout.setVisibility(View.GONE); } return layout; } /** * 给当前适配器传入一个分组工具。 * * @param indexer */ public void setIndexer(SectionIndexer indexer) { mIndexer = indexer; }}
- 2014-04-13下载
- 积分:1
-
android 抽屉效果实例源码下载(可以滑动)
android 抽屉效果实例源码下载(可以滑动)
- 2014-12-28下载
- 积分:1
-
android 滑动菜单SlidingMenu 示例源码下载
android 滑动菜单SlidingMenu 示例源码下载
- 2013-10-23下载
- 积分:1