Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

88ios/NiceTextView

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
8 Commits
 
 
 
 

Repository files navigation

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

About

NiceTextView有助于快速实现设置页面布局等

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.