传数据:Intent intent=getIntent(); String curCity=intent.getStringExtra("cur_city"); Intent intent = new Intent(MainActivity.this, CityRank.class); intent ...
分类:
其他好文 时间:
2017-09-26 22:22:12
阅读次数:
139
Android页面之间进行数据回传 要求:页面1跳转到页面2,页面2再返回页面1同时返回数据 页面1添加如下代码: Intent intent = new Intent(); intent.setClass(页面1.this, 页面2.class); Bundle bundle = new Bund ...
分类:
移动开发 时间:
2017-09-26 19:34:37
阅读次数:
168
Android的Acitivity启动大致有两种方式:显式启动与隐式启动。下面分别介绍: 1.显示启动: 清单文件注册Activity 启动方法: 2.隐式启动 隐式启动不同之处在于我们并不需要像Intent(MainActivity.this, SecondActivity.class)这样传参数 ...
分类:
其他好文 时间:
2017-09-25 11:51:53
阅读次数:
152
使用”react-native run-android”命令运行android应用时,如果常常出现如下错误: Starting the app (/home/xxx/soft/sdk//platform-tools/adb shell am start -n xxx/.MainActivity)… ...
分类:
移动开发 时间:
2017-09-25 01:00:19
阅读次数:
823
Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.setPackage(getPackageName()); intent.addCategory(Intent.CATEGORY_SAMPLE_CODE); PackageMan... ...
分类:
移动开发 时间:
2017-09-24 13:40:32
阅读次数:
476
1 前言 数据库大并发操作要考虑死锁和锁的性能问题。看到网上大多语焉不详(尤其更新锁),所以这里做个简明解释,为下面描述方便,这里用T1代表一个数据库执行请求,T2代表另一个请求,也可以理解为T1为一个线程,T2 为另一个线程。T3,T4以此类推。下面以SQL Server(2005)为例。 1 前 ...
分类:
数据库 时间:
2017-09-23 18:45:41
阅读次数:
174
1.概述 最近越来越不想写代码了,特别是一些重复性的代码,比如由于每次启动一个 Activity,我们都会很习惯的在 Activity 中写下: public static void launch(Activity activity) { Intent intent = new Intent(); ...
分类:
移动开发 时间:
2017-09-23 16:18:51
阅读次数:
171
1 /** 2 * IntentService is a base class for {@link Service}s that handle asynchronous 3 * requests (expressed as {@link Intent}s) on demand. Clients s... ...
分类:
其他好文 时间:
2017-09-22 10:18:29
阅读次数:
177
package com.coolweather.android;import android.content.Intent;import android.content.SharedPreferences;import android.preference.PreferenceManager;imp ...
分类:
其他好文 时间:
2017-09-20 20:49:42
阅读次数:
138
1.使用通知 1.1简介 通知指的是某个应用程序希望想用户发出一些提示信息,而该应用程序又不在前台运行时,就需要借助通知来实现。 1.2通知的基本用法 步骤: 1)实例化NotificationManager 2)设置PendingIntent用于跳转活动,发送广播,启动服务。 (该方法有四个参数, ...
分类:
移动开发 时间:
2017-09-20 19:26:22
阅读次数:
310