我有一个javafx.scene.control.DatePicker.我想从所选日期中提取(区域设置)周数.到目前为止,我还没有找到解决方案,我不想编写自己的算法.我使用Java8并希望它可以在新的Java时间库中使用.
我在舞台上有一个texfield:
@FXML
private TextField tfAdUsername;
tfAdUsername.setPromptText(userName);
tfAdUsername.setDisable(true);
Run Code Online (Sandbox Code Playgroud)
textcolor是lightgray,我想把它改成黑色:
.text-field:readonly {
-fx-background-color: #E0E0E2;
-fx-border-color: #94BBDA;
-fx-text-fill: #000000;
}
.text-field:disabled {
-fx-background-color: #E0E0E2;
-fx-border-color: #94BBDA;
-fx-text-fill: #000000;
}
Run Code Online (Sandbox Code Playgroud)
这不会改变文本颜色.什么是正确的CSS属性使用?
我在build.gradle中使用以下依赖项:
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.firebaseui:firebase-ui-database:3.1.0'
compile 'com.firebaseui:firebase-ui-auth:3.1.0'
Run Code Online (Sandbox Code Playgroud)
我的目标是Listview使用Firebase数据库填充数据.我正在关注Github Firebase上的指南
以下方法应该将数据绑定到listview:
private void showMessages() {
Query query = FirebaseDatabase.getInstance()
.getReference("notfication/unread/" + userMailAddress.replace(".", ","))
.orderByKey();
FirebaseListOptions<Message> options = new FirebaseListOptions.Builder<Message>()
.setLayout(R.layout.fbmessage_listitem)//Note: The guide doesn't mention this method, without it an exception is thrown that the layout has to be set.
.setQuery(query, Message.class)
.build();
FirebaseListAdapter<Message> adapter = new FirebaseListAdapter<Message>(options) {
@Override
protected void populateView(View v, Message model, int position) {
TextView tvMessage = v.findViewById(R.id.tv_message);
tvMessage.setText(model.getDateTimeCreated());
}
};
ListView readMessageList …Run Code Online (Sandbox Code Playgroud)