当前位置: 首页>>代码示例>>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;未经允许,请勿转载。