Git Product home page Git Product logo

constraintlayoutdemo's Introduction

ConstraintLayoutDemo

Android 约束布局练习,从此,再复杂的布局也能轻松应对了!

(还没使用约束布局的同学,推荐大家使用约束布局,是真的强大!当然,刚开始用也免不了踩坑,踩坑是暂时的,成长才是永久的!)

先从手写代码开始,不建议先从拖拽开始,如果你手写布局都会了,拖拽自然而然就会了。

1.开发环境和依赖库版本

  • Android Studio 3.2
  • constraint-layout:1.1.3

2.部分截图如下:

image

image

image

参考文章:

https://github.com/xitu/gold-miner/blob/master/TODO/constraint-layout-hell.md

https://github.com/xitu/gold-miner/blob/master/TODO/constraint-layout-concepts-hell-tips-tricks-part-2.md

https://github.com/xitu/gold-miner/blob/master/TODO/constraint-layout-animations-dynamic-constraints-ui-java-hell.md

https://github.com/xitu/gold-miner/blob/master/TODO/constraint-layout-visual-design-editor-hell.md

https://developer.android.com/reference/android/support/constraint/ConstraintLayout

Group & Circular(new api)

  • Group Group帮助你对一组控件进行设置。最常见的情况是控制一组控件的visibility。你只需把控件的id添加到Group,就能同时对里面的所有控件进行操作。

  • Circular positioning 可以相对另一个控件,以角度和距离定义当前控件的位置,即提供了在圆上定义控件位置的能力。

constraintlayoutdemo's People

Contributors

xinpengfei520 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.