跳至主要内容

博文

目前显示的是标签为“bar”的博文

javascript upload file with progress bar (xml request)

<!DOCTYPE html> <html> <head> <title>my title</title> <meta name="viewport" content="width=device-width initial-scale=1 maximum-scale=1"> <script type="text/javascript"> function up() {         if (document.getElementById("f").value == "") {             document.getElementById("result").innerHTML = "请选择文件";         }         else {             var fileObj = document.getElementById("f").files[0];             //创建xhr             var xhr = new XMLHttpRequest();             var url = "uploadFile";             //FormData对象             var fd = new FormData();             fd.append("path", "D:\\");    //上传路径     ...

android immerge navigation bar & status bar

https://developer.android.com/training/system-ui/immersive.html http://niorgai.github.io/2016/03/20/Android-transulcent-status-bar/ if (Build.VERSION. SDK_INT >= Build.VERSION_CODES. LOLLIPOP ) { float [] floats= new float [ 3 ] ; getWindow().setNavigationBarColor(Color. HSVToColor ( 0 , floats)) ; getWindow().setStatusBarColor(Color. HSVToColor ( 0 , floats)) ; this .findViewById(Window. ID_ANDROID_CONTENT ).setSystemUiVisibility( View . SYSTEM_UI_FLAG_LAYOUT_STABLE | View . SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View . SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION ) ; }

Android navigation bar color setup

It can be done using <item name="android:navigationBarColor">@color/theme_color</item> or window.setNavigationBarColor(@ColorInt int color) http://developer.android.com/reference/android/view/Window.html#setNavigationBarColor(int) Note that the method was introduced in Android Lollipop and won't work on API version < 21. The second method (works on KitKat) is to set windowTranslucentNavigation to true in the manifest and place a colored view beneath the navigation bar.