有没有办法在新的三星S8中检查设备是否处于全屏模式?我尝试了添加到这篇文章的解决方案但一切都返回true。 Detect soft navigation bar availability in android device progmatically?
我可以听到OnSystemUiVisibilityChangeListener
的正确可见性,如下所示:
private class MyOnSystemUiVisibilityChangeListener implements View.OnSystemUiVisibilityChangeListener {
@Override
public void onSystemUiVisibilityChange(int visibility) {
if (visibility == View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) {
// full screen mode
} else {
// not full screen mode
}
}
}
上述方法仅在用户按下软导航按钮触发全屏时才有效,但我需要检查设备进入应用程序时是否已处于全屏模式。
答案 0 :(得分:0)
只需致电查看'use strict'
module.exports = function (sequelize, DataTypes) {
let User = sequelize.define('user', {
id: {
type: DataTypes.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true
}
}, {
classMethods: {
associate: function(models) {
this.belongsToMany(models.role, {
through: {
model: 'user_role'
},
foreignKey: 'user_id'
})
}
}
}, {
freezeTableName: true,
tableName: 'user',
timestamps: false,
underscored: true
})
return User
}
并与同一View.getSystemUiVisibility()