本文整理匯總了Java中org.telegram.messenger.browser.Browser.isInternalUrl方法的典型用法代碼示例。如果您正苦於以下問題:Java Browser.isInternalUrl方法的具體用法?Java Browser.isInternalUrl怎麽用?Java Browser.isInternalUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.telegram.messenger.browser.Browser
的用法示例。
在下文中一共展示了Browser.isInternalUrl方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showOpenUrlAlert
import org.telegram.messenger.browser.Browser; //導入方法依賴的package包/類
public void showOpenUrlAlert(final String url) {
if (Browser.isInternalUrl(url)) {
Browser.openUrl(getParentActivity(), url, inlineReturn == 0);
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setMessage(LocaleController.formatString("OpenUrlAlert", R.string.OpenUrlAlert, url));
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setPositiveButton(LocaleController.getString("Open", R.string.Open), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Browser.openUrl(getParentActivity(), url, inlineReturn == 0);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
}
}
示例2: showOpenUrlAlert
import org.telegram.messenger.browser.Browser; //導入方法依賴的package包/類
public void showOpenUrlAlert(final String url, boolean ask) {
if (Browser.isInternalUrl(url) || !ask) {
Browser.openUrl(getParentActivity(), url, inlineReturn == 0);
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setMessage(LocaleController.formatString("OpenUrlAlert", R.string.OpenUrlAlert, url));
builder.setPositiveButton(LocaleController.getString("Open", R.string.Open), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Browser.openUrl(getParentActivity(), url, inlineReturn == 0);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
}
}
示例3: showOpenUrlAlert
import org.telegram.messenger.browser.Browser; //導入方法依賴的package包/類
public void showOpenUrlAlert(final String url, boolean ask) {
if (Browser.isInternalUrl(url) || !ask) {
Browser.openUrl(getParentActivity(), url, true);
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setMessage(LocaleController.formatString("OpenUrlAlert", R.string.OpenUrlAlert, url));
builder.setPositiveButton(LocaleController.getString("Open", R.string.Open), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Browser.openUrl(getParentActivity(), url, true);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
}
}
示例4: showOpenUrlAlert
import org.telegram.messenger.browser.Browser; //導入方法依賴的package包/類
public void showOpenUrlAlert(final String url, boolean ask) {
if (Browser.isInternalUrl(url, null) || !ask) {
Browser.openUrl(getParentActivity(), url, true);
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setMessage(LocaleController.formatString("OpenUrlAlert", R.string.OpenUrlAlert, url));
builder.setPositiveButton(LocaleController.getString("Open", R.string.Open), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Browser.openUrl(getParentActivity(), url, true);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
}
}
示例5: showOpenUrlAlert
import org.telegram.messenger.browser.Browser; //導入方法依賴的package包/類
public void showOpenUrlAlert(final String url, boolean ask) {
if (Browser.isInternalUrl(url, null) || !ask) {
Browser.openUrl(getParentActivity(), url, inlineReturn == 0);
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setMessage(LocaleController.formatString("OpenUrlAlert", R.string.OpenUrlAlert, url));
builder.setPositiveButton(LocaleController.getString("Open", R.string.Open), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Browser.openUrl(getParentActivity(), url, inlineReturn == 0);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
}
}