Alert Dialog和Button onClick内的微调器返回NullPointerException

时间:2015-12-23 22:06:59

标签: java android spinner floating-action-button

我在AlertDialog里面有Spinner NPE(在FAB内部)

@ImplementedBy(classOf[ClientRepository])
trait BaseClientRepository {
   def getById(id: Int): Future[Client]
   def getByLocation(location: String): Future[Seq[Client]]
}

有谁知道这个问题?

我以某种方式能够管理它以显示,但它是空的。

1 个答案:

答案 0 :(得分:2)

尝试从

进行更改
private void printearthquakes() {
    Map<String, Long> quakes = new HashMap<>();
    for(Marker quake : quakeMarkers) {
        Long cnt = quakes.get(quake.getProperty("country"));
        quakes.put(quake.getProperty("country"), (cnt!=null?cnt.longValue():0) + 1L);
    }
    for (Entry<String, Long> e: quakes.entrySet()) {
        System.out.println(e.getKey());
        System.out.println(e.getValue());
    }
}

Spinner spinner = (Spinner) findViewById(R.id.dlgSpinner);