当前位置:网站首页>Custom title bar view
Custom title bar view
2022-06-28 12:11:00 【A cup of bitter mustard】

1. Set title block transparency
setAlpha(@FloatRange(from = 0.0, to = 1.0) float alpha)
2. Set the title bar background color
setBackgroundColor(@ColorInt int color)
setBackgroundResource(@DrawableRes int resId)
3. Set the left operation area 1
setLeft1Visibility(int visibility)
setLeft1Icon(@Nullable Drawable left)
setLeft1Icon(@DrawableRes int resId)
setLeft1Text(CharSequence text)
setLeft1Text(@StringRes int resId)
setLeft1TextColor(@ColorInt int resId)
setLeft1TextSize(float size)
setLeft1ClickListener(OnClickListener onClickListener)
4. Set the left operation area 2
setLeft2Visibility(int visibility)
setLeft2Icon(@Nullable Drawable left)
setLeft2Icon(@DrawableRes int resId)
setLeft2Text(CharSequence text)
setLeft2Text(@StringRes int resId)
setLeft2TextColor(@ColorInt int resId)
setLeft2TextSize(float size)
setLeft2ClickListener(OnClickListener onClickListener)
5. Set the title bar Logo
setTitleLogoVisibility(int visibility)
setTitleLogo(@NonNull Drawable drawable)
setTitleLogo(@DrawableRes int resId)
6. Set the title bar Title
setTitleVisibility(int visibility)
setTitleText(CharSequence text)
setTitleText(@StringRes int resId)
setTitleTextColor(@ColorInt int resId)
setTitleTextSize(float size)
7. Set right operation area 1
setRight1Visibility(int visibility)
setRight1Icon(@Nullable Drawable right)
setRight1Icon(@DrawableRes int resId)
setRight1Text(CharSequence text)
setRight1Text(@StringRes int resId)
setRight1TextColor(@ColorInt int resId)
setRight1TextSize(float size)
setRight1ClickListener(OnClickListener onClickListener)
8. Set right operation area 2
setRight2Visibility(int visibility)
setRight2Icon(@Nullable Drawable right)
setRight2Icon(@DrawableRes int resId)
setRight2Text(CharSequence text)
setRight2Text(@StringRes int resId)
setRight2TextColor(@ColorInt int resId)
setRight2TextSize(float size)
setRight2ClickListener(OnClickListener onClickListener)
9. Set the spacing line at the bottom of the title block
setBottomLineVisibility(int visibility)
10. Set custom... On the title bar View
addView(View view, int gravity)
removeView(View view)
Source code :https://github.com/272664150/QTitleBar
Reference resources :https://blog.csdn.net/delmoremiao/article/details/52145067
边栏推荐
- day31 js笔记 DOM下 2021.09.26
- Why do many people want to change careers as programmers, while some programmers want to change careers as others?
- Convert black mask picture to color annotation file
- Adding a new user in MySQL 5.7
- Android应用安全之JNI混淆
- Django -- MySQL database reflects the mapping data model to models
- AsyncTask经验小结
- Excel import / export convenience tool class
- Day23 JS notes 2021.09.14
- 【北京航空航天大学】考研初试复试资料分享
猜你喜欢

Build your own website (18)

Packaging and publishing application of jetpack compose desktop version

How to deploy the software testing environment?
![[Beijing University of Aeronautics and Astronautics] information sharing for the first and second examinations of postgraduate entrance examination](/img/06/df5a64441814c9ecfa2f039318496e.jpg)
[Beijing University of Aeronautics and Astronautics] information sharing for the first and second examinations of postgraduate entrance examination

Share the easy-to-use fastadmin open source system - practical part

Data analysis learning notes

【北京航空航天大学】考研初试复试资料分享

Why do many people want to change careers as programmers, while some programmers want to change careers as others?

Day32 JS note event (Part 1) September 27, 2021

Chendanqi, Fang Fei, guquanquan and Li Bo won the prize, and the list of Sloan research award in 2022 was released
随机推荐
ProCAST finite element casting process simulation software
NFT card chain game system development DAPP construction technical details
纯纯大怨种!那些年被劝退的考研专业
JS foundation 10
Web3安全连载(3) | 深入揭秘NFT钓鱼流程及防范技巧
Multi dimensional monitoring: the data base of intelligent monitoring
FTP protocol for Wireshark packet capture analysis
Solutions to connection failures and errors when accessing mysql8 using the SSM project
Random forest and poetry maker trained by AMR
Remote login sshd service
零基础C语言(一)
RemoteViews布局和类型限制源码分析
Daily practice of C language - day 4: find the sum of all even numbers within 100
【C语言】判断三角形
Day32 JS note event (Part 1) September 27, 2021
4. maximum continuity factor
MapReduce项目案例1
Using MySQL database in the express framework of node
Contract quantification system development (construction explanation) - contract quantification system development (source code analysis and ready-made cases)
Excel import / export convenience tool class