① 急求html 自定义滚动条,仿iphone特效

一流素材网和懒人图库上有这样的js特效

② 【html5模仿ios滚轮控件】帮我修改这个JS的传值部分

你好厉害啊。膜拜···

③ 如何通过 HTML5 实现 iOS 7 的实时毛玻璃模糊效果

首先看效果:


要想通过HTML5实现IOS7的毛玻璃模糊效果需要用代码来执行

//加模糊效果,image是图片,blur是模糊度

- (UIImage *)blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur {

//模糊度,

if ((blur < 0.1f) || (blur > 2.0f)) {

blur = 0.5f;

}

//boxSize必须大于0

int boxSize = (int)(blur * 100);

boxSize -= (boxSize % 2) + 1;

NSLog(@"boxSize:%i",boxSize);

//图像处理

CGImageRef img = image.CGImage;

//需要引入#import <Accelerate/Accelerate.h>

/*

This document describes the Accelerate Framework, which contains C APIs for vector and matrix math, digital signal processing, large number handling, and image processing.

本文档介绍了Accelerate Framework,其中包含C语言应用程序接口(API)的向量和矩阵数学,数字信号处理,大量处理和图像处理。

*/

//图像缓存,输入缓存,输出缓存

vImage_Buffer inBuffer, outBuffer;

vImage_Error error;

//像素缓存

void *pixelBuffer;

//数据源提供者,Defines an opaque type that supplies Quartz with data.

CGDataProviderRef inProvider = CGImageGetDataProvider(img);

// provider’s data.

CFDataRef inBitmapData = CGDataProviderCopyData(inProvider);

//宽,高,字节/行,data

inBuffer.width = CGImageGetWidth(img);

inBuffer.height = CGImageGetHeight(img);

inBuffer.rowBytes = CGImageGetBytesPerRow(img);

inBuffer.data = (void*)CFDataGetBytePtr(inBitmapData);

//像数缓存,字节行*图片高

pixelBuffer = malloc(CGImageGetBytesPerRow(img) * CGImageGetHeight(img));

outBuffer.data = pixelBuffer;

outBuffer.width = CGImageGetWidth(img);

outBuffer.height = CGImageGetHeight(img);

outBuffer.rowBytes = CGImageGetBytesPerRow(img);

// 第三个中间的缓存区,抗锯齿的效果

void *pixelBuffer2 = malloc(CGImageGetBytesPerRow(img) * CGImageGetHeight(img));

vImage_Buffer outBuffer2;

outBuffer2.data = pixelBuffer2;

outBuffer2.width = CGImageGetWidth(img);

outBuffer2.height = CGImageGetHeight(img);

outBuffer2.rowBytes = CGImageGetBytesPerRow(img);

//Convolves a region of interest within an ARGB8888 source image by an implicit M x N kernel that has the effect of a box filter.

error = vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer2, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend);

error = vImageBoxConvolve_ARGB8888(&outBuffer2, &inBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend);

error = vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend);

if (error) {

NSLog(@"error from convolution %ld", error);

}

// NSLog(@"字节组成部分:%zu",CGImageGetBitsPerComponent(img));

//颜色空间DeviceRGB

CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

//用图片创建上下文,CGImageGetBitsPerComponent(img),7,8

CGContextRef ctx = CGBitmapContextCreate(

outBuffer.data,

outBuffer.width,

outBuffer.height,

8,

outBuffer.rowBytes,

colorSpace,

CGImageGetBitmapInfo(image.CGImage));

//根据上下文,处理过的图片,重新组件

CGImageRef imageRef = CGBitmapContextCreateImage (ctx);

UIImage *returnImage = [UIImage imageWithCGImage:imageRef];

//clean up

CGContextRelease(ctx);

CGColorSpaceRelease(colorSpace);

free(pixelBuffer);

free(pixelBuffer2);

CFRelease(inBitmapData);

CGColorSpaceRelease(colorSpace);

CGImageRelease(imageRef);

return returnImage;

}

这里要注意的是以上的代码会有崩溃的情况

崩溃log:Assertion failed: (!space->is_singleton), function color_space_dealloc, file ColorSpaces/color-space

可以用如下方式来实现


- (UIImage*)applyBlurRadius:(CGFloat)radius toImage:(UIImage*)image

{

if(radius < 0) radius = 0;

CIContext*context = [CIContextcontextWithOptions:nil];

CIImage*inputImage = [CIImageimageWithCGImage:image.CGImage];

// Setting up gaussian blur

CIFilter*filter = [CIFilterfilterWithName:@"CIGaussianBlur"];

[filtersetValue:inputImageforKey:kCIInputImageKey];

[filtersetValue:[NSNumbernumberWithFloat:radius]forKey:@"inputRadius"];

CIImage*result = [filtervalueForKey:kCIOutputImageKey];

CGImageRefcgImage = [contextcreateCGImage:resultfromRect:[inputImageextent]];

UIImage*returnImage = [UIImageimageWithCGImage:cgImage];

CGImageRelease(cgImage);

returnreturnImage;

}

④ 高仿的iPhone自带仿iOS的安卓5.1 想刷成mui 或者 Flyme的系统 怎么样刷机

可以试试Kingroot,一键root,或者是root精灵。
或者是直接利用救砖程序刷一遍,再换其他系统。

⑤ 求一款仿苹果桌面的软件,忘记叫我什么名字了!

http://www.skycn.com/soft/44217.html#downUrlMap 本程序可以在几秒钟内将XP的界面转换到精美的苹果机样式。你只需要点击一次按钮,本程序就可以将XP的各种界面元素,如窗口外观(可视风格)、系统图标、鼠标指针、系统声音、登陆画面、桌面壁纸以及Doc快捷工具栏完全改变成为苹果机样式,让您在XP下也能体验苹果机的超炫界面!

⑥ 请问高仿手机 能仿出苹果的IOS系统吗 有的说能仿苹果的IOS一模一样

绝无可能,奸商嘴里所谓的一模一样,其实也就是把安卓界面贴图换成iOS一样而已,iOS的软件它照样一个都不能用。
如果那些人真的有那么厉害的技术能自己做一个跟正品iOS一模一样的操作系统出来,他们也没必要做山寨机了

⑦ 网上那些高仿苹果是怎么弄的,修改ROM么怎么让安卓变成仿苹果

安卓机不能刷苹果系统。
至于高仿,你可以通过几款软件来实现
ilauncher
inoty
isetting
......

⑧ 如何实现网页代码(JS/HTML)和IOS应用程序交互

//①ji与android交互
//js调用android方法
window.类.方法名称(参数1,参数2);
//android调用js方法(loginIn:方法名称,uname:参数)
//activity.loadUrl("javascript:loginIn('"+uname+"');");

//②js与ios交互
//js调用ios方法(objc:协议)
window.location.href='objc://方法名称|参数1|参数2';
//ios调用js方法:
同android

其中:android的activity如下:

@Override
publicvoidonCreate(BundlesavedInstanceState){
//setFullScreen(true);
Intentintent=newIntent(getApplicationContext(),
SplashActivity.class);
startActivity(intent);
super.onCreate(savedInstanceState);
super.init();
//Setby<contentsrc="index.html"/>inconfig.xml
activity=this;
//this.appView.setBackgroundResource(R.drawable.welcome);//设置背景图片
//
//super.setIntegerProperty("splashscreen",R.drawable.welcome);

//设置闪屏背景图片
//super.setBooleanProperty(name,value)
//super.loadUrl("这里是html页面的路径");
super.appView.addJavascriptInterface(newFu(),"这里是类名(js中需要通过这个类名访问android方法)");
super.loadUrl(Config.getStartUrl());

//super.loadUrl("file:///android_asset/www/index.html")
//mController.openShare(activity,false);
//try{
//getToken();
//}catch(NoSuchAlgorithmExceptione){
////TODOAuto-generatedcatchblock
////e.printStackTrace();
//}

}

⑨ 仿ios的悬浮窗查看最近应用怎么不能用

在一些场合里,我们使用悬浮窗会有很大的便利,比如IOS系统的悬浮窗,360或者其他手机卫士的悬浮窗等等。
我们创造出两个悬浮窗,通过点击小悬浮窗打开或者关闭大悬浮窗。
代码如下:
在这之前,我们需要在manifest中申请权限:
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
1
并且,悬浮窗这个权限我们需要手动在手机找到应用权限管理,允许这个权限才行
小悬浮窗的界面代码float_normal_view.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ll_float_normal"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_show_control_view"
android:layout_gravity="center"
android:background="@drawable/float_bg"
android:layout_width="65dp"
android:orientation="vertical"
android:alpha="0.3"
android:layout_height="65dp" >
</ImageView>
</LinearLayout>
大悬浮窗的界面代码float_window_big.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="/apk/res/android"
android:id="@+id/big_window_layout"
android:layout_width="200dip"
android:layout_height="100dip"
android:background="@android:color/holo_green_dark"
android:orientation="vertical"
>
<Button
android:id="@+id/close"
android:layout_width="100dip"
android:layout_height="40dip"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dip"
android:text="关闭悬浮窗"
/>
<Button
android:id="@+id/back"
android:layout_width="100dip"
android:layout_height="40dip"
android:layout_gravity="center_horizontal"
android:text="主页"
/>
</LinearLayout>
入口activity(MainActivity ):
public class MainActivity extends Activity {
MyWindowManager myWindowManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if(!Settings.canDrawOverlays(getApplicationContext())) {
//启动Activity让用户授权
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
intent.setData(Uri.parse("package:" + getPackageName()));
startActivityForResult(intent,100);
}
}
setContentView(R.layout.activity_main);
myWindowManager = MyWtijian.scykxy.cn#indowManager.getInstance();
myWindowManager.createNormalView(this.getApplicationContext());
}
}
悬浮窗管理器MyWindowManager:
public class MyWindowManager {
private FloatNormalView normalView;
private Context mContext;
private static MyWindowManager instance;
private WindowManager windowManager;
private MyWindowManager() {
}
public static MyWindowManager getInstance() {
if (instance == null)
instance = new MyWindowManager();
return instance;
}
private WindowManager getWindowManager(Context context) {
if (windowManager == null)
windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
mContext=context;
return windowManager;
}
/**
* 判断小悬浮窗是否存在
*
* @return
*/
public boolean isNormalViewExists() {
return normalView != null;
}
/**
* 创建小型悬浮窗
*/
public void createNormalView(Context context) {
if (normalView == null) {
normalView = new FloatNormalView(context);
}
}
/**
* 移除悬浮窗
*
* @param context
*/
public void removeNormalView(Context context) {
if (normalView != null) {
windowManager.removeView(normalView);
normalView = null;
}
}
FloatWindowBigView bigWindow;
private WindowManager.LayoutParams bigWindowParams;
public void createBigWindow(Context context) {
WindowManager windowManager = getWindowManager(context);
int screenWidth = windowManager.getDefaultDisplay().getWidth();
int screenHeight = windowManager.getDefaultDisplay().getHeight();
if (bigWindow == null) {
bigWindow = new FloatWindowBigView(context);
if (bigWindowParams == null) {
bigWindowParams = new WindowManager.LayoutParams();
bigWindowParams.x = screenWidth / 2 - FloatWindowBigView.viewWidth / 2;
bigWindowParams.y = screenHeight / 2 - FloatWindowBigView.viewHeight / 2;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
bigWindowParams.type =WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
}
else {
bigWindowParams.type = WindowManager.LayoutParams.TYPE_PHONE;
}
bigWindowParams.format = PixelFormat.RGBA_8888;
bigWindowParams.gravity = Gravity.LEFT | Gravity.TOP;
bigWindowParams.width = FloatWindowBigView.viewWidth;
bigWindowParams.height = FloatWindowBigView.viewHeight;
}
windowManager.addView(bigWindow, bigWindowParams);
}
}
public void removeBigWindow(Context context) {
if (bigWindow != null) {
WindowManager windowManager = getWindowManager(context);
windowManager.removeView(bigWindow);
bigWindow = null;
}
}
}
小悬浮窗FloatNormalView:
public class FloatNormalView extends LinearLayout implements View.OnTouchListener {
private final static String TAG="FloatNormalView";
/**
* 记录小悬浮窗的宽度
*/
public static int viewWidth;
/**
* 记录小悬浮窗的高度
*/
public static int viewHeight;
/**
* 记录系统状态栏的高度
*/
private static int statusBarHeight;
/**
* 用于更新小悬浮窗的位置
*/
private WindowManager windowManager;
/**
* 小悬浮窗的参数
*/
private WindowManager.LayoutParams mParams;
/**
* 记录当前手指位置在屏幕上的横坐标值
*/
private float xInScreen,xInitScreen;
/**
* 记录当前手指位置在屏幕上的纵坐标值
*/
private float yInScreen,yInitScreen;
/**
* 记录手指按下时在屏幕上的横坐标的值
*/
private float xDownInScreen;
/**
* 记录手指按下时在屏幕上的纵坐标的值
*/
private float yDownInScreen;
/**
* 记录手指按下时在小悬浮窗的View上的横坐标的值
*/
private float xInView;
/**
* 记录手指按下时在小悬浮窗的View上的纵坐标的值
*/
private float yInView;
public FloatNormalView(Context context) {
super(context);
windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
LayoutInflater.from(context).inflate(R.layout.float_normal_view, this);
View view = findViewById(R.id.ll_float_normal);
viewWidth = view.getLayoutParams().width;
viewHeight = view.getLayoutParams().height;
initLayoutParams();
}
OnClickListener circleClickListener=new OnClickListener() {
@Override
public void onClick(View view) {
MyWindowManager.getInstance().createBigWindow(getContext());
MyWindowManager.getInstance().removeNormalView(getContext());
}
};
/**
* 初始化参数
*/
private void initLayoutParams() {
//屏幕宽高
int screenWidth = windowManager.getDefaultDisplay().getWidth();
int screenHeight = windowManager.getDefaultDisplay().getHeight();
mParams = new WindowManager.LayoutParams();
// FLAG_NOT_TOUCH_MODAL不阻塞事件传递到后面的窗口
// FLAG_NOT_FOCUSABLE 悬浮窗口较小时,后面的应用图标由不可长按变为可长按,不设置这个flag的话,home页的划屏会有问题
mParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
//悬浮窗默认显示的位置
mParams.gravity = Gravity.START | Gravity.TOP;
//指定位置
mParams.x = screenWidth - viewWidth * 2;
mParams.y = screenHeight / 2 + viewHeight * 2;
//悬浮窗的宽高
mParams.width = WindowManager.LayoutParams.WRAP_CONTENT;
mParams.height = WindowManager.LayoutParams.WRAP_CONTENT;
mParams.format = PixelFormat.TRANSPARENT;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mParams.type =WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
}
else {
mParams.type = WindowManager.LayoutParams.TYPE_PHONE;
}
mParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
windowManager.addView(this, mParams);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
Log.i(TAG,"hsz--->onTouchEvent:"+event.getAction());
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
// 手指按下时记录必要数据,纵坐标的值都需要减去状态栏高度
xInView =xInitScreen= event.getX();
yInView =yInitScreen= event.getY();
xDownInScreen = event.getRawX();
yDownInScreen = event.getRawY() - getStatusBarHeight();
xInScreen = event.getRawX();
yInScreen = event.getRawY() - getStatusBarHeight();
break;
case MotionEvent.ACTION_MOVE:
xInScreen = event.getRawX();
yInScreen = event.getRawY() - getStatusBarHeight();
// 手指移动的时候更新小悬浮窗的位置
updateViewPosition();
break;
case MotionEvent.ACTION_UP:
// 如果手指离开屏幕时,xDownInScreen和xInScreen相等,且yDownInScreen和yInScreen相等,则视为触发了单击事件。
if (xDownInScreen == xInScreen && yDownInScreen == yInScreen) {
openOrCloseControlView();
}
Float distanceX=event.getX()-xInitScreen;
Float distanceY=event.getY()-yInitScreen;
if(distanceX==0 && distanceY==0){
MyWindowManager.getInstance().createBigWindow(getContext());
MyWindowManager.getInstance().removeNormalView(getContext());
}
break;
default:
break;
}
return true;
}
/**
* 将小悬浮窗的参数传入,用于更新小悬浮窗的位置。
*
* @param params 小悬浮窗的参数
*/
public void setParams(WindowManager.LayoutParams params) {
mParams = params;
}
/**
* 更新小悬浮窗在屏幕中的位置。
*/
private void updateViewPosition() {
mParams.x = (int) (xInScreen - xInView);
mParams.y = (int) (yInScreen - yInView);
windowManager.updateViewLayout(this, mParams);
}
/**
* 用于获取状态栏的高度。
*
* @return 返回状态栏高度的像素值。
*/
private int getStatusBarHeight() {
if (statusBarHeight == 0) {
try {
Class<?> c = Class.forName("com.android.internal.R$dimen");
Object o = c.newInstance();
Field field = c.getField("status_bar_height");
int x = (Integer) field.get(o);
statusBarHeight = getResources().getDimensionPixelSize(x);
} catch (Exception e) {
e.printStackTrace();
}
}
return statusBarHeight;
}
@Override
public boolean onTouch(View v, MotionEvent event) {
return false;
}
}
大悬浮窗FloatWindowBigView:
public class FloatWindowBigView extends LinearLayout {
/**
* 记录大悬浮窗的宽度
*/
public static int viewWidth;
/**
* 记录大悬浮窗的高度
*/
public static int viewHeight;
public FloatWindowBigView(final Context context) {
super(context);
LayoutInflater.from(context).inflate(R.layout.float_window_big, this);
View view = findViewById(R.id.big_window_layout);
viewWidth = view.getLayoutParams().width;
viewHeight = view.getLayoutParams().height;
Button close = (Button) findViewById(R.id.close);
Button back = (Button) findViewById(R.id.back);
close.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// 点击关闭悬浮窗的时候
MyWindowManager.getInstance().removeBigWindow(context);
MyWindowManager.getInstance().createNormalView(context);
}
});
back.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// 点击主页的时候,移除大悬浮窗,创建小悬浮窗
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addCategory(Intent.CATEGORY_HOME);
context.startActivity(intent);
MyWindowManager.getInstance().removeBigWindow(context);
MyWindowManager.getInstance().createNormalView(context);
}
});
}
}