待兔 待兔
4年前
Android webview 与 js(Vue) 交互
js与原生交互分为两种情况:js调用原生方法,原生调用js方法。本文将对这两种情况分别讲解,H5端用vue实现。一、前期准备(Vue项目准备)本文的H5端用Vue实现,所以在正式开始前先把Vue项目环境准备好。项目写好后,执行npmrunserve命令启动项目,启动成功后会在命令
Wesley13 Wesley13
3年前
android dp和px之间转换
publicclassDensityUtil{/根据手机的分辨率从dip的单位转成为px(像素)/publicstaticintdip2px(Contextcontext,floatdpValue){
Stella981 Stella981
3年前
OCR识别的Android端实现
1.OCR简介OCR(OpticalCharacterRecognition,光学字符识别)是指电子设备(例如扫描仪或数码相机)检查纸上打印的字符,通过检测暗、亮的模式确定其形状,然后用字符识别方法将形状翻译成计算机文字的过程;2.Tesseract简介Tesseract是RaySmith于1985到1995年
Stella981 Stella981
3年前
Android 和风天气SDK获取天气
在编写app的时候遇到了记录天气的情况,所以将使用和风天气的过程记录下来。一、导入和风天气的jar包以及依赖jar包的下载链接https://dev.heweather.com/docs/sdk/android(https://www.oschina.net/action/GoToLink?urlhttps%
Stella981 Stella981
3年前
Android O seLinux 编译错误
编译androidO源码,遇到错误FAILED:out/target/product/hon450/obj/ETC/sepolicy_intermediates/sepolicy/bin/bashc"(out/host/linuxx86/bin/secilcMtrueGc30out/target/prod
Wesley13 Wesley13
3年前
unity android V1签名
unity2018版本默认签名会进行V1V2签名。如果只想进行V1签名的话可以进行以下操作。1.调整为gradle打包2.publishingsettings里面选择customgradletemplate,3.在gradle配置里面加入下述代码  !(https://oscimg.oschina.net/oscnet/up
Stella981 Stella981
3年前
Android app native代码性能分析
分析我们app中native层的C/C代码性能,能够方便我们找出其中的性能瓶颈,并在稍后做有针对性的优化。1\.下载androidndkprofiler工欲善其事,必先利其器,我们先要有良好的工具来支持我们做性能分析的愿望。androidndkprofiler就是目前我们可用的比较好
Stella981 Stella981
3年前
Android屏幕录制并转换gif
之前没注意到Androidstudio的AndroidMonitor选项卡有个录制视频的按钮,经@一息尚存和@Wing\_Li提醒才发现还真有这么个东东(AS真人性化,有木有觉得啊)。如下图!studioscreenrecord.png(http://static.oschina.net/uploads/img/201609/09100153_
Stella981 Stella981
3年前
Android的webview的设置参数
WebViewwebTestfindViewById(R.id.webview);WebSettingssettingswebTest.getSettings();settings.setJavaScriptEnabled(true);settings.setJav
Stella981 Stella981
3年前
Android沉浸式状态栏
//Activity 代码设置透明protected void onCreate(Bundle savedInstanceState) {    getWindow().requestFeature(Window.FEATURE_NO_TITLE);    if(Build.VERSION.SDK_INT  Buil