2012-05-08 2 views
0

내 응용 프로그램에서 index1.html에서 index2.html로 이동하면 서버에서 많은 양의 데이터를 검색하면서 로컬 데이터베이스에 저장되고 onload에서 로컬 데이터베이스의 데이터를 검색하는 동안 검은 색 화면이 표시됩니다 검은 색 화면이 나타날 때 진행률 막대를 표시하는 방법 또는 검은 색 화면을 제거하는 방법을 보여줍니다.Android : BlackScreen in Application

갱신

<!DOCTYPE HTML> 
<html> 
    <head> 
    <meta name="viewport" content="user-scalable=no" /> 
    <meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
    <title>Login</title> 
<script type="text/javascript" charset="utf-8" src="js/phonegap-1.0.0.js"></script> 
    <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"> 
    <script type="text/javascript"> 

function submit() 
{ 
alert("welcome"); 
window.open("index2.html");//while loading index2.html i need the progress bar 
} 
</script> 
<style type="text/css"> 
.ex2{ 
    border-top-left-radius: 10px; 
    border-top-right-radius: 10px; 
    border-bottom-left-radius: 10px; 
    border-bottom-right-radius: 10px; 
    border-color:#FBB917; 
    border: 1px solid; 
    } 
    body { 
     font-family:Arial,Geneva,Verdana,sans-serif; 
     font-size: 0.8em; 
     overflow-x: hidden; 
    } 
    #loadingScreen { 
     background: url(images/ajax-loader.gif) no-repeat 5px 8px; 
     padding-left: 25px; 
    } 
    /* hide the close x on the loading screen */ 
    .loadingScreenWindow .ui-dialog-titlebar-close { 
     display: none; 
    } 
    </style> 
    </head> 
    <body > 

    <input type="button" style="width:80%" value="Submit" onClick="submit()"/> 
    </body> 
</html> 

안드로이드 코드

public class MobilyzerActivity extends DroidGap { 
    /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     // setContentView(R.layout.main); 
     super.loadUrl("file:///android_asset/www/index.html"); 
    } 
} 
+0

코드 스 니펫을 게시하면 도움을 드리겠습니다. –

+0

@Andro 내 코드를 업데이트했습니다 – Ela

+0

index2.html 페이지에서 phonegap 스크립트를 다시 호출 하시겠습니까? –

답변

0

당신이 JQueryMobile 같은 프레임 워크를 사용하는 경우 다음로드 대화 상자를 표시하는 옵션이 있습니다. 보여주는

$.mobile.showPageLoadingMsg() 

$.mobile.hidePageLoadingMsg() 

는 일반 HTML을 사용하고 숨기기? 모든 프레임 워크 ??

+0

내 코드가 업데이트되었습니다. – Ela