Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
androiddevelop
AlignTextView
Repository navigation
Code
Issues
26
(26)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Important
Jump to bottom
Edit
New page
李跃东 edited this page
Jan 15, 2018
·
3 revisions
CBAlignTextView注意事项:
自动增加了paddingLeft,增加量为一个空格的宽度
最右侧均添加了一个空格(最后一行可能没有添加)
不要使用getText()获取文本,使用getRealText()代替getText()
在文本复用时,例如RecyclerView、ListView等中,setText之前,请调用reset重置状态。
android5.0之后对中文的排版有所调整(单个中文标点不能在行首),为了能够获取更好的对齐效果,建立将中文标点都切换为英文标点。
CBAlignTextView优化:
适当调整paddingLeft与paddingRight去消除边缘空白
在宽度较大时使用更好,因为这样可能存在更多的标点,更好的将右侧多余空间进行均分。
Wiki pages
Pages
4
Loading
Home
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Important
CBAlignTextView注意事项:
CBAlignTextView优化:
Loading
Next
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Use
Uh oh!
There was an error while loading.
Please reload this page
.
Add a custom sidebar
Clone this wiki locally
You can’t perform that action at this time.