本文整理了Java中android.view.Window.setFeatureInt()
方法的一些代码示例,展示了Window.setFeatureInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setFeatureInt()
方法的具体详情如下:
包路径:android.view.Window
类名称:Window
方法名:setFeatureInt
暂无
代码示例来源:origin: cymcsg/UltimateAndroid
@Override
public void onProgressChanged(WebView view, int newProgress) {
((Activity) mContext).getWindow().setFeatureInt(Window.FEATURE_PROGRESS, newProgress * 100);
}
代码示例来源:origin: k9mail/k-9
public void run() {
getWindow().setFeatureInt(Window.FEATURE_PROGRESS, progress);
}
});
代码示例来源:origin: jiangqqlmj/FastDev4Android
/**
* 网页加载进度回调
* @param view
* @param newProgress
*/
@Override
public void onProgressChanged(WebView view, int newProgress) {
// 设置进行进度
((Activity) mContext).getWindow().setFeatureInt(
Window.FEATURE_PROGRESS, newProgress * 100);
webview_tv_progress.setText("正在加载,已完成" + newProgress + "%...");
webview_tv_progress.postInvalidate(); // 刷新UI
Log.d("zttjiangqq", "进度为:" + newProgress);
}
代码示例来源:origin: stackoverflow.com
dialog = new Dialog(context);
Window window = dialog.getWindow();
window.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
dialog.setContentView(R.layout.my_dialog_layout);
window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.my_custom_header);
代码示例来源:origin: stackoverflow.com
Window window = mSpinner.getWindow();
window.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.my_custom_header);
代码示例来源:origin: adamantoise/robocrosswords
private void updateProgressBar() {
if (showingProgressBar) {
getWindow().setFeatureInt(Window.FEATURE_PROGRESS, (int)(puz.getFractionComplete() * 10000));
}
}
代码示例来源:origin: stackoverflow.com
final Window window = getWindow();
boolean useTitleFeature = false;
if(window.getContainer() == null) {
useTitleFeature = window.requestFeature(Window.FEATURE_CUSTOM_TITLE);
}
SetContentView(Resource.Layout.LiftInspection);
if (useTitleFeature) {
window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.inspection_title);
}
代码示例来源:origin: amapapi/Android_Location_Demo
@Override
// 设置网页加载的进度条
public void onProgressChanged(WebView view, int newProgress) {
Assistant_Location_Activity.this.getWindow().setFeatureInt(
Window.FEATURE_PROGRESS, newProgress * 100);
super.onProgressChanged(view, newProgress);
}
代码示例来源:origin: stackoverflow.com
final Window window = getWindow();
boolean useTitleFeature = false;
// If the window has a container, then we are not free
// to request window features.
if (window.getContainer() == null) {
useTitleFeature = window
.requestFeature(Window.FEATURE_CUSTOM_TITLE);
}
setContentView(R.layout.screen_main);
if (useTitleFeature) {
window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.custom_title);
// Set up the custom title
main_title = (TextView) findViewById(R.id.title_left_text);
main_title.setText(R.string.app_name);
main_title = (TextView) findViewById(R.id.title_right_text);
main_title.setText(R.string.Main_titleInfo);
}
代码示例来源:origin: kebernet/shortyz
public void run() {
if (timer != null) {
getWindow().setTitle(timer.time());
//noinspection deprecation
getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
puz.getPercentComplete() * 100);
}
if (runTimer) {
handler.postDelayed(this, 1000);
}
}
};
代码示例来源:origin: THEONE10211024/ApiDemos
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_1);
代码示例来源:origin: qiubiteme/android_api_demos
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_1);
代码示例来源:origin: VideoExpertsGroup/VXG.Media.SDK.Android
getWindow().setFeatureInt(Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON);
代码示例来源:origin: derry/delion
getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS,
Window.PROGRESS_VISIBILITY_OFF);
内容来源于网络,如有侵权,请联系作者删除!