Beispiel #1
0
  @Override
  public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    BuildingAdapter buildingAdapter = (BuildingAdapter) parent.getAdapter();
    Pair pair = (Pair) buildingAdapter.getItem(position);
    f.onItemClick(pair, position);
    if (prevSelectView != null) {
      prevSelectView.setVisibility(View.GONE);
    }
    ImageView round = (ImageView) ((ViewGroup) view).getChildAt(0);
    round.setVisibility(View.VISIBLE);
    prevSelectView = round;
    //        App.get().products(pair);
    //        f.setSelectedBuilding(pair);
    //        Hand.send(Hand.What.REFRESH_ADAPTER);

  }
Beispiel #2
0
 public void refresh() {
   if (buildingAdapter != null) {
     buildingAdapter.notifyDataSetChanged();
   }
 }