Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 4 Application Development
This is the forum to discuss the Wrox book Professional Android 4 Application Development Reto Meier; ISBN: 978-1-1181-0227-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 4 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 5th, 2013, 09:22 PM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default Compass Example Using Deprecated

The AccessibilityEvent.MAX_TEXT_LENGTH and AccessibilityEvent.MAX_TEXT_LENGTH are deprecated. What are we suppose to do here ?
  #2 (permalink)  
Old April 6th, 2013, 07:28 AM
Authorized User
Points: 89, Level: 1
Points: 89, Level: 1 Points: 89, Level: 1 Points: 89, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default MAX_TEXT_LENGTH

Hi,

I replaced that with an integer value of 500, see also http://developer.android.com/referen...AX_TEXT_LENGTH

Or use @SuppressWarnings("deprecation") before public boolean dispatchPopulateAccessibilityEvent(final AccessibilityEvent event).

Happy programming!
  #3 (permalink)  
Old February 11th, 2014, 01:03 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default MAX_TEXT_LENGTH

The Google doc says there is no longer a length restriction on AccessibilityEvent so there is no need to check the length of bearingStr nor to truncate it.
Code:
if (isShown()) {
            String bearingStr = String.valueOf(bearing);
            event.getText().add(bearingStr);
            return true;
        }
The Following User Says Thank You to Turmoil For This Useful Post:
xiarnousx (April 6th, 2014)
  #4 (permalink)  
Old April 6th, 2014, 01:42 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default

http://developer.android.com/referen...AX_TEXT_LENGTH


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed subscribing to simulated compass cevripidou BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 0 July 9th, 2011 09:02 AM
Chapter 4 compass stanlick BOOK: Professional Android 2 Application Development 0 March 18th, 2011 03:23 PM
Chapter 4 Compass Cmdr BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 July 11th, 2010 07:05 PM
Chapter 10: Compass Omen_20 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 April 7th, 2010 07:42 PM
Chapter 10: Compass Omen_20 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 April 7th, 2010 07:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.