예제 #1
0
 /**
  * Use this factory method to create a new instance of this fragment using the provided
  * parameters.
  *
  * @param param1 Parameter 1.
  * @param param2 Parameter 2.
  * @return A new instance of fragment BuildingsFragment.
  */
 public static synchronized BuildingFragment getInstance(String param1, String param2) {
   if (instance == null) {
     instance = new BuildingFragment();
     Bundle args = new Bundle();
     args.putString(ARG_PARAM1, param1);
     args.putString(ARG_PARAM2, param2);
     instance.setArguments(args);
   }
   return instance;
 }
예제 #2
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);

  }