当前位置:网站首页>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
边栏推荐
- 2. single digit statistics
- recent developments
- day23 js笔记 2021.09.14
- day24 js笔记 2021.09.15
- 案例驱动 :从入门到掌握Shell编程详细指南
- 期货开户有门槛吗,如何网上安全的开通期货账户
- Day34 JS notes regular expression 2021.09.29
- day39 原型鏈及頁面烟花效果 2021.10.13
- 【无标题】虚拟机vmnet0找不到且报错:没有未桥接的主机网络适配器
- Django -- MySQL database reflects the mapping data model to models
猜你喜欢

Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system

Prefix and (2D)

Day30 JS notes BOM and DOM 2021.09.24

【C语言】判断三角形

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

Day39 prototype chain and page Fireworks Effect 2021.10.13

Simple understanding of ThreadLocal

day32 js笔记 事件(上)2021.09.27

Leetcode 48. 旋转图像(可以,已解决)

Database Series: is there any way to seamlessly upgrade the business tables of the database
随机推荐
【C语言】判断三角形
Three ways to implement LRU cache (recommended Collection)
Web page tips this site is unsafe solution
3. seat number
Join hands with cigent: group alliance introduces advanced network security protection features for SSD master firmware
开源项目维权成功案例: spug 开源运维平台成功维权
Day39 prototype chain and page fireworks effect 2021.10.13
纯纯大怨种!那些年被劝退的考研专业
AGCO AI frontier promotion (2.16)
JS foundation 10
day29 js笔记 2021.09.23
Pre parsing, recursive functions and events in day25 JS 2021.09.16
Packaging and publishing application of jetpack compose desktop version
Data analysis learning notes
1. print hourglass
Simulation of the Saier lottery to seek expectation
day32 js笔记 事件(上)2021.09.27
Zero basic C language (I)
Day23 JS notes 2021.09.14
Why do many people want to change careers as programmers, while some programmers want to change careers as others?