Comments (15)
目前还不行,等我有空研究下这个
from statusbarutil.
好的
Jaeger [email protected]于2016年4月14日周四 23:17写道:
目前还不行,等我有空研究下这个
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from statusbarutil.
我添加了一个方法,可以解决根布局的 首个子控件为Imageview 延伸到状态栏这种情况
/**
* 为有 ImageView 的Activity 添加半透明状态栏
*
* @param act 需要设置的Activity
* @param marginView 需要设置 margin 的 View
*/
public static void setTranslucentForImageView(Activity act, View marginView) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
act.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
addTranslucentView(act, DEFAULT_STATUS_BAR_ALPHA);
}
ViewGroup.MarginLayoutParams vmlp = (ViewGroup.MarginLayoutParams) marginView.getLayoutParams();
vmlp.setMargins(0, getStatusBarHeight(act), 0, 0);
}
}
from statusbarutil.
@SeanZom 等我测试下是否可以 可以的话我更新下
from statusbarutil.
@SeanZom 那个值应该是负的= =你写错啦
from statusbarutil.
哪个?没有吧,我跑过4.4和5.0的
from statusbarutil.
@SeanZom 这个
from statusbarutil.
没有写错
from statusbarutil.
@SeanZom 这个值正的话 是往下移啊 你跑了什么版本的?
from statusbarutil.
原来是使用场景的问题,不是谁对谁错的问题。我一阵传个我的使用例子,现在不在电脑旁。
from statusbarutil.
好的
from statusbarutil.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_header_img"
android:tag="这个是 头部延伸到状态栏的Image"
.../>
<Button
android:id="@+id/btn_back"
android:tag="这个是 marginView"
.../>
</RelativeLayout>
from statusbarutil.
哦哦 这样的 ,marginView 不是必须的咯 刚才弄错了 不好意思
from statusbarutil.
你有没有QQ或者其他联系方式方便点沟通。如果要继续探究的话。marginView确实不是必须,但是ImageView依然是可以延伸到状态栏啊,5.0和4.4.4的我都试过
from statusbarutil.
@hunao0221 最新的1.2.0 版本已经支持这个了,可以看看,issuse 我关闭了哈
from statusbarutil.
Related Issues (20)
- 关于toolbar陷入到状态栏问题 HOT 5
- 请问是否支持androidx HOT 3
- 请问下如果想跟随滑动变化状态栏背景透明度且需要白色和黑色字体切换怎么实现啊 HOT 1
- 评论错项目了 HOT 1
- StatusBarUtil.setLightMode(this) => Toolbar goes behind statusBar HOT 1
- setDarkMode() 無效 HOT 1
- java.lang.ClassCastException(StatusBarUtil.clearPreviousSetting(StatusBarUtil.java:582))
- 软键盘导致ToolBar拉伸
- 使用之后,设置底部虚拟按键的背景颜色,设置不了
- calculateStatusColor() 算法问题
- setDarkMode 和 setLightMode 会使 布局向上偏移,设置fitsSystemWindows会使Edittextview长按上下文菜单边距失效 HOT 2
- 异形屏statusbar高度太低,导致内容被覆盖 HOT 1
- Status bar
- 有个StatusBarUtils的报错 能看下么 HOT 2
- 不维护了?什么时候适配水滴和挖孔屏
- 报错问题
- 1.5.1版本build失败
- 小米V130 com.jaeger.library.StatusBarUtil.setLightMode 报错org.json.JSONException: No value for cezanne
- 在清单文件里设置 android:windowSoftInputMode="adjustResize|stateHidden"软键盘不会顶起布局导致输入框被遮挡
- 兄弟们,这个库作者好久没更新了,有没有其他的同类型的优秀库推荐一下啊,快来交流一下 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from statusbarutil.