Giter VIP home page Giter VIP logo

androidtvlayout's Introduction

AndroidTvLayout

TV动态布局 Android TV Layout BuildLayout DynamicLayout

使用简单
item复用
布局改变焦点不会乱
支持控制焦点移动
支持item缩放
支持xml和动态设置布局大小item宽高间距等
<com.fb.jjyyzjy.buildlayoutdemo.view.buildview.MyBuildLayout
        android:id="@+id/build_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/title"
        android:clipChildren="false"
        android:clipToPadding="false"
        tv:myDividing="@dimen/px30"
        tv:myHSize="6"
        tv:myVSize="3"
        tv:myItemHeight="@dimen/px151"
        tv:myItemWidth="@dimen/px250"
        tv:scalable="false" />

int[][] data = {{0,0,1,1},{0,1,1,1},{0,2,1,1},{1,0,2,1},{1,1,2,1},{1,2,1,1},{2,2,1,1},{3,0,2,2},{3,2,2,1},{5,0,1,3}};
MyBuildLayout buildLayout = (MyBuildLayout) findViewById(R.id.build_layout);
BuildLayoutAdapter adapter = new BuildLayoutAdapter();
buildLayout.setAdapter(adapter);
adapter.setData(data);
adapter.notifyDataSetChanged();

buildLayout.mySetLayoutSize(6,3);
buildLayout.mySetItemSize(250),151);
buildLayout.mySetDividing(30);

build_layout_use_1.png

build_layout_use_2.png

<iframe height=960 width=540 src="build_use.mp4"></iframe>

androidtvlayout's People

Contributors

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