最终实现效果:
- 无版本概念,任何本地文件均可增量升级到最新.服务器不用管理多版本
- 内存小,100M文件升级时只占用500KB内存.
使用流程:
- 制作新版本,上传HTTP File Server.
- Client自动计算差异,下载差异,合并差异.
- done!
#0.起源
//wearversion | |
//wearlog | |
//wearvoiceinputenable | |
//wearvoiceinputdisable | |
//weargoogleapi | |
//assert | |
//pushassert | |
//uplog | |
//upcrash | |
//switchnotificationstatus |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.util.Xml; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class HtmlTextEditor extends WebView { | |
class JsObject { |
/** | |
* Created by gokhanbarisaker on 8/30/15. | |
*/ | |
public class PicassoDecoder implements ImageDecoder | |
{ | |
private String tag; | |
private String picasso; | |
public PicassoDecoder(String tag, Picasso picasso) { | |
this.tag = tag; |
RelativeLayout layout = (RelativeLayout) findViewById(R.id.rel); | |
GradientDrawable drawable = new GradientDrawable(); | |
drawable.setColors(new int[] { | |
Color.parseColor("#FFF6B7"), | |
Color.parseColor("#F6416C") | |
}); | |
drawable.setGradientType(GradientDrawable.LINEAR_GRADIENT); | |
drawable.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT); |
/* | |
* Copyright (c) 2018 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
route = 8.0.0.0/255.0.0.0 | |
route = 58.0.0.0/255.0.0.0 | |
route = 23.0.0.0/255.0.0.0 | |
route = 117.0.0.0/255.0.0.0 | |
route = 199.0.0.0/255.0.0.0 | |
route = 190.0.0.0/255.0.0.0 | |
route = 198.0.0.0/255.0.0.0 | |
route = 173.0.0.0/255.0.0.0 | |
route = 174.0.0.0/255.0.0.0 | |
route = 168.0.0.0/255.0.0.0 |
#! /usr/bin/env python | |
# Client and server for udp (datagram) echo. | |
# | |
# Usage: udpecho -s [port] (to start a server) | |
# or: udpecho -c host [port] <file (client) | |
import sys | |
from socket import * |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cyrilmottier.android.anapp"> | |
<!-- ... --> | |
<application | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/config_app_name" | |
android:theme="@style/Theme.AnApp" > |
最终实现效果:
使用流程:
#0.起源
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.PorterDuff; | |
import android.graphics.Shader; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.ClipDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.LayerDrawable; |