首页 文章 精选 留言 我的

精选列表

搜索[android studio],共10000篇文章
优秀的个人博客,低调大师

Android分析第三方应用layout的神器

hierarchyviewer.bat或者monitor.bat一直都是分析layout的神器,只是。非常多时候不好用,连不上真机,害的我不得不使用模拟器来分析layout。 今天发现了另外一个神器。就在ADT里面,它就躺在那。我怎么一直就没发现? Dump View Hierarchy for UI Automator 本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5224505.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

android按钮的操作例子,简单大家看明白_基础篇

主代码量,很少吧。大家一下,就明白。哈哈, publicvoidonCreate(BundlesavedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.main); TextViewmyTextView=(TextView)findViewById(R.id.myTextView); ButtonmyButton=(Button)findViewById(R.id.myButton);//取得按扭的内容 myTextView.setText("我的第一个TextView");//请注意显示的时候在哪里。 myButton.setText("我的第一个Button"+"\n"+"Smart测试程序");//按扭换行了吧。另外大家在看的时候,请注意一下 //,main.xml文件与strings.xml写法。 } 附件:http://down.51cto.com/data/2357527 本文转自 llb988 51CTO博客,原文链接:http://blog.51cto.com/llb988/487629,如需转载请自行联系原作者

优秀的个人博客,低调大师

OpenCV的+安卓+号牌识别(OpenCV + Android + 图像水平矫正)

/** * 价签矫正 */ public void getContouresPic (Bitmap source) { Mat imageSobleOutThreshold = new Mat(); Mat gray = new Mat(); Utils.bitmapToMat(source, imageSobleOutThreshold); Imgproc.cvtColor(imageSobleOutThreshold, imageSobleOutThreshold, Imgproc.COLOR_BGR2GRAY); Imgproc.threshold(imageSobleOutThreshold, gray, 125, 225, Imgproc.THRESH_BINARY);//maxVal就是控制黑白反转的,0是黑 //Utils.matToBitmap(gray, source); ArrayList<RotatedRect> rects = new ArrayList<RotatedRect>(); ArrayList<MatOfPoint> contours = new ArrayList<MatOfPoint>(); Imgproc.findContours(gray, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_NONE); for(int i=0;i<contours.size();i++){ Rect rect = Imgproc.boundingRect(contours.get(i)); if (rect.width > 500 && rect.width/rect.height == 1) { MatOfPoint2f mp2f = new MatOfPoint2f(contours.get(i).toArray()); RotatedRect mr = Imgproc.minAreaRect(mp2f); double area = Math.abs(Imgproc.contourArea(mp2f)); double angle = mr.angle+90; Mat ratationedImg = new Mat(gray.rows(), gray.cols(), CvType.CV_8UC3); ratationedImg.setTo(new Scalar(0, 0, 0)); Point center = mr.center;//中心点 Mat m2 = Imgproc.getRotationMatrix2D(center, angle, 1); Imgproc.warpAffine(imageSobleOutThreshold, ratationedImg, m2, imageSobleOutThreshold.size(), 1, 0, new Scalar(0) );//仿射变换 Utils.matToBitmap(ratationedImg, source); File file = new File(Environment.getExternalStorageDirectory()+"/AiLingGong/", "ll"+System.currentTimeMillis()+".jpg"); try { FileOutputStream out = new FileOutputStream(file); source.compress(Bitmap.CompressFormat.JPEG, 100, out); out.flush(); out.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Log.d("----------------", "旋转角度是:"+angle+"------"+"-----"+mr); } } }

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

用户登录
用户注册