当前位置:网站首页>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
边栏推荐
- Django -- MySQL database reflects the mapping data model to models
- Why do many people want to change careers as programmers, while some programmers want to change careers as others?
- Which programming language will attract excellent talents?
- Contract quantitative trading system development | contract quantitative app development (ready-made cases)
- Remote login sshd service
- 【无标题】虚拟机vmnet0找不到且报错:没有未桥接的主机网络适配器
- 零基础C语言(一)
- If you want to change to software testing, how can you package your resume as a test engineer with 1 year of work experience
- Share the easy-to-use fastadmin open source system - practical part
- js中的数组方法 2021.09.18
猜你喜欢

Web3安全连载(3) | 深入揭秘NFT钓鱼流程及防范技巧

Day34 JS notes regular expression 2021.09.29

Unity屏幕截图功能

Cannot redeclare block range variables

Software test interview classic + 1000 high-frequency real questions, and the hit rate of big companies is 80%

自定义标题栏View

Database Series: is there any way to seamlessly upgrade the business tables of the database

水果FL Studio/Cubase/Studio one音乐宿主软件对比

Redis principle - List

Day36 JS notes ecma6 syntax 2021.10.09
随机推荐
Many benefits of SEO optimization are directly related to traffic
Swin, three degrees! Eth open source VRT: a transformer that refreshes multi domain indicators of video restoration
Day33 JS note event (Part 2) September 28, 2021
Daily practice of C language - day 4: find the sum of all even numbers within 100
SEO优化的许多好处是与流量有直接关系
Join hands with cigent: group alliance introduces advanced network security protection features for SSD master firmware
【C语言】结构体嵌套二级指针的使用
Necessary for beginners PR 2021 quick start tutorial, PR green screen matting operation method
day31 js笔记 DOM下 2021.09.26
来吧元宇宙,果然这热度一时半会儿过不去了
ArrayList源码解析
Day39 prototype chain and page fireworks effect 2021.10.13
【C语言】文件读写函数使用
赛尔号抽奖模拟求期望
Day39 prototype chain and page Fireworks Effect 2021.10.13
Day30 JS notes BOM and DOM 2021.09.24
AcWing 605. Simple product (implemented in C language)
Mutual conversion between mytipartfile and file
【C语言】如何产生正态分布或高斯分布随机数
day30 js笔记 BOM和DOM 2021.09.24