当前位置:网站首页>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
边栏推荐
- Connectionreseterror: [winerror 10054] the remote host forced an existing connection to be closed
- [sciter]: use of sciter FS module scanning file API and its details
- Ali three sides: what is the difference between using on or where in the left join associated table and the condition
- 【C语言】文件读写函数使用
- Day28 strict mode, string JS 2021.09.22
- JNI函数的2种书写方式
- Excel import / export convenience tool class
- On the output representation of bidirectional LSTM in pytoch
- 2. single digit statistics
- Day37 JS note motion function 2021.10.11
猜你喜欢

. Net hybrid development solution 24 webview2's superior advantages over cefsharp

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

【C语言】如何产生正态分布或高斯分布随机数

Web page tips this site is unsafe solution

Day31 JS notes DOM 2021.09.26

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

Simulation of the Saier lottery to seek expectation

Using soapUI to obtain freemaker's FTL file template

Source code analysis of ArrayList

2018 joint examination of nine provinces & Merging of line segment trees
随机推荐
Day32 JS note event (Part 1) September 27, 2021
MapReduce项目案例1
Day34 JS notes regular expression 2021.09.29
Necessary for beginners PR 2021 quick start tutorial, PR green screen matting operation method
Day29 JS notes 2021.09.23
Zero basic C language (I)
AcWing 604. Area of circle (implemented in C language)
day39 原型鏈及頁面烟花效果 2021.10.13
MapReduce project case 3 - temperature statistics
Bisection (integer bisection and floating point bisection)
Excel import / export convenience tool class
ArrayList源码解析
Deployment and optimization of vsftpd service
Chendanqi, Fang Fei, guquanquan and Li Bo won the prize, and the list of Sloan research award in 2022 was released
[sciter]: use of sciter FS module scanning file API and its details
Is it feasible to be a programmer at the age of 26?
Android应用安全之JNI混淆
.NET混合开发解决方案24 WebView2对比CefSharp的超强优势
Self use demo of basic component integration of fluent
MapReduce项目案例3——温度统计