[android-developers] Can't Change Android CalendarView to another month

2016-06-10 Thread plnelson
Android introduced a CalendarView back in in API 11. I've implemented it in my app and it seems to work fine in the sense that it displays a perfectly normal-looking whole-month calendar and I can select a date and it triggers the appropriate event and I can read the selected date in my code

[android-developers] Two newbie Android Studio Questions . . .

2016-05-19 Thread plnelson
*1.* I just installed the latest version of Android Studio (2.1.1) on my PC (Win 7) and I'm learning how to use it. One thing all the other IDE's I've used (e.g., Visual Studio, Eclipse, etc) have is a window that lists the compiler errors and warnings and you can click on the items and it t

[android-developers] Re: Finding Build Errors in Android Studio . . .

2014-12-29 Thread plnelson
(... is there any way to EDIT these posts afterwards to add new information of discoveries? ) I've noticed that my View > Tool Window > Messages is grayed out. Since the Messages window is one place that errors are displayed why is mine grayed out? > -- You received this message

[android-developers] Finding Build Errors in Android Studio . . .

2014-12-29 Thread plnelson
I just installed Android Studio 1.01 and I'm getting up to speed on it. In my "Hello Android" app I deliberately introduced a compiler error to see how that's handled. The development environments I've used (Visual Studio, Eclipse) have a window which displays errors and warnings after a build,

Re: [android-developers] Re: "WrongThread" exception - how to analyze/debug?

2014-05-23 Thread plnelson
On Wednesday, May 21, 2014 12:23:32 PM UTC-4, Kostya Vasilyev wrote: > > > > Is there more to the message? I grepped the "base" framework, and came up > with these: > The entire message is "CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its vie

[android-developers] Re: "WrongThread" exception - how to analyze/debug?

2014-05-21 Thread plnelson
read" bugs? * Just that - what tools or strategies are recommended to see what code is executing in which threads - how do experienced Android programmers debug these kinds of exceptions? > On Tuesday, May 20, 2014 4:17:16 PM UTC-4, plnelson wrote: >> >> I have a mu

[android-developers] "WrongThread" exception - how to analyze/debug?

2014-05-20 Thread plnelson
I have a multi-threaded Android app. One thread wakes up periodically on a timer and exchanges information over WiFi with a remote device and the other one is the main thread that handles all the usual View stuff. Lately I've been getting a "Called from Wrong Thread Exception" in a catch block

[android-developers] Re: ListView getCount is wrong - how do I reset it?

2014-05-19 Thread plnelson
*FIXED:* I fixed the *getCount()* problem. After updating the listItems I now call *setListAdapter()* on the ListActivity. (@Streets of Boston - there is only one ListActivity). After that, when I call the ListView's *getCount()* it returns the correct value. *N.B.* that this does *not*

[android-developers] Re: position value in getView seems too big

2014-05-19 Thread plnelson
ListView's *getCount()* now accurately reflect the the number of list items. That seems to have no affect on this bug. On Thursday, May 15, 2014 2:09:57 PM UTC-4, plnelson wrote: > > > I'm getting a crash in my adapter's *getView()* routine because it's > bei

[android-developers] Re: ListView getCount is wrong - how do I reset it?

2014-05-19 Thread plnelson
ear list >// TODO Add element to list >// TODO NOTIFY DATA SET CHANGED >// TODO try to get list item size (I do not know why you need it) > } > > P.S Sure you created adapter with this list and adapter set to list. > > > On Friday, May 16, 2014 11:58:17 PM UTC+5

[android-developers] Re: ListView getCount is wrong - how do I reset it?

2014-05-19 Thread plnelson
7;s how the original program was architected and I don't have the authority to change the architecture. But why does it matter?Why can't the size of a ListView be reset if it's static? On Saturday, May 17, 2014 4:11:48 AM UTC-4, Doug wrote: > > > > On Friday,

[android-developers] Re: position value in getView seems too big

2014-05-16 Thread plnelson
There's a lot of proprietary code in the adapter; I'll see if I can whittle it down to something simple but meanwhile I'd like to pursue the listview's strange getCount result. Because that's a separate question from the getView()'s position value (maybe) I've started a separate thread focus

[android-developers] ListView getCount is wrong - how do I reset it?

2014-05-16 Thread plnelson
I have a listView in an android app which works fine when I first populate it - it displays and scrolls with no problem. But if I load in a new, smaller dataset and call notifyDataSetChanged() the app crashes because getView() gets called with a position value that's bigger than the dataset, i.

[android-developers] Re: position value in getView seems too big

2014-05-16 Thread plnelson
Sorry - should be lv.get*Count*. And yes, I am calling notifyDataSetChanged. I've also tried calling the ListView's *invalidate()* method, with no change in the behavior. Since posting this I've written a whole separate version of the program where I initially display 12 items ( listItems

[android-developers] position value in getView seems too big

2014-05-15 Thread plnelson
I'm getting a crash in my adapter's *getView()* routine because it's being called with a position value of 6 and my datasource only has 6 items in it. So I assumed that the position parameter should be in a range of [0]-[5]? What determines the range of values in *getView(*)'s position paramete

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-21 Thread plnelson
PS - This bug was driving me crazy.I'll be at AndDevCon next week in Boston, so Bob, if by any chance you'll be there I'll buy you a beer. -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to andr

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-21 Thread plnelson
of all your folders that start with layout? Do they > all contain the resource in question? > > For instance, you might say: > > *layout-large* > *layout-small* > *layout-medium * > > Thanks. > > > On Tuesday, May 21, 2013 8:15:10 AM UTC-5, plnelson wrote: &

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-21 Thread plnelson
There's no activity at all in the Console window during the clean and build. Only after I right-click on the target device (a tablet) and do a debug as... do I get console output (proprietary company and product names obfuscated) [2013-05-21 13:02:50 - TheProduct]

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-21 Thread plnelson
On Monday, May 20, 2013 5:48:03 PM UTC-4, Jonathan S wrote: > > clean remove all gen and bin folders. > As I said in my OP did deleted the gen folder. I also deleted the bin folder. Everything has been cleaned and rebuilt. > > Would you post all stacktrace for this exceptions? > Here's

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-21 Thread plnelson
eption mean?" My IDE is Eclipse Indigo. On Monday, May 20, 2013 4:43:48 PM UTC-4, bob wrote: > > I cannot reproduce the error you are getting. What IDE are you using? > > Thanks. > > > On Monday, May 20, 2013 3:35:24 PM UTC-5, plnelson wrote: >> >> >&g

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-20 Thread plnelson
On Monday, May 20, 2013 4:26:05 PM UTC-4, Jonathan S wrote: > > how about ant clean build This isn't an ant-based project, and anyway, ant is just supposed to emulate the regular IDE so why whould it be any better than what I've already tried?What does it do in a clean and build that's

[android-developers] Re: Another Resources.NotFoundException with setContentView()

2013-05-20 Thread plnelson
Just an update: to simplify things further I replaced the layout file with a default layout file ("foo.xml") that you get when you have Eclipse generate a new layout file for you: http://schemas.android.com/apk/res/android"; android:layout_width="match_parent" android:layout_height="ma

[android-developers] Another Resources.NotFoundException with setContentView()

2013-05-20 Thread plnelson
There are lots of Resources$NotFoundException questions on the web and I've reviewed them and tried the various suggestions to no avail. I had a perfectly working layout to display some graphics with some buttons underneath and I modified some of the buttons and started to get this error. I

Re: [android-developers] How to keep WiFi on and let screen go to sleep?

2013-04-11 Thread plnelson
On Wednesday, April 10, 2013 4:26:21 PM UTC-4, mike digioia wrote: > > What are you trying to do? If you want to measure power using wifi, then > just subtract the screen power consumption numbers after two tests - one > with screen in flight mode and one with wifi on. > Why do you think we're

Re: [android-developers] How to keep WiFi on and let screen go to sleep?

2013-04-10 Thread plnelson
> > > Acquiring wifilock like this only makes sure the system does not shut down > wifi. The actual wifi connection still goes through power optimizations > once screen is off in the driver. > > This should not drop your connections, > But it does. As I said, it sends a "FIN" packet - that's

[android-developers] Re: How to keep WiFi on and let screen go to sleep?

2013-04-10 Thread plnelson
On Wednesday, April 10, 2013 2:37:53 PM UTC-4, bob wrote: > > Why do you need to keep the Wifi on? > As I explained in the OP, the Android devices are used in an industrial environment. Specifically they are used in a factory where they are sending and receiving information to a central process

[android-developers] Re: How to keep WiFi on and let screen go to sleep?

2013-04-10 Thread plnelson
Just an addendum - I tried setting the WiFi Sleep Policy to "Never" in the WiFi Settings advanced Menu and it made no difference - unless I let the screen stay on, however dimly, as soon as the display goes out it sends a "fin" to the server. -- -- You received this message because you are su

[android-developers] How to keep WiFi on and let screen go to sleep?

2013-04-10 Thread plnelson
I'm programming an Android device for use in an industrial environment where it needs to stay in touch with the server even when the screen "goes to sleep". I thought I did all the right stuff but when the screen goes out it still sends a "Fin" to the server (confirmed on a network data packet

Re: [android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-08 Thread plnelson
OK, I've solved my problem by getting the context of the current top activity ( or at least the last one to get an *onResume()* ) and using that as my context (ctx).Now, no matter what Activity is on the screen, when the command comes in from the PC to display graphics it launches right awa

Re: [android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-08 Thread plnelson
Coming up with a simplified example will be hard because it's a large industrial app with many activities and operates as a remote control for a manufacturing process under the control of a PC which sends commands to it asynchronously. But I did get an important clue today: I reported tha

[android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-08 Thread plnelson
I appreciate everyone's efforts in making suggestions, but this has clearly stumped everyone, both here and on Stack Overflow. Is there a support/bugs forum read by actual Google/Android engineers I can ask a question like this on?Or is there a any documentation on the internal steps tak

[android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-05 Thread plnelson
On Friday, April 5, 2013 11:06:42 AM UTC-4, skink wrote: > > > > plnelson wrote: > > OK I tried it. Here's the class ... > > hmm, really strange... what is the Context you are using? > It's the context of the main Activity for the App. I've tried v

[android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-05 Thread plnelson
oid would stop after just the first one and how do we get Android to tell us why? This problem has turned out to be a real stumper, both here and StackOverFlow.Does Android/Google have a support forum where actual Android or Google people read the postings and contribute? > On F

[android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-05 Thread plnelson
On Thursday, April 4, 2013 3:35:52 PM UTC-4, skink wrote: > > > > plnelson wrote: > > Note how the LogCat shows* two* instances of the DGraphActivity being > > started - 2 constructors, 2 onCreates. > > try to remove *everything* from your DGraphActivity > &

[android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-04 Thread plnelson
Note how the LogCat shows* two* instances of the DGraphActivity being started - 2 constructors, 2 onCreates. That only happens when the two * startActivitie*s are right next to each other. When I was doing this by tapping the button twice in a row there was only one instance of DGraphActivity

[android-developers] Re: Bizarre launch behavior for a "standard" launchMode Activity

2013-04-04 Thread plnelson
On Thursday, April 4, 2013 1:53:15 PM UTC-4, plnelson wrote: > > ( *this is a followup to an earlier thread. I've directed all new > comments there to here* ) > > I'm trying to launch an Activity with *standard* launchMode; it launches > *perfectly > fine

[android-developers] Re: Activity won't start when launchmode is standard

2013-04-04 Thread plnelson
On Thursday, April 4, 2013 1:57:36 PM UTC-4, plnelson wrote: > > > I think the discovery of the bizarre double-launch behavior puts a > different spin on this, so I've started a new thread. Please direct all > further comments or suggestions to the new thread: > ht

[android-developers] Re: Activity won't start when launchmode is standard

2013-04-04 Thread plnelson
I think the discovery of the bizarre double-launch behavior puts a different spin on this, so I've started a new thread. Please direct all further comments or suggestions to the new thread: https://groups.google.com/forum/?fromgroups=#!topic/android-developers/4js6GASVZc4 Thanks. -

[android-developers] Bizarre launch behavior for a "standard" launchMode Activity

2013-04-04 Thread plnelson
( *this is a followup to an earlier thread. I've directed all new comments there to here* ) I'm trying to launch an Activity with *standard* launchMode; it launches *perfectly fine* when its launchMode is set to *singleInstance*. When I set it to * standard* nothing happens; it never gets

[android-developers] Re: Activity won't start when launchmode is standard

2013-04-04 Thread plnelson
OK I tried that - no luck - it's not getting to the constructor *BUT* - while testing it I got a new clue. It launches the SECOND time I try it, consistently, Here's the extracted Logcat - you can see that the first time it never gets past Starting Intent, the second time it goes all t

[android-developers] Re: How can I get notified when the server has closed the TCP connection

2013-04-02 Thread plnelson
t > the socket will fail or when the KeepAlive runs out... which is btw an > already existing "timer controlled loop that polls endlessly just to find > out if the server has closed the connection" .. hehe ). Instead add another > command to signal the device that the PC

[android-developers] How can I get notified when the server has closed the TCP connection

2013-04-02 Thread plnelson
I'm writing software for an Android device used as a remote control for an industrial process being run by a PC. The PC is always listening and the Android device opens a connection via the Android socket class, which provides a client-side TCP socket. Once the connection is established c

[android-developers] Re: Activity won't start when launchmode is standard

2013-04-02 Thread plnelson
Here's another detail:If I set DGraphActivity's launchmode to singleInstance the logcat shows this . . . *03-31 18:49:12.224: I/ActivityManager(119): Starting: Intent { flg=0x400 cmp=com..remote/.DGraphActivity (has extras) } from pid 19024 03-31 18:49:12.298: W/ActivityManag

Re: [android-developers] Re: Debugging the Activity life-cycle?

2013-03-31 Thread plnelson
On Friday, March 29, 2013 11:16:52 PM UTC-4, Kristopher Micinski wrote: > > You might try asking the package manager if the intent you're sending > will have any receivers, also.. > I'm not sure how do that. Using the intent I use to launch my activity, I tried . . . PackageManager

Re: [android-developers] Re: Debugging the Activity life-cycle?

2013-03-31 Thread plnelson
On Friday, March 29, 2013 11:16:26 PM UTC-4, Kristopher Micinski wrote: > > > > > In that particular example the returning Activity was standard but the > > Activity invoking it was singleInstance. I knew the returning Activity > had > > to be standard but I only found out that the caller c

Re: [android-developers] Re: Debugging the Activity life-cycle?

2013-03-31 Thread plnelson
On Friday, March 29, 2013 11:16:26 PM UTC-4, Kristopher Micinski wrote: > > > > > In that particular example the returning Activity was standard but the > > Activity invoking it was singleInstance. I knew the returning Activity > had > > to be standard but I only found out that the caller c

[android-developers] Re: Activity won't start when launchmode is standard

2013-03-31 Thread plnelson
On Friday, March 29, 2013 7:06:59 PM UTC-4, Streets Of Boston wrote: > > >Log.*e*("Commands", "failed to start DGraphActivity"*, e*); > >> >> OK, I've added that although, since it's not hitting that (or any) exceptions it's not really telling me anything. So we're still kinda back on the o

[android-developers] Re: Activity won't start when launchmode is standard

2013-03-29 Thread plnelson
On Friday, March 29, 2013 7:04:39 PM UTC-4, Streets Of Boston wrote: > > I've never seen this. If it fails to start, i get a logcat message and an > exception is thrown (and you are catching that). *My bad* - it turned out it did have a filter on. (thanks for saying you never saw that - it

[android-developers] Re: Activity won't start when launchmode is standard

2013-03-29 Thread plnelson
On Friday, March 29, 2013 5:57:46 PM UTC-4, Streets Of Boston wrote: > > Look at your logcat and see why your activity can't be started. Could be > as simple as a typo in your manifest. I only see things in LogCat about DGraphActivity when it *does* start (ie., when its launchMode is "single

[android-developers] Re: Debugging the Activity life-cycle?

2013-03-29 Thread plnelson
On Friday, March 29, 2013 5:56:18 PM UTC-4, Streets Of Boston wrote: > > Look at your logcat. It tells you when an activity hasn't started. When an activity fails to start all I see in LogCat is .. *nothing* related to that Activity. If the Activity is created or started (or paused, etc) * th

[android-developers] Debugging the Activity life-cycle?

2013-03-29 Thread plnelson
Over many projects I've run into various problems with Activities doing mysterious things. I've had them not start; I've had onActivityResult not get called when I'm trying to send parameters back from an Activity; I've had onActivityResult get called *instantly* before the other Activity even

[android-developers] Activity won't start when launchmode is standard

2013-03-29 Thread plnelson
This question has (so far) stumped them on Stack Overflow. . . . I'm trying to launch an Activity which launches *perfectly fine* when its launchMode is set to *singleInstance*. When I change it to *standard*nothing happens; it never gets to onCreate (or onStart or onResume, or anyplace in th

[android-developers] How to test if something is a PopupWindow

2012-01-27 Thread plnelson
(I posted this on Stack Overflow but as of this writing I've received no response) I'm writing code that starts with a View object in a layout hierarchy and iteratively walks up the tree to the view root, using *getParent()*, displaying information about each level as it goes. Everything is w

[android-developers] Android developer discussion forums?

2011-10-27 Thread plnelson
I'm looking for an ACTIVE discussion forum for Android app developers. I already use Stack Overflow, which I think is a wonderful resource, but it's strictly a question and answer format, where there is a clear, objective answer. Some things require a more extended discussion, or sometimes I