Coder Social home page Coder Social logo

nicetextview's Introduction

NiceTextView

NiceTextView有助于快速实现设置页面布局等 快速实现设置页面 借助TextView 的属性drawableRight 然后再画一条线 这样做,我们还是可以勉强接受的 要是碰到再稍微复杂一点,譬如这样的

如果再按照我们之前的做法,要放两个TextView和一个ImageView控件 这样我们的内心是不是开始有点抵触了。

有了NiceTextView,我们就不用那么麻烦了,直接这样引用 <com.aikaifa.nicetextview.NiceTextView android:layout_width="match_parent" android:layout_height="50dp" ntv:sLeftTextString="地址管理" ntv:sRightIconRes="@drawable/icon_right" />

<com.aikaifa.nicetextview.NiceTextView android:id="@+id/tv_login" android:layout_width="match_parent" android:layout_height="100dp" ntv:sLeftIconRes="@drawable/head_default" ntv:sLeftTextString="登录/注册" ntv:sRightIconRes="@drawable/icon_right" />

如果每行都复制粘贴,这样一个页面布局下来,也得要30分钟左右。

现在我们可以用5分钟的时间来完成京东设置页面的布局

image

image

image image

nicetextview's People

Contributors

88ios avatar

Watchers

James Cloos 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.