當前位置: 首頁>>代碼示例>>Java>>正文


Java Browser類代碼示例

本文整理匯總了Java中org.mozilla.gecko.GeckoView.Browser的典型用法代碼示例。如果您正苦於以下問題:Java Browser類的具體用法?Java Browser怎麽用?Java Browser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Browser類屬於org.mozilla.gecko.GeckoView包,在下文中一共展示了Browser類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onReceivedTitle

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onReceivedTitle(GeckoView view, GeckoView.Browser browser, String title) {
    Log.i(LOGTAG, "Received a title");
			
    // Use the title returned from Gecko to update the UI
    // TODO: Only if the browser is the selected browser
    mPageTitle.setText(title);
}
 
開發者ID:ncalexan,項目名稱:geckobrowser-gradle,代碼行數:9,代碼來源:MainActivity.java

示例2: onCreate

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mGeckoView = (GeckoView) findViewById(R.id.gecko_view);

    Button goButton = (Button) findViewById(R.id.go_button);
    goButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View view) {
            final EditText text = (EditText) findViewById(R.id.url_bar);

            GeckoView.Browser browser = mGeckoView.getCurrentBrowser();
            if (browser == null) {
                browser = mGeckoView.addBrowser(text.getText().toString());
            } else {
                browser.loadUrl(text.getText().toString());
            }
        }
    });
    
    mGeckoView.setChromeDelegate(new MyGeckoViewChrome());
    mGeckoView.setContentDelegate(new MyGeckoViewContent());

    mPageTitle = (TextView) findViewById(R.id.page_title);
}
 
開發者ID:ncalexan,項目名稱:geckobrowser-gradle,代碼行數:28,代碼來源:MainActivity.java

示例3: onBackPressed

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onBackPressed() {
	Browser selected = mGeckoView.getCurrentBrowser();
	if (selected != null && selected.canGoBack()) {
	    selected.goBack();
	} else {
	    moveTaskToBack(true);
	}
}
 
開發者ID:ncalexan,項目名稱:geckobrowser-gradle,代碼行數:10,代碼來源:MainActivity.java

示例4: onPageShow

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onPageShow(GeckoView arg0, Browser arg1) {
    // TODO Auto-generated method stub

}
 
開發者ID:infil00p,項目名稱:cordova-mozillaview-engine,代碼行數:6,代碼來源:CordovaGeckoViewContent.java

示例5: onPageStart

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onPageStart(GeckoView arg0, Browser arg1, String arg2) {
    // TODO Auto-generated method stub

}
 
開發者ID:infil00p,項目名稱:cordova-mozillaview-engine,代碼行數:6,代碼來源:CordovaGeckoViewContent.java

示例6: onPageStop

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onPageStop(GeckoView arg0, Browser arg1, boolean arg2) {
    // TODO Auto-generated method stub

}
 
開發者ID:infil00p,項目名稱:cordova-mozillaview-engine,代碼行數:6,代碼來源:CordovaGeckoViewContent.java

示例7: onReceivedFavicon

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onReceivedFavicon(GeckoView arg0, Browser arg1, String arg2,
        int arg3) {
    // TODO Auto-generated method stub

}
 
開發者ID:infil00p,項目名稱:cordova-mozillaview-engine,代碼行數:7,代碼來源:CordovaGeckoViewContent.java

示例8: onReceivedTitle

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onReceivedTitle(GeckoView arg0, Browser arg1, String arg2) {
    // TODO Auto-generated method stub

}
 
開發者ID:infil00p,項目名稱:cordova-mozillaview-engine,代碼行數:6,代碼來源:CordovaGeckoViewContent.java

示例9: onAlert

import org.mozilla.gecko.GeckoView.Browser; //導入依賴的package包/類
@Override
public void onAlert(GeckoView view, GeckoView.Browser browser, String message, GeckoView.PromptResult result) {
    Log.i(LOGTAG, "Alert!");
    result.confirm();
    Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show();
}
 
開發者ID:ncalexan,項目名稱:geckobrowser-gradle,代碼行數:7,代碼來源:MainActivity.java


注:本文中的org.mozilla.gecko.GeckoView.Browser類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。