本文整理匯總了Java中android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE屬性的典型用法代碼示例。如果您正苦於以下問題:Java LayoutParams.FLAG_NOT_FOCUSABLE屬性的具體用法?Java LayoutParams.FLAG_NOT_FOCUSABLE怎麽用?Java LayoutParams.FLAG_NOT_FOCUSABLE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類android.view.WindowManager.LayoutParams
的用法示例。
在下文中一共展示了LayoutParams.FLAG_NOT_FOCUSABLE屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepare
private Program prepare(Application application) {
metronome = new Metronome();
params = new LayoutParams();
params.width = LayoutParams.WRAP_CONTENT;
params.height = LayoutParams.WRAP_CONTENT;
// if (isOverlayApiDeprecated()) {
// params.type = LayoutParams.TYPE_APPLICATION_OVERLAY;
// } else {
params.type = LayoutParams.TYPE_TOAST;
//}
params.flags = LayoutParams.FLAG_KEEP_SCREEN_ON | LayoutParams.FLAG_NOT_FOCUSABLE
| LayoutParams.FLAG_NOT_TOUCH_MODAL;
params.format = PixelFormat.TRANSLUCENT;
params.gravity = Seat.BOTTOM_RIGHT.getGravity();
params.x = 10;
app = application;
wm = WindowManager.class.cast(application.getSystemService(Context.WINDOW_SERVICE));
LayoutInflater inflater = LayoutInflater.from(app);
stageView = inflater.inflate(R.layout.stage, new RelativeLayout(app));
fpsText = (TextView) stageView.findViewById(R.id.takt_fps);
listener(new Audience() {
@Override
public void heartbeat(double fps) {
if (fpsText != null) {
fpsText.setText(decimal.format(fps));
}
}
});
return this;
}