コード例 #1
0
    // Override QuestionWidget's add question text. Build it the same
    // but add it to the questionLayout
    protected void addQuestionText(FormEntryPrompt p) {

        // Add the text view. Textview always exists, regardless of whether there's text.
    	TextView questionText = new TextView(getContext());
        questionText.setText(p.getLongText());
        questionText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontsize);
        questionText.setTypeface(null, Typeface.BOLD);
        questionText.setPadding(0, 0, 0, 7);
        questionText.setId(QuestionWidget.newUniqueId()); // assign random id

        // Wrap to the size of the parent view
        questionText.setHorizontallyScrolling(false);

        if (p.getLongText() == null) {
            questionText.setVisibility(GONE);
        }

        // Put the question text on the left half of the screen
        LinearLayout.LayoutParams labelParams =
            new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
        labelParams.weight = 1;

        questionLayout = new LinearLayout(getContext());
        questionLayout.setOrientation(LinearLayout.HORIZONTAL);

        questionLayout.addView(questionText, labelParams);
    }
コード例 #2
0
  /**
   * Add a Views containing the question text, audio (if applicable), and image (if applicable). To
   * satisfy the RelativeLayout constraints, we add the audio first if it exists, then the TextView
   * to fit the rest of the space, then the image if applicable.
   */
  protected void addQuestionText(FormEntryPrompt p) {
    String imageURI = p.getImageText();
    String audioURI = p.getAudioText();
    String videoURI = p.getSpecialFormQuestionText("video");

    // shown when image is clicked
    String bigImageURI = p.getSpecialFormQuestionText("big-image");

    String promptText = p.getLongText();
    // Add the text view. Textview always exists, regardless of whether there's text.
    mQuestionText = new TextView(getContext());
    mQuestionText.setText(promptText == null ? "" : promptText);
    mQuestionText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontsize);
    mQuestionText.setTypeface(null, Typeface.BOLD);
    mQuestionText.setPadding(0, 0, 0, 7);
    mQuestionText.setId(QuestionWidget.newUniqueId()); // assign random id

    // Wrap to the size of the parent view
    mQuestionText.setHorizontallyScrolling(false);

    if (promptText == null || promptText.length() == 0) {
      mQuestionText.setVisibility(GONE);
    }

    // Create the layout for audio, image, text
    mediaLayout = new MediaLayout(getContext());
    mediaLayout.setAVT(p.getIndex(), "", mQuestionText, audioURI, imageURI, videoURI, bigImageURI);

    addView(mediaLayout, mLayout);
  }
コード例 #3
0
  /** Add a TextView containing the question text. */
  private void AddQuestionText(PromptElement p) {
    TextView tv = new TextView(getContext());
    tv.setText(p.getQuestionText());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, TEXTSIZE);
    tv.setTypeface(null, Typeface.BOLD);

    tv.setPadding(0, 0, 0, 5);

    // wrap to the widget of view
    tv.setHorizontallyScrolling(false);
    mView.addView(tv);
  }
コード例 #4
0
  /** Add a TextView containing the help text. */
  private void AddHelpText(PromptElement p) {
    String s = p.getHelpText();

    if (s != null && !s.equals("")) {
      TextView tv = new TextView(getContext());
      tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, TEXTSIZE - 5);
      tv.setPadding(0, 0, 0, 7);
      // wrap to the widget of view
      tv.setHorizontallyScrolling(false);
      tv.setText(s);
      tv.setTypeface(null, Typeface.ITALIC);

      mView.addView(tv);
    }
  }
コード例 #5
0
  /** Add a TextView containing the help text. */
  private void addHelpText(FormEntryPrompt p) {

    String s = p.getHelpText();

    if (s != null && !s.equals("")) {
      mHelpText = new TextView(getContext());
      mHelpText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontsize - 3);
      mHelpText.setPadding(0, -5, 0, 7);
      // wrap to the widget of view
      mHelpText.setHorizontallyScrolling(false);
      mHelpText.setText(s);
      mHelpText.setTypeface(null, Typeface.ITALIC);

      addView(mHelpText, mLayout);
    }
  }
コード例 #6
0
ファイル: DNSSpoofing.java プロジェクト: WolfServer/android
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    SharedPreferences themePrefs = getSharedPreferences("THEME", 0);
    Boolean isDark = themePrefs.getBoolean("isDark", false);
    if (isDark) setTheme(R.style.DarkTheme);
    else setTheme(R.style.AppTheme);

    setTitle(System.getCurrentTarget() + " > MITM > DNS spoofing");
    setContentView(R.layout.plugin_mitm_dns_spoofing);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    mTextDnsList = (TextView) findViewById(R.id.textViewDNSList);
    mCmdSave = (Button) findViewById(R.id.cmd_save);
    mSniffToggleButton = (ToggleButton) findViewById(R.id.sniffToggleButton);
    mSniffProgress = (ProgressBar) findViewById(R.id.sniffActivity);
    mTextDnsList.setHorizontallyScrolling(true);

    mSpoofSession = new SpoofSession(false, false, null, null);

    readDNSlist();

    mSniffToggleButton.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            if (mRunning) {
              setStoppedState();
            } else {
              setStartedState();
            }
          }
        });
    mCmdSave.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            saveDNSlist();
          }
        });
  }
コード例 #7
0
  public void notifyDataSetChange() {
    currentIndex = 0;
    if (type == 0) {
      setAutoStart(false);
      stopFlipping();
      clearAnimation();
      TitleAdItem item = vInfos.get(currentIndex);
      tView.setText(item.getMsg());
    } else if (type == 1) {
      tView.setText(vInfos.get(currentIndex).getMsg());
      Animation animation = getInAnimation();
      if (animation != null) {
        animation.setAnimationListener(
            new Animation.AnimationListener() {
              public void onAnimationStart(Animation animation) {
                if (currentIndex < (vInfos.size() - 1)) {
                  currentIndex++;
                } else {
                  currentIndex = 0;
                }
                tView.setText(vInfos.get(currentIndex).getMsg());
              }

              public void onAnimationRepeat(Animation animation) {}

              public void onAnimationEnd(Animation animation) {}
            });
      }
      this.startFlipping();
      setAutoStart(true);
    }
    tView.setSingleLine(true);
    tView.setFocusableInTouchMode(true);
    tView.setHorizontallyScrolling(true);
    tView.setEllipsize(TruncateAt.MARQUEE);
    tView.setMarqueeRepeatLimit(-1);
    tView.setFocusable(true);
    tView.requestFocus();
  }
コード例 #8
0
  /**
   * Add a Views containing the question text, audio (if applicable), and image (if applicable). To
   * satisfy the RelativeLayout constraints, we add the audio first if it exists, then the TextView
   * to fit the rest of the space, then the image if applicable.
   */
  protected void addQuestionText(final FormEntryPrompt p) {
    String imageURI = p.getImageText();
    String audioURI = p.getAudioText();
    String videoURI = p.getSpecialFormQuestionText("video");
    String qrCodeContent = p.getSpecialFormQuestionText("qrcode");

    // shown when image is clicked
    String bigImageURI = p.getSpecialFormQuestionText("big-image");

    // Add the text view. Textview always exists, regardless of whether there's text.
    mQuestionText = new TextView(getContext());
    mQuestionText.setText(p.getLongText());
    mQuestionText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mQuestionFontsize);
    mQuestionText.setTypeface(null, Typeface.BOLD);
    mQuestionText.setPadding(0, 0, 0, 7);
    mQuestionText.setId(38475483); // assign random id

    if (p.getLongText() != null) {
      if (p.getLongText().contains("\u260E")) {
        if (Linkify.addLinks(mQuestionText, Linkify.PHONE_NUMBERS)) {
          stripUnderlines(mQuestionText);
        } else {
          System.out.println("this should be an error I'm thinking?");
        }
      }
    }
    // Wrap to the size of the parent view
    mQuestionText.setHorizontallyScrolling(false);

    if (p.getLongText() == null) {
      mQuestionText.setVisibility(GONE);
    }

    // Create the layout for audio, image, text
    MediaLayout mediaLayout = new MediaLayout(getContext());
    mediaLayout.setAVT(mQuestionText, audioURI, imageURI, videoURI, bigImageURI, qrCodeContent);
    addView(mediaLayout, mLayout);
  }
コード例 #9
0
  private void init() {
    place = getPlaceById();
    if (place != null) {
      currentCityId = place.getCityId();
      nearbyPlaceList = new ArrayList<Place>();
      List<String> imagePath = place.getImagesList();
      LayoutInflater inflater = getLayoutInflater();
      ArrayList<View> imageViewlist = new ArrayList<View>();
      imageLoader = ImageLoader.getInstance();
      int size = imagePath.size();
      String url = "";
      View view = null;
      ImageView imageView = null;
      for (int i = 0; i < size; i++) {
        view = inflater.inflate(R.layout.place_detail_image, null);
        imageView = (ImageView) view.findViewById(R.id.place_image_item);
        url = imagePath.get(i);
        url = TravelUtil.getImageUrl(currentCityId, url);
        imageLoader.displayImage(url, imageView);
        imageViewlist.add(view);
      }
      imageViews = new ImageView[size];
      main = (ViewGroup) inflater.inflate(R.layout.common_place_detail, null);
      ViewGroup group = (ViewGroup) main.findViewById(R.id.place_images_group);
      ViewPager placeImage = (ViewPager) main.findViewById(R.id.place_images);
      LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(10, 10);
      params.setMargins(
          (int) getResources().getDimension(R.dimen.image_margin),
          0,
          (int) getResources().getDimension(R.dimen.image_margin),
          0);
      for (int i = 0; i < size; i++) {
        imageView = new ImageView(CommonPlaceDetailActivity.this);
        imageView.setLayoutParams(params);
        imageViews[i] = imageView;
        if (i == 0) {
          imageViews[i].setBackgroundResource(R.drawable.guide_dot_white);
        } else {
          imageViews[i].setBackgroundResource(R.drawable.guide_dot_black);
        }
        group.addView(imageView);
      }
      PlaceImageAdapter sceneryAdapter = new PlaceImageAdapter(imageViewlist);
      if (isSupportService()) {
        ViewGroup serviceGroup = (ViewGroup) main.findViewById(R.id.proServiceGroup);
        serviceGroup.setVisibility(View.VISIBLE);
        ImageView serviceImageView = null;
        LayoutParams layoutParams =
            new LayoutParams(
                (int) this.getResources().getDimension(R.dimen.service_icon2),
                LayoutParams.WRAP_CONTENT);
        for (int id : place.getProvidedServiceIdList()) {

          serviceImageView = new ImageView(CommonPlaceDetailActivity.this);
          serviceImageView.setLayoutParams(layoutParams);
          serviceImageView.setScaleType(ScaleType.FIT_CENTER);
          serviceImageView.setImageResource(TravelUtil.getServiceImage(id));
          serviceGroup.addView(serviceImageView);
        }
      }

      placeImage.setAdapter(sceneryAdapter);
      placeImage.setOnPageChangeListener(placeImageOnPageChangeListener);
      setContentView(main);

      if (isSupportSpecialTrafficStyle()) {
        main.findViewById(R.id.special_trans_group).setVisibility(View.VISIBLE);
        String trafficInfos = place.getTransportation();
        trafficInfos = trafficInfos.replaceAll(":;", "").trim();
        String[] traffic = trafficInfos.split(";");
        specialTrans = (ViewGroup) main.findViewById(R.id.special_trans);
        if (traffic.length > 0) {
          int i = 1;
          String[] trafficDetail = null;
          RelativeLayout.LayoutParams params1 =
              new RelativeLayout.LayoutParams(
                  (int) getResources().getDimension(R.dimen.special_traffic_loaction),
                  LayoutParams.WRAP_CONTENT);
          RelativeLayout.LayoutParams params2 =
              new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
          LayoutParams params3 =
              new LayoutParams(
                  (int) getResources().getDimension(R.dimen.transport_width),
                  (int) getResources().getDimension(R.dimen.transport_height));
          for (String trafficInfo : traffic) {
            row = new RelativeLayout(CommonPlaceDetailActivity.this);
            row.setLayoutParams(params3);
            if (i == traffic.length) {
              row.setBackgroundDrawable(getResources().getDrawable(R.drawable.table5_down));
            } else {
              row.setBackgroundDrawable(getResources().getDrawable(R.drawable.table5_center));
            }

            trafficDetail = trafficInfo.split(":");
            if (trafficDetail.length == 2) {
              locationTextView = new TextView(CommonPlaceDetailActivity.this);
              distanceTextView = new TextView(CommonPlaceDetailActivity.this);
              params1.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
              params1.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
              params1.setMargins(
                  (int) getResources().getDimension(R.dimen.transport_margin_left), 0, 0, 0);
              params2.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
              params2.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
              params2.setMargins(
                  (int) getResources().getDimension(R.dimen.transport_margin_right), 0, 0, 0);
              locationTextView.setLayoutParams(params1);
              distanceTextView.setLayoutParams(params2);
              locationTextView.setTextColor(getResources().getColor(R.color.place_price_color));
              locationTextView.setTextSize(
                  getResources().getDimension(R.dimen.transport_text_size));
              locationTextView.setSingleLine(true);
              locationTextView.setMarqueeRepeatLimit(-1);
              locationTextView.setEllipsize(TruncateAt.MARQUEE);
              locationTextView.setHorizontallyScrolling(true);
              locationTextView.setSelected(true);
              distanceTextView.setTextColor(getResources().getColor(R.color.place_price_color));
              distanceTextView.setTextSize(
                  getResources().getDimension(R.dimen.transport_location_text_size));
              locationTextView.setText(trafficDetail[0]);
              distanceTextView.setText(trafficDetail[1]);
              row.addView(locationTextView);
              row.addView(distanceTextView);
              specialTrans.addView(row, i);
            }
            i++;
          }
        }

      } else {
        main.findViewById(R.id.transport_group).setVisibility(View.VISIBLE);
        TextView transport = (TextView) main.findViewById(R.id.transport);
        transport.setSelected(true);
        transport.setText(place.getTransportation());
      }

      // ticket
      if (isSupportTicket()) {
        String priceDescription = place.getPriceDescription();
        if (priceDescription != null && !priceDescription.equals("")) {
          findViewById(R.id.ticket_group).setVisibility(View.VISIBLE);
          TextView ticket = (TextView) findViewById(R.id.ticket);
          ticket.setText(priceDescription);
        }
      }

      // food
      if (isSupportFood()) {
        String footCate = AppManager.getInstance().getAllSubCatMap().get(place.getSubCategoryId());
        if (footCate != null && !footCate.equals("")) {
          findViewById(R.id.food_group).setVisibility(View.VISIBLE);
          TextView food = (TextView) findViewById(R.id.food);
          food.setText(footCate);
        }
      }

      // openTime
      if (isSupportOpenTime()) {
        String openTimeString = place.getOpenTime();
        if (openTimeString != null && !openTimeString.equals("")) {
          findViewById(R.id.open_time_group).setVisibility(View.VISIBLE);
          if (place.getCategoryId() != PlaceCategoryType.PLACE_SPOT_VALUE) {
            TextView openTimeTitle = (TextView) findViewById(R.id.open_time_title);
            openTimeTitle.setText(getString(R.string.open_time1));
          }

          TextView openTime = (TextView) findViewById(R.id.open_time);
          openTime.setText(openTimeString);
        }
      }

      // avgPrice
      if (isSupportAvgPrice()) {
        String avePriceString = place.getAvgPrice();
        if (avePriceString != null && !avePriceString.equals("")) {
          findViewById(R.id.avg_price_group).setVisibility(View.VISIBLE);
          TextView avgPrice = (TextView) findViewById(R.id.avg_price);
          HashMap<Integer, String> symbolHashMap = AppManager.getInstance().getSymbolMap();
          StringBuffer symbol = new StringBuffer();
          if (symbolHashMap.containsKey(currentCityId)) {
            String symbolStr = symbolHashMap.get(currentCityId);
            symbol.append(symbolStr);
          }
          avgPrice.setText(symbol + avePriceString);
        }
      }

      // specialFood
      if (isSupportSpecialFood()) {
        List<String> typcialDisList = place.getTypicalDishesList();
        if (typcialDisList != null && typcialDisList.size() > 0) {
          findViewById(R.id.special_food_group).setVisibility(View.VISIBLE);
          TextView specialFood = (TextView) findViewById(R.id.special_food);
          StringBuffer typicalDishes = new StringBuffer();
          for (String typcial : typcialDisList) {
            typicalDishes.append(typcial);
            typicalDishes.append("  ");
          }
          specialFood.setText(typicalDishes);
        }
      }

      // tips
      if (isSupportTips()) {
        String tipsString = place.getTips();
        if (tipsString != null && !tipsString.equals("")) {
          findViewById(R.id.tips_group).setVisibility(View.VISIBLE);
          TextView tipsTitles = (TextView) findViewById(R.id.tips_title);
          TextView tips = (TextView) findViewById(R.id.tips);
          tipsTitles.setText(tipsTitle);
          tips.setText(tipsString);
        }
      }

      // park
      if (isSupportPark()) {
        String parkGuideString = place.getParkingGuide();
        if (parkGuideString != null && !parkGuideString.equals("")) {
          findViewById(R.id.park_group).setVisibility(View.VISIBLE);
          TextView park = (TextView) findViewById(R.id.park);
          park.setText(place.getParkingGuide());
        }
      }

      // hotelStart
      if (isSupportHotelStart()) {
        int hotelStartLevel = place.getHotelStar();
        if (hotelStartLevel > 0) {
          findViewById(R.id.hotel_start_group).setVisibility(View.VISIBLE);
          TextView hotelStart = (TextView) findViewById(R.id.hotel_start);
          hotelStart.setText(TravelUtil.getHotelStar(this, hotelStartLevel));
          ViewGroup hotelStartImageGroup = (ViewGroup) findViewById(R.id.hotel_start_image);
          ImageView hotelStartImage;
          LayoutParams layoutParams =
              new LayoutParams(
                  (int) this.getResources().getDimension(R.dimen.hotel_start_icon),
                  LayoutParams.WRAP_CONTENT);
          for (int i = 0; i < place.getHotelStar(); i++) {

            hotelStartImage = new ImageView(CommonPlaceDetailActivity.this);
            hotelStartImage.setLayoutParams(layoutParams);
            hotelStartImage.setPadding(0, 0, 5, 0);
            hotelStartImage.setScaleType(ScaleType.FIT_CENTER);
            hotelStartImage.setImageResource(R.drawable.star_ico);
            hotelStartImageGroup.addView(hotelStartImage);
          }
        }
      }

      // keyword
      if (isSupportKeyWords()) {
        List<String> keyList = place.getKeywordsList();
        if (keyList != null && keyList.size() > 0) {
          findViewById(R.id.keyword_group).setVisibility(View.VISIBLE);
          TextView keyword = (TextView) findViewById(R.id.place_keyword);
          StringBuffer keywordStr = new StringBuffer();
          for (String key : keyList) {
            keywordStr.append(key);
            keywordStr.append("、");
          }
          if (keywordStr.length() > 1) {
            keyword.setText(keywordStr.substring(0, keywordStr.length() - 1));
          }
        }
      }

      // roomprice
      if (isSupportRoomPrice()) {
        String priceString = place.getPrice();
        if (priceString != null && !priceString.equals("")) {
          findViewById(R.id.room_price_group).setVisibility(View.VISIBLE);
          TextView roomPrice = (TextView) findViewById(R.id.room_price);
          HashMap<Integer, String> symbolHashMap = AppManager.getInstance().getSymbolMap();
          StringBuffer symbol = new StringBuffer();
          if (symbolHashMap.containsKey(currentCityId)) {
            String symbolStr = symbolHashMap.get(currentCityId);
            symbol.append(symbolStr);
          }
          symbol.append(priceString);
          symbol.append("起");
          roomPrice.setText(symbol);
        }
      }

      ImageView recommendImage1 = (ImageView) findViewById(R.id.place_detail_recommend_image1);
      ImageView recommendImage2 = (ImageView) findViewById(R.id.place_detail_recommend_image2);
      ImageView recommendImage3 = (ImageView) findViewById(R.id.place_detail_recommend_image3);

      TextView placeDetailTitle = (TextView) findViewById(R.id.place_detail_title);
      TextView placeIntroTitle = (TextView) findViewById(R.id.place_intro_title);
      TextView placeIntro = (TextView) findViewById(R.id.place_intro);
      placeDetailTitle.setText(place.getName());
      placeIntroTitle.setText(getPlaceIntroTitle());
      String introduction = place.getIntroduction();
      introduction = TravelUtil.handlerString(introduction);
      placeIntro.setText("		" + introduction);

      int rank = place.getRank();
      switch (rank) {
        case 1:
          {
            recommendImage1.setImageDrawable(this.getResources().getDrawable(R.drawable.good));
            recommendImage2.setImageDrawable(this.getResources().getDrawable(R.drawable.good2));
            recommendImage3.setImageDrawable(this.getResources().getDrawable(R.drawable.good2));
          }
          break;
        case 2:
          {
            recommendImage1.setImageDrawable(this.getResources().getDrawable(R.drawable.good));
            recommendImage2.setImageDrawable(this.getResources().getDrawable(R.drawable.good));
            recommendImage3.setImageDrawable(this.getResources().getDrawable(R.drawable.good2));
          }
          break;
        case 3:
          {
            recommendImage1.setImageDrawable(this.getResources().getDrawable(R.drawable.good));
            recommendImage2.setImageDrawable(this.getResources().getDrawable(R.drawable.good));
            recommendImage3.setImageDrawable(this.getResources().getDrawable(R.drawable.good));
          }
          break;
        default:
          break;
      }

      if (place.getTelephoneList().size() > 0) {
        ViewGroup phoneGroup = (ViewGroup) findViewById(R.id.phone_group);
        phoneNum = (TextView) findViewById(R.id.phone_num);
        phoneNum.setSelected(true);
        ImageView phoneCall = (ImageView) findViewById(R.id.phone_call);
        phoneGroup.setVisibility(View.VISIBLE);
        StringBuffer phoneNumber = new StringBuffer();
        for (String telephone : place.getTelephoneList()) {
          phoneNumber.append(telephone);
          phoneNumber.append(" ");
        }
        phoneNum.setText(getString(R.string.phone_number) + " " + phoneNumber);
        phoneCall.setOnClickListener(phoneCallOnClickListener);
        phoneGroup.setOnClickListener(phoneCallOnClickListener);
      }

      if (place.getAddressList().size() > 0) {
        ViewGroup addressGroup = (ViewGroup) findViewById(R.id.address_group);
        TextView address = (TextView) findViewById(R.id.address);
        address.setSelected(true);
        ImageView addressMapView = (ImageView) findViewById(R.id.address_map_view);
        addressGroup.setVisibility(View.VISIBLE);
        StringBuffer addressStr = new StringBuffer();
        for (String addres : place.getAddressList()) {
          addressStr.append(addres);
          addressStr.append(" ");
        }
        address.setText(getString(R.string.address) + " " + addressStr);
        addressMapView.setOnClickListener(addressLocateOnClickListener);
        addressGroup.setOnClickListener(addressLocateOnClickListener);
      }

      if (place.getWebsite() != null && !place.getWebsite().equals("")) {
        ViewGroup websiteGroup = (ViewGroup) findViewById(R.id.website_group);
        websiteGroup.setVisibility(View.VISIBLE);
        TextView website = (TextView) findViewById(R.id.website);
        website.setText(place.getWebsite());
      }
      nearbyListGroup = (ViewGroup) findViewById(R.id.nearby_list_group);
      favoriteCount = (TextView) findViewById(R.id.favorite_count);
      collect = (TextView) findViewById(R.id.collect);
      collectBtn = (ImageView) findViewById(R.id.collect_btn);
      collectBtn.setOnClickListener(addFavoriteOnClickListener);
      ImageButton locationButton = (ImageButton) findViewById(R.id.location_button);
      Button indexButton = (Button) findViewById(R.id.index_button);
      indexButton.setOnClickListener(indexOnClickListener);
      ImageView help2Button = (ImageView) findViewById(R.id.help2);
      locationButton.setOnClickListener(locationOnClickListener);
      help2Button.setOnClickListener(helpOnClickListener);
    }
  }