private void addfavorite() { PopupText pt = Resource.buildPopupText(); try { ServiceWrapper sw = engine.getServiceWrapper(); sw.addFavoritegd(); if (sw.isServiceSuccessful()) { pt.setText("添加收藏夹成功"); } else { pt.setText("添加收藏夹失败, 原因: " + sw.getServiceMessage()); } } catch (Exception e) { e.printStackTrace(); pt.setText("添加收藏夹失败,请稍后重试"); } pt.popup(); }