Git Product home page Git Product logo

simplegridlayout's Introduction

SimpleGridLayout

一种metro风格UI的实现,用起来很简便。

截图

此处输入图片的描述

使用方法

<com.ntrees.widget.SimpleGridLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        app:cell_height="100dp"
        app:cell_width="100dp"
        app:space_horizental="10dp"
        app:space_vertical="10dp" >

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#66ffffff"
            android:src="@drawable/ic_launcher"
            app:cell_spanX="1"
            app:cell_spanY="1"
            app:cell_x="1"
            app:cell_y="0" />

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#66ffffff"
            android:src="@drawable/ic_launcher"
            app:cell_spanX="1"
            app:cell_spanY="2"
            app:cell_x="0"
            app:cell_y="0" />

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#66ffffff"
            android:src="@drawable/ic_launcher"
            app:cell_spanX="2"
            app:cell_spanY="1"
            app:cell_x="1"
            app:cell_y="1" />

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#66ffffff"
            android:src="@drawable/ic_launcher"
            app:cell_spanX="1"
            app:cell_spanY="1"
            app:cell_x="2"
            app:cell_y="0" />
    </com.ntrees.widget.SimpleGridLayout>

#自定义属性 cell_x cell_y : 分别为网格坐标

cell_spanX cell_spanY : 分别为x方向和y方向的宽度

cell_width cell_height : 分别为单元格的宽和高

space_horizental space_vertical : 分别问横向和纵向的网格间隙。

Enjoy it!

simplegridlayout's People

Contributors

ntrees 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.