-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liyungui
committed
Oct 27, 2019
1 parent
8dbe6c7
commit 2dc04fd
Showing
132 changed files
with
7,840 additions
and
683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: APP弱网络测试工具 | ||
date: 2019-08-29 15:40:53 | ||
categories: | ||
- Android | ||
tags: | ||
- Android | ||
--- | ||
|
||
弱网络专项测试的方案主要有 | ||
|
||
|
||
# PC上使用抓包工具设置延时模拟弱网 | ||
|
||
- 在PC上的Fiddler在设置延时 | ||
- 将Android设备的网络代理到PC上 | ||
|
||
# 专有服务器上构建弱网络Wi-Fi | ||
|
||
- 在专有服务器上构建弱网络Wi-Fi | ||
- 移动设备连接该Wi-Fi进行弱网络测试 | ||
|
||
相关的技术方案有Facebook的ATC和腾讯的Wetest-WiFi; | ||
|
||
# 缺陷 | ||
|
||
- 需要额外的PC或者服务器,弱网环境构建成本高; | ||
- 需要安装、部署额外的工具,并且弱网络环境需要在PC上或者Web上进行配置,使用成本高; | ||
- 弱网络环境功能并不完善,比如Fiddler不支持丢包、抖动等弱网环境; | ||
|
||
# QNET | ||
|
||
- 无需ROOT手机,只需安装一个独立app | ||
- 弱网模拟功能强大。2G,3G,4G,丢包,抖动 | ||
- 支持 TCP/UDP网络协议抓包,导出为Pcap文件 | ||
|
||
# 参考&扩展 | ||
|
||
- [QNET,一款给力的APP弱网络测试工具](https://www.520mwx.com/view/53152) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Activity | ||
date: 2019-10-16 14:13:53 | ||
categories: | ||
- Android | ||
tags: | ||
- Android | ||
--- | ||
|
||
# 全屏 | ||
|
||
设置在setContentView()方法之前 | ||
|
||
```java | ||
//无title | ||
requestWindowFeature(Window.FEATURE_NO_TITLE); | ||
//全屏 | ||
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN , WindowManager.LayoutParams. FLAG_FULLSCREEN); | ||
``` | ||
|
||
# 背景透明 | ||
|
||
- Activity使用自定义透明背景style | ||
- Activity布局根view使用默认(不要设置) | ||
|
||
```xml | ||
android:theme="@style/activity_Transparent" | ||
``` | ||
|
||
```xml | ||
<style name="activity_Transparent" > | ||
<item name="android:windowBackground">@color/translucent</item> | ||
<item name="android:windowNoTitle">true</item> | ||
<item name="android:windowFullscreen">true</item> | ||
<item name="android:windowIsTranslucent">true</item> | ||
<item name="android:windowCloseOnTouchOutside">false</item> | ||
<item name="android:colorBackgroundCacheHint">@null</item> | ||
<item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item> | ||
</style> | ||
``` | ||
|
||
```xml | ||
<color name="translucent">#00000000</color> | ||
``` | ||
|
||
|
||
|
||
|
||
|
243 changes: 0 additions & 243 deletions
243
source/_posts/Android/Android端架构_单Activity的View栈模式/framework.puml
This file was deleted.
Oops, something went wrong.
File renamed without changes
File renamed without changes.
File renamed without changes
12 changes: 12 additions & 0 deletions
12
source/_posts/Android/Android端架构_单Activity的View栈模式/架构类图.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@startuml | ||
'skinparam monochrome true | ||
skinparam classBackgroundColor White | ||
skinparam classArrowColor Black | ||
skinparam classBorderColor Black | ||
skinparam stereotypeCBackgroundColor Gray | ||
'hide members | ||
hide circle | ||
|
||
|
||
|
||
@enduml |
File renamed without changes.
46 changes: 46 additions & 0 deletions
46
source/_posts/Android/Android端架构_单Activity的View栈模式/路由类图.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@startuml | ||
class Route{ | ||
String type | ||
Map<String, Object> params | ||
} | ||
|
||
enum RouteType { | ||
NATIVE("native") | ||
RN_PAGE("rn_page") | ||
WEB("web") | ||
} | ||
|
||
class RouteHandler{ | ||
+ boolean handle(Route route) | ||
} | ||
note right: 策略模式 | ||
|
||
class NativePageRouteHandler{ | ||
+ String pageName | ||
} | ||
|
||
class RNPageRouteHandler{ | ||
|
||
} | ||
|
||
class WebPageRouteHandler{ | ||
|
||
} | ||
|
||
class RouteController{ | ||
- List<RouteHandler> handler | ||
- void registRouteHandler() | ||
+ void parseRoute(Route route) | ||
} | ||
|
||
RouteHandler <|-- NativePageRouteHandler | ||
RouteHandler <|-- RNPageRouteHandler | ||
RouteHandler <|-- WebPageRouteHandler | ||
|
||
RouteHandler *-- Route | ||
|
||
RouteController *-- RouteHandler | ||
RouteController <-- Route | ||
RouteController <-- RouteType | ||
|
||
@enduml |
Oops, something went wrong.