移动开发

ios weak和strong的区别

The difference is that an object will be deallocated as soon as there are no strong pointers to it. Even if weak pointers point to it, once the last strong pointer is gone, the object will be deallocated, and all remaining weak pointers will be zeroe

笔记 : 移动端1像素细线解决思路

最近一直在vue移动端项目,每次一开始就要解决border:1px的问题,参考了大牛的文章后自己总结下来当作笔记 参考 : 张鑫旭:http://www.zhangxinxu.com/wordpress/2012/08/window-devicepixelratio/ https://www.cnblogs.com/lunarorbitx/p/5287309.html 产生原因 :  在Retina屏幕上(Retina是一种像素压缩屏幕,把更多的像素压缩到一块屏幕里达到为了更高的分辨率,其分辨率

移动混合开发之android文件管理新建文件和删除文件

今天经过一天超过8小时的实践,有很多CSS上的细节需要注意: 1, /*注意是对before的操作*/ .content ul li .icon-check-empty:before{ display: block; /*webFont设置其width和height时无效,只有设置font-size*/ /*width: 3rem;*/ /*height: 3rem;*/ font-size: 1.5rem; position: absolute; top:0; left: 0; bottom:

Android学习—超简单实现带进度ProgressBar滚动条

思路:想在ProgressBar上显示百分比进度,百度.google搜索一下,满屏都是那个TextProgressBar,我没引用那个,当时觉得应该可以更简单的实现,于是直接就在UI上面尝试,把ProgressBar放在RelativeLayout布局中,并在ProgressBar后面加个TextView,使这两个控件叠加就解决了,下面是xml,可以参考~ 效果图: XML: <?xml version="1.0" encoding="utf-8"?>

Android事件分发机制——Touch事件

1. 简介 先来看一个表: Touch事件相关方法 功能 Activity ViewGroup View public boolean dispatchTouchEvent(MotionEvent ev) 事件分发 Yes Yes Yes public boolean onInterceptTouchEvent(MotionEvent ev) 事件拦截 No Yes No public boolean onTouchEvent(MotionEvent ev) 事件响应 Yes Yes Yes 从

Spring boot 梳理 - 在bean中使用命令行参数-自动装配ApplicationArguments

If you need to access the application arguments that were passed to SpringApplication.run(-?), you can inject a org.springframework.boot.ApplicationArguments bean. The ApplicationArguments interface provides access to both the raw String[] arguments

android 资源文件数组(string, int)

1 /** 2 * 字符串数组 3 */ 4 private String[] dirString; 5 6 /** 7 * 图片资源ID数组 8 */ 9 private int[] dirInt; 10 11 @Override 12 protected void onCreate(Bundle savedInstanceState) { 13 super.onCreate(savedInstanceState); 14 Resources res = getResources(); 15

android资源文件

代码与资源分离原则:便于维护与修改shape:定义图形 selector:按照不同的情况加载不同的color或drawable layer-list:从下往上图形层叠加载 资源文件有:/res/drawable(图形资源及帧动画.xml)./res/layout(界面布局资源)./res/values(各种数据资源,eg:strings.colors.dimens etc.)/res/menu(菜单布局资源)./res/anim(动画资源'补间动画')./res/raw(原始资源 eg:*.tx

移动端专用数据库Realm介绍

目前我们一个Swift iOS App使用了Realm做数据存储,放弃了CoreData和Sqlite.     项目地址 https://github.com/realm Realm是一个直接运行在手机,平板,可穿戴设备的移动端数据库,Sqlite和ORM框架的替代品.有Android,iOS和React native js版本.realm-cocoa项目包括           iOS/OS X版本的Objc和Swift实现. 特性: Mobile-first: Realm是第一个直接针对运

ios开发-UI-自定义Tabbar 图书布局

#import "ViewController.h" #import "CGTabbar.h" #import "QHCListView.h" #import "QHJavaListView.h" #import "QHOCListView.h" @interface ViewController ()<CGTabbarDelegate> @property(nonatomic,strong)N

ios 将随意对象存进数据库

要将一个对象存进数据库的blob字段,最好先转为NSData.一个对象要遵守NSCoding协议,实现协议中对应的方法,才干转成NSData. NSData *statusData = [NSKeyedArchiver archivedDataWithRootObject:obj]; [_db executeUpdateWithFormat:@"INSERT INTO t_a(a, idstr) VALUES (%@, %@);", ajson, idstr];//假设将一个json字

android开发之APP Widget

android开发之APP Widget 本博文主要讲述的android开发中的桌面程序的开发--APP widget,主要用的是PendingIntent和RemoteViews. PendingIntent主要用来设置桌面程序的相应方式.此对象可以有三种Intent方式,第一个是开始一个新的Activity,第二个是发送一个广播,第三个是开始一个service. RemoteViews的作用:因为桌面程序和app程序不是属于一个进程,不能通过正常的操作控件的方式来操作.需要使用系统提供的Re

Android好奇宝宝_番外篇_看脸的世界_05

上一篇番外篇讲了一个炒鸡炒鸡简单的自定义ProgressBar,这一篇基于上一篇的基础扩展为SeekBar,没看过上一篇的,请先看一遍:传送门 先上效果图(2G内存的机子运行模拟器,所以有点卡): 这个效果之前不知道在哪里看到过,我也忘了. 下面进入正题: 测量大小和绘制部分沿用上一篇ProgressBar的,不清楚的请走上面的传送门. 对比上一篇的扩展: (1)SeekBar能通过触摸改变刻度 (2)SeekBar上方添加一个显示当前刻度的浮动View(后面用FloatView表示) (1)通

三、Android学习第三天——Activity的布局初步介绍(转)

(转自:http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html) 三.Android学习第三天——Activity的布局初步介绍 今天总结下Activity相关布局的一些知识: Activity最简单跟常用的布局分为两种: ①LinearLayout -- 线性布局 ②TableLayout -- 表格布局 ③RelativeLayout -- 相对布局(今后将会频繁的使用到这个布局) 下面来简单总结下前两种(线性/表格)布局当中常用到

app概念设计

翻译自:https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/AppDevelopmentProcess.html#//apple_ref/doc/uid/TP40011343-CH4-SW1 Ask yourself these questions as your define your concept: Who is your audience? Your app content

ios学习之旅--oc对象的关系

1.匿名对象:就是没有名字对象 1.匿名对象仅用一次 使用场景: 1.当我们仅仅要调用一个对象的某个方法一次的时候能够使用匿名对象 2.匿名对象能够作为函数的实际參数 #import <Foundation/Foundation.h> #import "CZPerson.h" #import "CZBook.h" @interface CZBook : NSObject @end @implementation CZBook @end @interfac

Android RakNet 系列之四 实现消息、语音、文件传输

简介 RakNet在Win平台上已经实现消息.语音.文件传输了,但在Android平台下尚未实现,笔者决定把源码移植到Android平台下测试. 详情 实现消息 项目自带Chat Example Client和Chat Example Server实现消息,源码简单易懂,此处就不介绍了,直接贴上图片. 测试通过,消息是以Toast方式显示的,图片未捕捉到显示. 实现语音 Win平台下实现语音是通过Portaudio进行的,Portaudio尚未支持Android,要实现语音怎么办? Java层实

Android:仿手机QQ好友动态的ListView

1.介绍: 本博客使用XListView模仿Android版QQ好友动态的ListView效果.效果截图例如以下: 效果图1 效果图2 这里面主要涉及的是ListView的布局问题,让我们看一下Item的布局文件吧. <?xml version="1.0" encoding="utf-8"? > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&

Method and system for public-key-based secure authentication to distributed legacy applications

A method, a system, an apparatus, and a computer program product are presented for an authentication process. A host application or system within a distributed data processing system supports one or more controlled resources, such as a legacy applica

Android开发学习---template requires a minimum SDK version of at least 7,build target API version of 14

adt 22.6.3的bug 当adt更新到22.6.3,其编辑器中最低支持api7,即android 2.1,这里可能是google故意这么做的,也可能是其bug.其target sdk 和compile sdk最低都为14,即anroid 4.0,这里建议都设为最高的api 19,即android 4.4;否则会一直报错,类似错误如下: This template requires a minimum SDK version of at least 7, and the current mi