File tree 4 files changed +25
-4
lines changed
app/src/main/java/com/aries/library/fast/demo
4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ dependencies {
126
126
127
127
## 录屏预览
128
128
129
+ ![ ] ( https://github.com/AriesHoo/FastLib/blob/master/screenshot/02.gif )
130
+
131
+ 虚拟导航栏控制-参考[ AppImpl类] ( /app/src/main/java/com/aries/library/fast/demo/AppImpl.java ) NavigationBarControl接口实现注释说明
132
+
129
133
![ ] ( https://github.com/AriesHoo/FastLib/blob/master/screenshot/00.gif )
130
134
131
135
![ ] ( https://github.com/AriesHoo/FastLib/blob/master/screenshot/01.gif )
Original file line number Diff line number Diff line change 21
21
import com .aries .library .fast .widget .FastLoadDialog ;
22
22
import com .aries .library .fast .widget .FastLoadMoreView ;
23
23
import com .aries .library .fast .widget .FastMultiStatusView ;
24
+ import com .aries .ui .util .RomUtil ;
24
25
import com .aries .ui .widget .progress .UIProgressView ;
25
26
import com .chad .library .adapter .base .BaseQuickAdapter ;
26
27
import com .chad .library .adapter .base .loadmore .LoadMoreView ;
@@ -201,8 +202,9 @@ public FastNavigationConfigEntity createNavigationBarControl(Activity activity)
201
202
//设置为true其它两个属性才有效
202
203
.setControlEnable (true )
203
204
//设置为true color属性有效不然为系统默认的半透明效果
204
- .setTransEnable (false )
205
- .setColor (Color .argb (102 ,0 ,0 ,0 ));
206
- //半透明效果alpha为102;
205
+ //华为的系统默认半透明和白色很接近目前还没有解决方案
206
+ .setTransEnable (RomUtil .isEMUI ())
207
+ //半透明效果alpha为102--如果使用滑动返回不建议使用透明度不然滑动返回后有一种导航栏颜色又变化的视觉;
208
+ .setColor (Color .argb (102 , 0 , 0 , 0 ));
207
209
}
208
210
}
Original file line number Diff line number Diff line change 12
12
import android .view .View ;
13
13
import android .webkit .WebView ;
14
14
15
+ import com .aries .library .fast .demo .R ;
15
16
import com .aries .library .fast .manager .LoggerManager ;
16
17
import com .aries .library .fast .module .activity .FastWebActivity ;
18
+ import com .aries .library .fast .util .NavigationBarUtil ;
19
+ import com .aries .ui .util .RomUtil ;
17
20
import com .aries .ui .view .title .TitleBarView ;
18
21
import com .just .agentweb .AgentWeb ;
19
22
import com .just .agentweb .DownLoadResultListener ;
@@ -107,8 +110,15 @@ public boolean onLongClick(View v) {
107
110
}
108
111
109
112
@ Override
110
- public void initView (Bundle savedInstanceState ) {
113
+ protected boolean isSwipeBackEnable () {
114
+ return super .isSwipeBackEnable () && !(RomUtil .isEMUI () && NavigationBarUtil .hasSoftKeys (getWindowManager ()));
115
+ }
111
116
117
+ @ Override
118
+ public void initView (Bundle savedInstanceState ) {
119
+ if (!isSwipeBackEnable ()){
120
+ getWindow ().getDecorView ().setBackgroundResource (R .color .colorBackground );
121
+ }
112
122
}
113
123
114
124
@@ -137,4 +147,9 @@ public void onConfigurationChanged(Configuration newConfig) {
137
147
mSwipeBackHelper .setSwipeBackEnable (false );
138
148
}
139
149
}
150
+
151
+ @ Override
152
+ protected View getNavigationBarControlView () {
153
+ return isSwipeBackEnable ()?super .getNavigationBarControlView ():null ;
154
+ }
140
155
}
You can’t perform that action at this time.
0 commit comments