前言
1、这个问题困扰我n久n久
2、网上出现很多解决方案,大多是设置lanchModel 虽然这样能解决一些问题,但是不能完全解决,且与我的情况也不相符
解决方案:
方案一:
1、如果你的程序又管理activity的栈,可以在启动LogoActivity的onCreate中判断这个栈是存在其他的activity 如果有 本身直接 finish + return 。这样是...
分类:
移动开发 时间:
2014-12-04 12:13:03
阅读次数:
158
基本过程是android作为socket客户端将采集到的每一帧图像数据发送出去,PC作为服务器接收并显示每一帧图像实现远程监控。图片如下(后来PC端加了个拍照功能)。。。
(PS。刚学android和java不久很多东西还不懂,高手若是知道哪些地方可以继续优化的话还请多多指点下啊)
系统代码如下:
一、android手机客户端
(1)AndroidManifest...
分类:
移动开发 时间:
2014-12-04 12:14:56
阅读次数:
246
唯一标识码这东西在网络应用中非常有用,例如检测是否重复注册之类的。
[java] view
plaincopy
import android.provider.Settings.Secure;
private String android_id = Secure.getString(getContext().getContentResolver()...
分类:
移动开发 时间:
2014-12-04 12:11:02
阅读次数:
274
主程序:
public class WebPageLoader extends Activity{
final Activity activity = this;
@Override
public void onCreate(Bundle savedInstanceState)
{
sup...
分类:
移动开发 时间:
2014-12-04 12:11:48
阅读次数:
181
先自定义一个UITabbarController,用于Storyboard中
再在MyTabbarController中实现protocol
@interface MyTabbarController : UITabBarController
@end再实现代理里面的方法
@implementation MyTabbarController
- (BOOL)tabBar...
分类:
移动开发 时间:
2014-12-04 12:11:40
阅读次数:
349
atomic是Objc使用的一种线程保护技术,基本上来讲,是防止在写未完成的时候被另外一个线程读取,造成数据错误。而这种机制是耗费系统资源的,所以在iPhone这种小型设备上,如果没有使用多线程间的通讯编程,那么nonatomic是一个非常好的选择。...
分类:
移动开发 时间:
2014-12-04 12:09:50
阅读次数:
152
ICS/ICS2:
1、请修改 packages\apps\Launcher2\res\layout\apps_customize_pane.xml
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/co...
分类:
移动开发 时间:
2014-12-04 12:09:29
阅读次数:
239
将 LauncherApplication.java 中的 sLongPressTimeOut 值改大
原值为 300
可以将它改为 600或者合适的timeout 值...
分类:
移动开发 时间:
2014-12-04 12:09:48
阅读次数:
133
1.替换一个中文输入法。比如搜狗:sogou_pinyin_linux_1.1.0.0037_amd64.deb
下载网址:http://pinyin.sogou.com/linux/
2.下载vim编辑器, 可以使用sudo apt-get install vim 链接到网络进行下载。
使用apt-get install vim 之前需要配置apt-get /etc/...
分类:
移动开发 时间:
2014-12-04 12:06:47
阅读次数:
277
修改Launcher2/res/value/Dimens.xml 中apps_customize_cell_width 和apps_customize_cell_height的大小。多大的值合适,需要结合代码。
PagedViewCellLayout 中estimateCellHSpan和estimateCellVSpan获取返回值n(n就是每屏单元格数目的列和行)。
以estim...
分类:
移动开发 时间:
2014-12-04 12:09:05
阅读次数:
140
1、请找到对应的res资源,修改styles.xml,将
0dp
4dp
4dp
@dimen/app_icon_padding_top
4dp
13sp
改为:
0dp
4dp
4dp
...
分类:
移动开发 时间:
2014-12-04 12:08:05
阅读次数:
446
添加Default-568h@2x.png就好了...
分类:
移动开发 时间:
2014-12-04 12:06:05
阅读次数:
118
在JavaScrip中,function是内置的类对象,也就是说它是一种类型的对象,可以和其它String、Array、Number、Object类的对象一样用于内置对象的管理。因为function实际上是一种对象,它可以“存储在变量中,通过参数传递给(别一个)函数(function),在函数内部创...
分类:
移动开发 时间:
2014-12-04 12:05:28
阅读次数:
235
1、在oncreate 里获取手机屏幕宽和高度1 DisplayMetrics dm = new DisplayMetrics();2 getWindowManager().getDefaultDisplay().getMetrics(dm);// 取得窗口属性3 int screenWidth =...
分类:
移动开发 时间:
2014-12-04 12:05:18
阅读次数:
154
原理:用 setTestProviderLocation 设置模拟gps的位置 http://androidcookbook.com/Recipe.seam?recipeId=1229 http://www.2cto.com/kf/201401/275543.html https://github....
分类:
移动开发 时间:
2014-12-04 12:02:35
阅读次数:
191
1. request 的setAttribute与getAttribute方法一般都是成对出现的,首先通过setAttribute方法设置属性与属性值,然后通过getAttribute方法根据属性获取到与该属性对应的对象值(获取到之后一般都需要进行向下类型转换,将属性值转换为真正的对象)。setA....
分类:
移动开发 时间:
2014-12-04 12:04:53
阅读次数:
168
转自:http://blog.csdn.net/chonbj/article/details/25133247像我一样记不住iOS应用图标像素尺寸的开发者不在少数,我经常需要查询不同设备上的应用尺寸,为了方便自己、方便大家,我制作了下面的图表供大家参考。iPhone、iPodTouch以及一般通用的...
分类:
移动开发 时间:
2014-12-04 11:59:45
阅读次数:
317