本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例4: onPageShow
import org.mozilla.gecko.GeckoView.Browser; //导入依赖的package包/类
@Override
public void onPageShow(GeckoView arg0, Browser arg1) {
// TODO Auto-generated method stub
}
示例5: onPageStart
import org.mozilla.gecko.GeckoView.Browser; //导入依赖的package包/类
@Override
public void onPageStart(GeckoView arg0, Browser arg1, String arg2) {
// TODO Auto-generated method stub
}
示例6: onPageStop
import org.mozilla.gecko.GeckoView.Browser; //导入依赖的package包/类
@Override
public void onPageStop(GeckoView arg0, Browser arg1, boolean arg2) {
// TODO Auto-generated method stub
}
示例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
}
示例8: onReceivedTitle
import org.mozilla.gecko.GeckoView.Browser; //导入依赖的package包/类
@Override
public void onReceivedTitle(GeckoView arg0, Browser arg1, String arg2) {
// TODO Auto-generated method stub
}
示例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();
}