Giter VIP home page Giter VIP logo

dashedline's Introduction

DashedLine

#####mail : [email protected] || [email protected]
#####weibo : http://weibo.com/u/3174082744
#####欢迎交流Android开发技术~

虚线,Demo中使用两种方式来实现
1.drawable作为background
2.自定义View

因为Android3.0以后,硬件加速默认是关闭,使用第一种方法的前提是要开启硬件加速。
#####ps:硬件加速什么?开启有什么利弊?为什么Android3.0之后可以关闭/开启?

补:Android系统所有的“窗口合成”都是基于硬件加速的GPU渲染产生,
我们可以这样理解,在屏幕上描绘任何新的元素,都会启用硬件加速。

如果没有发生重绘变换,比如按钮本身高亮或者按下状态,这些变化就是通过软件渲染。
但我们点击一个菜单按钮,所产生的覆盖效果是就由GPU完成的。
开启硬件加速就是为了更流畅

因为某些2ddrawable和anim在硬件加速开启的情况下不能显示出来,所以有的要开启硬件加速;

参考: http://tech2ipo.com/38255
http://blog.csdn.net/xushuaic/article/details/38975915
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.