com.google.zxing.client.result.GeoParsedResult Java Examples

The following examples show how to use com.google.zxing.client.result.GeoParsedResult. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeoResultHandler.java    From ZXing-Standalone-library with Apache License 2.0 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #2
Source File: GeoResultHandler.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #3
Source File: GeoResultHandler.java    From weex with Apache License 2.0 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #4
Source File: GeoResultHandler.java    From Study_Android_Demo with Apache License 2.0 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #5
Source File: GeoResultFragment.java    From privacy-friendly-qr-scanner with GNU General Public License v3.0 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View v = inflater.inflate(R.layout.fragment_result_geo_info, container, false);

    result = (GeoParsedResult) parsedResult;

    TextView latitude = (TextView) v.findViewById(R.id.fragment_result_sms_to);
    TextView longitude = (TextView) v.findViewById(R.id.fragment_result_sms_via);
    TextView altitude = (TextView) v.findViewById(R.id.fragment_result_sms_subject);
    TextView altitude_label = (TextView) v.findViewById(R.id.fragment_result_sms_subject_label);
    TextView query = (TextView) v.findViewById(R.id.fragment_result_sms_body);
    ImageView queryImage = v.findViewById(R.id.item_result_location_query_image);

    latitude.setText(df.format(result.getLatitude()));
    longitude.setText(df.format(result.getLongitude()));
    altitude.setText(df.format(result.getAltitude()));

    query.setText(result.getQuery());

    altitude.setVisibility(result.getAltitude() != 0 ? View.VISIBLE : View.GONE);
    altitude_label.setVisibility(result.getAltitude() != 0 ? View.VISIBLE : View.GONE);

    query.setVisibility(!TextUtils.isEmpty(result.getQuery()) ? View.VISIBLE : View.GONE);
    queryImage.setVisibility(!TextUtils.isEmpty(result.getQuery()) ? View.VISIBLE : View.GONE);

    return v;
}
 
Example #6
Source File: GeoResultHandler.java    From barcodescanner-lib-aar with MIT License 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #7
Source File: GeoResultHandler.java    From reacteu-app with MIT License 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #8
Source File: GeoResultHandler.java    From android-apps with MIT License 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}
 
Example #9
Source File: GeoResultHandler.java    From barterli_android with Apache License 2.0 5 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
    GeoParsedResult result = (GeoParsedResult) getResult();
    StringBuilder contents = new StringBuilder(100);
    ParsedResult.maybeAppend(result.getGeoURI(), contents);
    ParsedResult.maybeAppend(String.valueOf(result.getLatitude()), contents);
    ParsedResult.maybeAppend(String.valueOf(result.getLongitude()), contents);
    contents.trimToSize();
    return contents.toString();
}
 
Example #10
Source File: GeoResultHandler.java    From android-quick-response-code with Apache License 2.0 5 votes vote down vote up
@Override
public CharSequence getDisplayContents() {
    GeoParsedResult result = (GeoParsedResult) getResult();
    StringBuilder contents = new StringBuilder(100);
    ParsedResult.maybeAppend(result.getGeoURI(), contents);
    ParsedResult.maybeAppend(String.valueOf(result.getLatitude()), contents);
    ParsedResult.maybeAppend(String.valueOf(result.getLongitude()), contents);
    contents.trimToSize();
    return contents.toString();
}
 
Example #11
Source File: GeoResultHandler.java    From zxingfragmentlib with Apache License 2.0 5 votes vote down vote up
@Override
public void handleButtonPress(int index) {
  GeoParsedResult geoResult = (GeoParsedResult) getResult();
  switch (index) {
    case 0:
      openMap(geoResult.getGeoURI());
      break;
    case 1:
      getDirections(geoResult.getLatitude(), geoResult.getLongitude());
      break;
  }
}