Giter Club home page Giter Club logo

compass-framework-application's Introduction

Canvas ui render system (UI渲染系统)

Building UI layout using Android style XML (使用XML构建界面)

<?xml version="1.0" encoding="UTF-8" ?>
<FrameLayout
    background="rgba(1,1,1,0.6)"
    layout_width="match_parent"
    layout_height="match_parent">

    <!--小黄人-->
    <MinionsView
        id="@+id/minions"
        layout_gravity="center_vertical"
        layout_width="300px"
        layout_height="500px"/>

    <LinearLayout
        id="@+id/model"
        background="corners(#ffffff, 10px)"
        orientation="vertical"
        padding="20px"
        layout_gravity="center"
        layout_width="400px"
        layout_height="wrap_content">

        <!-- title部分-->
        <FrameLayout
            paddingTop="5px"
            paddingBottom="5px"
            layout_width="match_parent"
            layout_height="wrap_content">

            <TextView
                text="Title"
                textSize="18px"/>

        </FrameLayout>

        <!--body部分-->
        <FrameLayout
            layout_width="match_parent"
            layout_height="wrap_content">

            <TextView
                text="Some contents..."
                textSize="15px"
                textColor="#000000"
                layout_width="match_parent"/>

        </FrameLayout>

        <!--bottom部分-->
        <FrameLayout
            layout_width="match_parent"
            layout_height="wrap_content">

            <LinearLayout
                gravity="right"
                layout_width="match_parent"
                layout_height="wrap_content">

                <Button
                    id="@+id/cancel"
                    text="取 消"
                    background="corners(#ffffff, #e0e0e0, 6px, 1px)"
                    textSize="14px"
                    paddingLeft="14px"
                    paddingRight="14px"
                    paddingTop="5px"
                    paddingBottom="5px"
                    textColor="#000000"
                    layout_width="wrap_content"
                    layout_height="wrap_content"
                    layout_marginRight="10px"/>

                <Button
                    id="@+id/confirm"
                    background="corners(#4096ff, 6px)"
                    text="确 定"
                    textSize="14px"
                    paddingLeft="14px"
                    hover="corners(red, 6px)"
                    paddingRight="14px"
                    paddingTop="5px"
                    paddingBottom="5px"
                    textColor="#ffffff"
                    layout_width="wrap_content"
                    layout_height="wrap_content"/>

            </LinearLayout>

        </FrameLayout>

    </LinearLayout>

</FrameLayout>

Example (演示图片)

image

Document (文档地址)

http://doc.compass-framework.com

compass-framework-application's People

Contributors

jerry-tanghao 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.