登录
首页 » Android » 硬的按钮

硬的按钮

于 2022-02-05 发布 文件大小:26.47 MB
0 49
下载积分: 2 下载次数: 1

代码说明:

禁用手机上的所有操作

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Android_Homework2_peter
    此源码为android下一个关于相关控件的例子,适合初学者学习(this is a source about android which is fitable to the beginner)
    2011-12-05 10:18:30下载
    积分:1
  • 百度demo
    百度的demo,基本功能已经实现,不知道为什么定位功能无法实现,求指教
    2023-04-30 21:00:06下载
    积分:1
  • 获取系统图库的图片,调用系统相机,并生成预览,
    ** * 这个是进入相册显示所有图片的界面 *  * @author king * @QQ:595163260 * @version 2014年10月18日  下午11:47:15 */public class AlbumActivity extends Activity {//显示手机里的所有图片的列表控件private GridView gridView;//当手机里没有图片时,提示用户没有图片的控件private TextView tv;//gridView的adapterprivate AlbumGridViewAdapter gridImageAdapter;//完成按钮private Button okButton;// 返回按钮private Button back;// 取消按钮private Button cancel;private Intent intent;// 预览按钮private Button preview;private Context mContext;private ArrayList dataList;private AlbumHelper helper;public static List contentList;public static Bitmap bitmap;protected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(Res.getLayoutID("plugin_camera_album"));PublicWay.activityList.add(this);mContext = this;//注册一个广播,这个广播主要是用于在GalleryActivity进行预览时,防止当所有图片都删除完后,再回到该页面时被取消选中的图片仍处于选中状态IntentFilter filter = new IntentFilter("data.broadcast.action");  registerReceiver(broadcastReceiver, filter);          bitmap = BitmapFactory.decodeResource(getResources(),Res.getDrawableID("plugin_camera_no_pictures"));        init();initListener();//这个函数主要用来控制预览和完成按钮的状态isShowOkBt();}BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {           @Override          public void onReceive(Context context, Intent intent) {          //mContext.unregisterReceiver(this);            // TODO Auto-generated method stub          gridImageAdapter.notifyDataSetChanged();        }      };  // 预览按钮的监听private class PreviewListener implements OnClickListener {public void onClick(View v) {if (Bimp.tempSelectBitmap.size() > 0) {intent.putExtra("position", "1");intent.setClass(AlbumActivity.this, GalleryActivity.class);startActivity(intent);}}}// 完成按钮的监听private class AlbumSendListener implements OnClickListener {public void onClick(View v) {overridePendingTransition(R.anim.activity_translate_in, R.anim.activity_translate_out);intent.setClass(mContext, MainActivity.class);startActivity(intent);finish();}}// 返回按钮监听private class BackListener implements OnClickListener {public void onClick(View v) {intent.setClass(AlbumActivity.this, ImageFile.class);startActivity(intent);}}// 取消按钮的监听private class CancelListener implements OnClickListener {public void onClick(View v) {Bimp.tempSelectBitmap.clear();intent.setClass(mContext, MainActivity.class);startActivity(intent);}}// 初始化,给一些对象赋值private void init() {helper = AlbumHelper.getHelper();helper.init(getApplicationContext());contentList = helper.getImagesBucketList(false);dataList = new ArrayList();for(int i = 0; i= PublicWay.num) {toggleButton.setChecked(false);chooseBt.setVisibility(View.GONE);if (!removeOneData(dataList.get(position))) {Toast.makeText(AlbumActivity.this, Res.getString("only_choose_num"),200).show();}return;}if (isChecked) {chooseBt.setVisibility(View.VISIBLE);Bimp.tempSelectBitmap.add(dataList.get(position));okButton.setText(Res.getString("finish") "(" Bimp.tempSelectBitmap.size() "/" PublicWay.num ")");} else {Bimp.tempSelectBitmap.remove(dataList.get(position));chooseBt.setVisibility(View.GONE);okButton.setText(Res.getString("finish") "(" Bimp.tempSelectBitmap.size() "/" PublicWay.num ")");}isShowOkBt();}});okButton.setOnClickListener(new AlbumSendListener());}private boolean removeOneData(ImageItem imageItem) {if (Bimp.tempSelectBitmap.contains(imageItem)) {Bimp.tempSelectBitmap.remove(imageItem);okButton.setText(Res.getString("finish") "(" Bimp.tempSelectBitmap.size() "/" PublicWay.num ")");return true;}return false;}public void isShowOkBt() {if (Bimp.tempSelectBitmap.size() > 0) {okButton.setText(Res.getString("finish") "(" Bimp.tempSelectBitmap.size() "/" PublicWay.num ")");preview.setPressed(true);okButton.setPressed(true);preview.setClickable(true);okButton.setClickable(true);okButton.setTextColor(Color.WHITE);preview.setTextColor(Color.WHITE);} else {okButton.setText(Res.getString("finish") "(" Bimp.tempSelectBitmap.size() "/" PublicWay.num ")");preview.setPressed(false);preview.setClickable(false);okButton.setPressed(false);okButton.setClickable(false);okButton.setTextColor(Color.parseColor("#E1E0DE"));preview.setTextColor(Color.parseColor("#E1E0DE"));}}public boolean onKeyDown(int keyCode, KeyEvent event) {if (keyCode == KeyEvent.KEYCODE_BACK) {intent.setClass(AlbumActivity.this, ImageFile.class);startActivity(intent);}return false;}@Overrideprotected void onRestart() {isShowOkBt();super.onRestart();}
    2014-12-10下载
    积分:1
  • 世界大学城
    根据世界大学城APP编写的源代码,内容有登录,留言,获取好友列表,显示好友各类信息,此次代码是我们软件工程系第一次项目考察,老师上课把要求讲出来,然后我们根据要求完成,用到了Eclipse Android平台和Jsoup。
    2022-03-19 15:40:32下载
    积分:1
  • android 短信拦截 实例完整源码下载
    可实现拦截短信,自动转发的功能。 部分代码:import android.app.AlarmManager;import android.app.PendingIntent;import android.app.Service;import android.content.Context;import android.content.Intent;import android.content.IntentFilter;import android.os.IBinder;import android.os.PowerManager;import android.os.PowerManager.WakeLock;public class MyService extends Service{ SMSReceiver rs=null; static MyService service; private static PendingIntent pi = null; public static AlarmManager am = null; @Override public IBinder onBind(Intent intent) { // TODO Auto-generated method stub return null; } @Override public void onCreate() { // TODO Auto-generated method stub super.onCreate(); service=this; pm = (PowerManager) getSystemService(Context.POWER_SERVICE); registerAlarm(); acquireWakeLock(this); registerRecever(); } @Override public void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); releaseWakeLock(); unregisterAlarm(); } private void registerRecever(){ rs=new SMSReceiver(); IntentFilter filter=new IntentFilter(); filter.addAction("android.provider.Telephony.SMS_RECEIVED"); filter.setPriority(1000); registerReceiver(rs, filter); } @Override public int onStartCommand(Intent intent, int flags, int startId) { // TODO Auto-generated method stub if(rs==null)registerRecever(); return START_STICKY; } public static WakeLock wakeLock = null; private static PowerManager pm = null; public static synchronized void acquireWakeLock(Context c) { if (null == wakeLock) { wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "smslock"); wakeLock.acquire(); } } public static synchronized void releaseWakeLock() { if (wakeLock == null) return; if (wakeLock.isHeld()) { wakeLock.release(); wakeLock = null; } } /** * 启动重复型定时器 */ public static void registerAlarm() { if(Config.getAlarm())return; Intent intent = new Intent(service, AlarmReceiver.class); pi = PendingIntent.getBroadcast(service, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); // 设置一个PendingIntent对象,发送广播 am = (AlarmManager) service.getSystemService(Context.ALARM_SERVICE); // 获取AlarmManager对象, Config.setAlarm(true); am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 30*60*1000, pi); } /** * 取消定时器 */ public static void unregisterAlarm() { am.cancel(pi); am = null; Config.setAlarm(false); }}
    2014-05-21下载
    积分:1
  • 实现txt文件的翻页
    本例子实现了对TXT文件的读取,主要展现翻页效果的制作
    2015-05-02下载
    积分:1
  • Android 单线程和多线程断点续传下载实例源码
    一个andorid多线程下载实例,基于断点续传的原理 构建,单线程和多线程断点下载的android模块代码,备注:   (1)该下载框架使用了ormlite框架   (2)如果使用生成的ghdownloadv1.2.jar作为引用的jar包,注意要把ormlite的jar包也一起引用   (3)在AndroidManifest.xml中要添加如下service
    2023-04-28 13:05:03下载
    积分:1
  • wifi语音对讲
    实现局域网内语音对讲发送文字
    2013-06-29下载
    积分:1
  • foursquared
    foursquared android 客户端源码,以前下载的,现在都不能下了,想看的童鞋们可以看看,代码写的没法说。(foursquared android client source code, previously downloaded, now can not come, and want to see the children s shoes can see, the code can not write that.)
    2011-12-07 21:14:43下载
    积分:1
  • android系统控制onvif协议摄像头app源码
    android-onvif是一个基于android系统控制onvif协议摄像头的软件项目,例如海康摄像头等。本项目已将接口封装,使用简单。后续将扩展更多功能。。。功能介绍探索与发现摄像头摄像头参数获取和获取摄像头账号密码修改摄像头的固件升级摄像头截图修改摄像头时间重启摄像头修改摄像头ip
    2021-05-06下载
    积分:1
  • 696518资源总数
  • 104297会员总数
  • 29今日下载