我为应用的导航抽屉标题定义了渐变抽象,
side_nav_bar.xml:
@Test
public void testMessages() {
Flux.fromStream(incomingMessages())
.groupBy(Message::getEntityId)
.map(g -> g.publishOn(Schedulers.newParallel("groupByPool", 16))) //create new publisher for groups of messages
.subscribe( //create consumer for main stream
stream ->
stream.subscribe(this::processMessage) // create consumer for group stream
);
}
public Stream<Message> incomingMessages() {
return IntStream.range(0, 100).mapToObj(i -> new Message(i, i % 10));
}
public void processMessage(Message message) {
System.out.println(String.format("Message: %s processed by the thread: %s", message, Thread.currentThread().getName()));
}
private static class Message {
private final int id;
private final int entityId;
public Message(int id, int entityId) {
this.id = id;
this.entityId = entityId;
}
public int getId() {
return id;
}
public int getEntityId() {
return entityId;
}
@Override
public String toString() {
return "Message{" +
"id=" + id +
", entityId=" + entityId +
'}';
}
}
但是,它看起来只在某些设备上使用。在其他设备上它看起来很糟糕。
正如您在上一张图片中看到的那样,徽标失去了对比......
我想将其更改为在不同屏幕上显示相同或甚至相同。可能 gradientRadius 值影响最大,但我尝试过其他值,而&#34; 400&#34; 似乎是最佳的。也许有可能以编程方式确定它?