[android-developers] Seeding a Picasso Image Cache

2013-12-08 Thread Evan Ruff
Hey Guys,

I was wondering if anyone had any information, examples or tips about how to 
seed the Picasso image cache. I'd like to include a number of images in an 
asset bundle then load those into the Picasso Cache so that I can seamlessly 
download/dispay all the images without having to create my own LRU Cache and 
such.

I understand that the library uses HTTPCache, but I'm just not clear on how to 
add additional images.

Thanks for any help!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Nexus 5 Compatibility

2013-11-10 Thread Evan Ruff
Hey Guys,

Just updated my application and noticed that the Nexus 5 isn't on the list 
of compatible devices. Could someone point me in the direction of what 
changes I need to make to the manifest to get it to show up?

Thanks,

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Multi-Page Form with Fragments and Tabs

2013-02-22 Thread Evan Ruff
So I ended up implementing this by putting the switching logic 
in onBackPressed();

E


On Thursday, February 14, 2013 6:28:54 AM UTC-5, Evan Ruff wrote:

 Hey guys,

 I was hoping someone could give me a little insight as to how I can make 
 my multi-page form work a little better. Currently, each page (two pages) 
 on my form is a separate fragment. I use the ActionBar Tabs to display the 
 pages and then a Next button in each page that switches the tabs to the 
 next page. All validation is done on the Save button on the last page. 

 Everything is working well, but I'm having a little issue with the back 
 functionality. I'd like to be able to create/pop back stack activities when 
 the user switched. As it is now, he just gets tossed completely out of the 
 wizard, not returned to the previous page (tab).

 How should I handle that? Any input would be appreciated! 

 Oh, I'm targeting API 14.

 Thanks!

 Evan


-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Android AppEngine SSL Weirdness

2013-02-22 Thread Evan Ruff
Hey guys,

I've been getting some additional SSL I/O errors as well:

javax.net.ssl.SSLException: Read error: ssl=0x5e2727d8: I/O error during 
system call, Connection timed out
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native 
Method)
at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:651)
at 
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
at 
org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
at 
org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:161)
at 
org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:175)
at 
org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:178)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1383)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1357)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:361)

Going to AppEngine... anyone else seeing this?

E
On Friday, February 8, 2013 11:56:58 AM UTC-5, Evan Ruff wrote:

 Hey hey!

 It happens intermittently on Nexus 7s and Motorola Droid 4 running 4.0.4.I 
 thought it was the sorta funny Certificate layout of AppEngine, but 
 apparently that was addresses in 4.0?

 Thanks,

 E


 On Fri, Feb 8, 2013 at 11:10 AM, Nobu Games dev.nob...@gmail.comjavascript:
  wrote:

 What device are you testing on? Do you get that error also on newer ones?


 On Friday, February 8, 2013 7:30:19 AM UTC-6, Evan Ruff wrote:

 Hey guys,

 I was wondering if anyone had been experiencing intermittent exceptions 
 when securely connecting to an AppEngine servlet through 
 the DefaultHttpClient? I've occasionally been getting execptions about 
 certificates, closed connections, host unknown, etc... but only sometimes. 
 I am using the -dot- notation, so I don't think that this error is related 
 to my endpoint URL specifically. A sample of the exceptions are:

 org.apache.http.conn.**HttpHostConnectException: Connection to 
 https://engine004-dot-**myapplication.appspot.comhttps://engine004-dot-myapplication.appspot.comrefused
 at org.apache.http.impl.conn.**DefaultClientConnectionOperato**
 r.openConnection(**DefaultClientConnectionOperato**r.java:183)
 at org.apache.http.impl.conn.**AbstractPoolEntry.open(**
 AbstractPoolEntry.java:164)
 at org.apache.http.impl.conn.**AbstractPooledConnAdapter.**open(**
 AbstractPooledConnAdapter.**java:119)
 ...
 Caused by: java.net.SocketException: failed to connect to /
 173.194.77.141 (port 443) after 15000ms: isConnected failed: 
 EHOSTUNREACH (No route to host)
 at libcore.io.IoBridge.**isConnected(IoBridge.java:230)
 at libcore.io.IoBridge.**connectErrno(IoBridge.java:**161)
 at libcore.io.IoBridge.connect(**IoBridge.java:112)
 ...

 and

 javax.net.ssl.**SSLPeerUnverifiedException: No peer certificate
 at org.apache.harmony.xnet.**provider.jsse.SSLSessionImpl.**
 getPeerCertificates(**SSLSessionImpl.java:137)
 at org.apache.http.conn.ssl.**AbstractVerifier.verify(**
 AbstractVerifier.java:93)
 at org.apache.http.conn.ssl.**SSLSocketFactory.createSocket(**
 SSLSocketFactory.java:381)
 ...

 I initially just assumed that there was an issue with the phone 
 connectivity, but now with this peer certificate issue I'm not so sure 
 anymore.

 Does anyone have any ideas or suggestsions?

 Thanks!

 E

  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to android-developers+unsubscr...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Multi-Page Form with Fragments and Tabs

2013-02-14 Thread Evan Ruff
Hey guys,

I was hoping someone could give me a little insight as to how I can make my 
multi-page form work a little better. Currently, each page (two pages) on 
my form is a separate fragment. I use the ActionBar Tabs to display the 
pages and then a Next button in each page that switches the tabs to the 
next page. All validation is done on the Save button on the last page. 

Everything is working well, but I'm having a little issue with the back 
functionality. I'd like to be able to create/pop back stack activities when 
the user switched. As it is now, he just gets tossed completely out of the 
wizard, not returned to the previous page (tab).

How should I handle that? Any input would be appreciated! 

Oh, I'm targeting API 14.

Thanks!

Evan

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Android AppEngine SSL Weirdness

2013-02-08 Thread Evan Ruff
Hey guys,

I was wondering if anyone had been experiencing intermittent exceptions 
when securely connecting to an AppEngine servlet through 
the DefaultHttpClient? I've occasionally been getting execptions about 
certificates, closed connections, host unknown, etc... but only sometimes. 
I am using the -dot- notation, so I don't think that this error is related 
to my endpoint URL specifically. A sample of the exceptions are:

org.apache.http.conn.HttpHostConnectException: Connection to 
https://engine004-dot-myapplication.appspot.com refused
at 
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
at 
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
at 
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
...
Caused by: java.net.SocketException: failed to connect to /173.194.77.141 
(port 443) after 15000ms: isConnected failed: EHOSTUNREACH (No route to 
host)
at libcore.io.IoBridge.isConnected(IoBridge.java:230)
at libcore.io.IoBridge.connectErrno(IoBridge.java:161)
at libcore.io.IoBridge.connect(IoBridge.java:112)
...

and

javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
at 
org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
at 
org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
at 
org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
...

I initially just assumed that there was an issue with the phone 
connectivity, but now with this peer certificate issue I'm not so sure 
anymore.

Does anyone have any ideas or suggestsions?

Thanks!

E

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Android AppEngine SSL Weirdness

2013-02-08 Thread Evan Ruff
Hey hey!

It happens intermittently on Nexus 7s and Motorola Droid 4 running 4.0.4.I
thought it was the sorta funny Certificate layout of AppEngine, but
apparently that was addresses in 4.0?

Thanks,

E


On Fri, Feb 8, 2013 at 11:10 AM, Nobu Games dev.nobu.ga...@gmail.comwrote:

 What device are you testing on? Do you get that error also on newer ones?


 On Friday, February 8, 2013 7:30:19 AM UTC-6, Evan Ruff wrote:

 Hey guys,

 I was wondering if anyone had been experiencing intermittent exceptions
 when securely connecting to an AppEngine servlet through
 the DefaultHttpClient? I've occasionally been getting execptions about
 certificates, closed connections, host unknown, etc... but only sometimes.
 I am using the -dot- notation, so I don't think that this error is related
 to my endpoint URL specifically. A sample of the exceptions are:

 org.apache.http.conn.**HttpHostConnectException: Connection to
 https://engine004-dot-**myapplication.appspot.comhttps://engine004-dot-myapplication.appspot.comrefused
 at org.apache.http.impl.conn.**DefaultClientConnectionOperato**
 r.openConnection(**DefaultClientConnectionOperato**r.java:183)
 at org.apache.http.impl.conn.**AbstractPoolEntry.open(**
 AbstractPoolEntry.java:164)
 at org.apache.http.impl.conn.**AbstractPooledConnAdapter.**open(**
 AbstractPooledConnAdapter.**java:119)
 ...
 Caused by: java.net.SocketException: failed to connect to 
 /173.194.77.141(port 443) after 15000ms: isConnected failed: EHOSTUNREACH 
 (No route to
 host)
 at libcore.io.IoBridge.**isConnected(IoBridge.java:230)
 at libcore.io.IoBridge.**connectErrno(IoBridge.java:**161)
 at libcore.io.IoBridge.connect(**IoBridge.java:112)
 ...

 and

 javax.net.ssl.**SSLPeerUnverifiedException: No peer certificate
 at org.apache.harmony.xnet.**provider.jsse.SSLSessionImpl.**
 getPeerCertificates(**SSLSessionImpl.java:137)
 at org.apache.http.conn.ssl.**AbstractVerifier.verify(**
 AbstractVerifier.java:93)
 at org.apache.http.conn.ssl.**SSLSocketFactory.createSocket(**
 SSLSocketFactory.java:381)
 ...

 I initially just assumed that there was an issue with the phone
 connectivity, but now with this peer certificate issue I'm not so sure
 anymore.

 Does anyone have any ideas or suggestsions?

 Thanks!

 E

  --
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Re: Bad View Behavior with Changing ListViews

2012-12-31 Thread Evan Ruff
Guys,

Thanks so much for your suggestions. I had tried all of the notify* and
invalidate* methods on the adapter and list to no avail. The easiest
solution for me was removing the swapCursor( null ) call. After doing this,
the orphaned views no longer persist and everything is working as
expected.

Thanks guys!

E


On Sun, Dec 30, 2012 at 10:48 AM, Nobu Games dev.nobu.ga...@gmail.comwrote:

 I just checked the implementation of (Simple)CursorAdapter. Calling
 swapCursor with argument null (instead of another cursor object) internally
 calls notifyDataSetInvalidated. That is basically a death sentence for an
 Adapter and signals to the ListView it belongs to that the data source
 should not be used anymore.

 Why it seems to still be working erratically after setting a different
 cursor object might have to do with an internal bug in ListView and its
 view caching strategies. You just triggered a sequence of events that is
 undefined or not allowed to happen in the framework.

 So you have three options:

 1. Don't call swapCursor(null)
 2. If you want the ListView to be blank then call listView.setAdapter(null)
 3. Or temporarily let Adapter.getCount() return 0 and call
 notifyDataSetChanged until the new cursor is loaded.


 On Wednesday, December 19, 2012 9:23:25 PM UTC-6, Evan Ruff wrote:

 Hey guys,

 I'm having some funny issues with my ListViews. Generally, I have a
 ListView activity where the list view takes up the entire activity. The
 list views are using a custom SimpleCursorAdapter and are using the
 supportLoaderManager to load in the data. The Loaders are connected to
 Observers and the data can be changed by background services. I'm getting
 some weird behavior when the data changes.

 When the data changes, I am doing an adapter.swapCursor( null ) while the
 new data is loading.

 When the list gets shorter, I'm getting black areas where the previous
 views where, and sometime I'm getting ~ghosting of older views if the
 removed views are at the bottom of the list. Is there some way to enforce
 invalidation or removal of these views?

 Is there some step I'm missing?

 Thanks!

 E

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Bad View Behavior with Changing ListViews

2012-12-19 Thread Evan Ruff
Hey guys,

I'm having some funny issues with my ListViews. Generally, I have a 
ListView activity where the list view takes up the entire activity. The 
list views are using a custom SimpleCursorAdapter and are using the 
supportLoaderManager to load in the data. The Loaders are connected to 
Observers and the data can be changed by background services. I'm getting 
some weird behavior when the data changes.

When the data changes, I am doing an adapter.swapCursor( null ) while the 
new data is loading.

When the list gets shorter, I'm getting black areas where the previous 
views where, and sometime I'm getting ~ghosting of older views if the 
removed views are at the bottom of the list. Is there some way to enforce 
invalidation or removal of these views?

Is there some step I'm missing?

Thanks!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Error: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length - very annoing

2012-11-29 Thread Evan Ruff
I am getting these issues as well. Did you ever find the solution to the 
problem?

Thanks,

E

On Tuesday, October 30, 2012 5:24:07 AM UTC-4, Giuseppe wrote:

 Starting SDK 4.1.1 I have continuously the 
 error: E/SpannableStringBuilder(1068): SPAN_EXCLUSIVE_EXCLUSIVE spans 
 cannot have a zero length

 What is it ? How can I remove it from LogCat ? 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Starting with Loaders, Beginner Questions

2012-11-16 Thread Evan Ruff
Thank you for the quick response. This really clarifies things for me!

Appreciate the help,

E

On Thursday, November 15, 2012 9:49:28 AM UTC-5, Streets Of Boston wrote:

 reduces the memory leak of an activity.
 should read
 reduces the *risk of a *memory leak of an activity.

 On Thursday, November 15, 2012 9:47:25 AM UTC-5, Streets Of Boston wrote:

 Some quick answers to your questions :)

 1. I use loaders mainly in fragments. Since fragments can be retained 
 across configuration changes (setRetainInstance(true)), loaders tied to 
 these fragments are retained across configuration changes as well.
 Also, delivery to your UI when data has been loaded is handled for you by 
 loaders; you don't have to write code checking if the activity still exists 
 if the data is delivered, etc. This makes your code less error prone and 
 reduces the memory leak of an activity.

 2. Initialize the loader in the onCreate (of a Fragment). If the fragment 
 is retained, then you shouldn't see an empty list 'flash' when the device 
 is rotated: The data from your loader should still be available.

 3. Yes, but it depends what object initializes/loads the loader. See my 
 previous remarks about using them in fragment that are retained.

 4. Using  a ContentObserver/ContentProvider would allow you to easily use 
 CursorLoaders.

 5. Again: Use a fragment that is retained and that show the 'loading' 
 animation:
 When starting to load data, set a boolean that is a field in your 
 fragment to 'true' and show the loading... animation.
 In onStop stop the loading... animation.
 In onStart, if the loading boolean is true, show the loading... animation 
 (again).
 When data has been loaded, stop the loading... animation and set the 
 loading boolean to 'false'.


 On Wednesday, November 14, 2012 9:38:15 PM UTC-5, Evan Ruff wrote:

 Hey guys,

 I'm beginning to bring my application out of the dark ages (API 7) up to 
 the more recent stuff and I'd like to migrate from my current Singleton 
 data provider to something like the Loader paradigm. I had a couple of 
 question. Currently, when the Application starts, I pull all of my objects 
 out of the database and hold them in a singleton User object on the 
 Application. The Activities then pass around ID references which query the 
 singleton for values. This breaks down rather dramatically when the 
 application is terminated and doesn't really jive well with the Android 
 way. I've started to do some testing with loaders and have based my test 
 implementation off the follow tutorial:

 http://www.androiddesignpatterns.com/2012/08/implementing-loaders.html

 Couple Questions:
 1. Are loaders special? Are they handled differently from a LifeCycle 
 perspective or is it simply a more streamlined way of doing loading in an 
 AsyncTask then returning it to the Activity?

 2. There always seems to be a nasty flash of an empty list on my 
 Activities. Should the onResume check for a load and load immediately? 
 (deliverResults?)

 3. Do the loaders save state in an onSaveInstanceState sort of way?

 4. I'm a little foggy on the ContentObserver. My data is backed up by 
 the SQLlite DB... is a ContentObserver better, or should I just manually 
 invoke BroadcastReceivers when my application pulls down new data?

 5. How should I handle loading animations in the Activity? Traditional 
 way of start/stopping the Loading animation? My question is around 
 when... show ProgressBar in onResume and hide it on onLoadFinished?

 Thanks for any pointers!

 E



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Starting with Loaders, Beginner Questions

2012-11-14 Thread Evan Ruff
Hey guys,

I'm beginning to bring my application out of the dark ages (API 7) up to 
the more recent stuff and I'd like to migrate from my current Singleton 
data provider to something like the Loader paradigm. I had a couple of 
question. Currently, when the Application starts, I pull all of my objects 
out of the database and hold them in a singleton User object on the 
Application. The Activities then pass around ID references which query the 
singleton for values. This breaks down rather dramatically when the 
application is terminated and doesn't really jive well with the Android 
way. I've started to do some testing with loaders and have based my test 
implementation off the follow tutorial:

http://www.androiddesignpatterns.com/2012/08/implementing-loaders.html

Couple Questions:
1. Are loaders special? Are they handled differently from a LifeCycle 
perspective or is it simply a more streamlined way of doing loading in an 
AsyncTask then returning it to the Activity?

2. There always seems to be a nasty flash of an empty list on my 
Activities. Should the onResume check for a load and load immediately? 
(deliverResults?)

3. Do the loaders save state in an onSaveInstanceState sort of way?

4. I'm a little foggy on the ContentObserver. My data is backed up by the 
SQLlite DB... is a ContentObserver better, or should I just manually 
invoke BroadcastReceivers when my application pulls down new data?

5. How should I handle loading animations in the Activity? Traditional way 
of start/stopping the Loading animation? My question is around when... 
show ProgressBar in onResume and hide it on onLoadFinished?

Thanks for any pointers!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Launch Behavior Issues, 2.3 vs. 4

2012-11-13 Thread Evan Ruff
Hey Guys,

So I have discovered what was creating this behavior.

Basically, in my activity, I reuse the calling activity to relaunch the 
activity based on a number of parameters. By changing the action of the 
intent, it fools the system into thinking that the LAUNCH activity is gone. 
This was causing the system to recreate the task each time you hit the HOME 
icon, as the intents didn't match and that was that.

To fix the problem, I moved all the Intent based signalling (which we weird 
anyways) into my saved state object and now we're humming along nicely.

I really appreciate all the help from the group! I thought I had checked 
everything but everyone's input helped me really zero in and fix the issue.

Thanks guys!

E

On Tuesday, November 6, 2012 7:59:55 PM UTC-5, Evan Ruff wrote:

 Hello all,

 I'm having some very frustrating and confusing issues getting my 
 application to function as it has been. My application uses an Application 
 object to hold a user object. This object is large and is loaded from the 
 database and held in the Application singleton (MyApplication extends 
 Application) by an async task in my .Splash activity. All activities 
 subclass a BaseActivity that checks for the existence of this user. If the 
 user is not present, it finish()es the activity and finishes all the way 
 back to the Splash screen, where the user is loaded from the DB.

 The splash activity looks like this:
 activity
 android:name=.Splash
 android:label=@string/app_name
 android:screenOrientation=portrait 
 intent-filter
 action android:name=android.intent.action.MAIN /

 category android:name=android.intent.category.LAUNCHER 
 /
 /intent-filter
 /activity

 This application has been deployed in various forms all the way since 1.5. 
 In the past, let's say you were working in the application on an Activity 
 four down the stack. You hit home/phone call/whatever and, when the 
 application returns, the onResume activity picks up the user from the 
 Application and everything works as normal. I am not getting this behavior 
 anymore. On my MyTouch running 1.6, it works as expected. Whatever Activity 
 was previously on top of the stack is loaded and onResume called.

 All of a sudden, I am not seeing that behavior.

 On my Galaxy Nexus, it does not work as expected. On the GNexus, if I hit 
 HOME then hit the Launcher icon, sometimes, the Application is clobbered 
 and the fall through happens. Other times, it goes right back to the 
 launcher .Splash activity. If I hit HOME, then hit the recent apps, it 
 works fine. Looking at LogCat output, it doesn't seem to try to resume at 
 all if I hit the Launcher button.  I have tried launchMode=singleTop, but 
 that doesn't seem to work.

 And here's even the crazier part... if I deploy the application from the 
 debugger over ADB... WITHOUT ANY CODE CHANGES, I get the behavior I'm 
 expecting and have gotten in the past. The last activity pops up as usual, 
 onResume executed and the application can find the Application. This holds 
 true even if I disconnect the debugger, restart the phone, and just use the 
 application that way. The problem occurs when I compile, deploy and install 
 the APK directly.

 I'm quite baffled by this behavior. Has anyone else had this sort of 
 scenario?

 I'd appreciate any help anyone could provide.

 Thanks!

 Evan


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Launch Behavior Issues, 2.3 vs. 4

2012-11-07 Thread Evan Ruff
Hey Kostya,

Thanks for the reply. 

What are the differences in these flag?

Do you have any insight into how to make the production app perform the 
same Home  Launcher behvior as when it's production?

Thanks,

E

On Wednesday, November 7, 2012 1:47:09 PM UTC-5, Kostya Vasilyev wrote:

 Evan,

 Eclipse uses a slightly different intent when launching your app than the 
 Launcher does. The following are log lines from my current project.

 Launcher:

 11-07 22:39:50.309 I/AccountListActivity(25660): * onCreate: Intent { 
 act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
 flg=0x1020 cmp=org.kman.AquaMail/.ui.AccountListActivity 
 bnds=[520,585][680,785] }

 Starting a debug session from Eclipse:

 11-07 22:40:33.543 I/AccountListActivity(27935): * onCreate: Intent { 
 act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
 flg=0x1000 cmp=org.kman.AquaMail/.ui.AccountListActivity }

 Note the difference in flags: 0x1020 vs 0x1000.

 To work around, you could press back to finish your top activity 
 immediately after launching from Eclipse, then go back into the app from 
 Launcher. This will keep your debug session intact: the debugger will still 
 be attached, the breakpoints set.

 -- K

 2012/11/7 Evan Ruff evan...@gmail.com javascript:

 Hello all,

 I'm having some very frustrating and confusing issues getting my 
 application to function as it has been. My application uses an Application 
 object to hold a user object. This object is large and is loaded from the 
 database and held in the Application singleton (MyApplication extends 
 Application) by an async task in my .Splash activity. All activities 
 subclass a BaseActivity that checks for the existence of this user. If the 
 user is not present, it finish()es the activity and finishes all the way 
 back to the Splash screen, where the user is loaded from the DB.

 The splash activity looks like this:
 activity
 android:name=.Splash
 android:label=@string/app_name
 android:screenOrientation=portrait 
 intent-filter
 action android:name=android.intent.action.MAIN /

 category android:name=android.intent.category.LAUNCHER 
 /
 /intent-filter
 /activity

 This application has been deployed in various forms all the way since 
 1.5. In the past, let's say you were working in the application on an 
 Activity four down the stack. You hit home/phone call/whatever and, when 
 the application returns, the onResume activity picks up the user from the 
 Application and everything works as normal. I am not getting this behavior 
 anymore. On my MyTouch running 1.6, it works as expected. Whatever Activity 
 was previously on top of the stack is loaded and onResume called.

 All of a sudden, I am not seeing that behavior.

 On my Galaxy Nexus, it does not work as expected. On the GNexus, if I hit 
 HOME then hit the Launcher icon, sometimes, the Application is clobbered 
 and the fall through happens. Other times, it goes right back to the 
 launcher .Splash activity. If I hit HOME, then hit the recent apps, it 
 works fine. Looking at LogCat output, it doesn't seem to try to resume at 
 all if I hit the Launcher button.  I have tried launchMode=singleTop, but 
 that doesn't seem to work.

 And here's even the crazier part... if I deploy the application from the 
 debugger over ADB... WITHOUT ANY CODE CHANGES, I get the behavior I'm 
 expecting and have gotten in the past. The last activity pops up as usual, 
 onResume executed and the application can find the Application. This holds 
 true even if I disconnect the debugger, restart the phone, and just use the 
 application that way. The problem occurs when I compile, deploy and install 
 the APK directly.

 I'm quite baffled by this behavior. Has anyone else had this sort of 
 scenario?

 I'd appreciate any help anyone could provide.

 Thanks!

 Evan

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Launch Behavior Issues, 2.3 vs. 4

2012-11-07 Thread Evan Ruff
So I found an edge case where I was calling finish() on my Launcher 
activity. This was causing the behavior I described above.

I'm still not sure why it's different for the emulator and for the actual 
running, but preliminary testing has indicated that it solves the issue... 
so far so good, will report back with findings if anything changes.

E

On Wednesday, November 7, 2012 2:12:08 PM UTC-5, Evan Ruff wrote:

 Hey Kostya,

 Thanks for the reply. 

 What are the differences in these flag?

 Do you have any insight into how to make the production app perform the 
 same Home  Launcher behvior as when it's production?

 Thanks,

 E

 On Wednesday, November 7, 2012 1:47:09 PM UTC-5, Kostya Vasilyev wrote:

 Evan,

 Eclipse uses a slightly different intent when launching your app than the 
 Launcher does. The following are log lines from my current project.

 Launcher:

 11-07 22:39:50.309 I/AccountListActivity(25660): * onCreate: Intent { 
 act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
 flg=0x1020 cmp=org.kman.AquaMail/.ui.AccountListActivity 
 bnds=[520,585][680,785] }

 Starting a debug session from Eclipse:

 11-07 22:40:33.543 I/AccountListActivity(27935): * onCreate: Intent { 
 act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
 flg=0x1000 cmp=org.kman.AquaMail/.ui.AccountListActivity }

 Note the difference in flags: 0x1020 vs 0x1000.

 To work around, you could press back to finish your top activity 
 immediately after launching from Eclipse, then go back into the app from 
 Launcher. This will keep your debug session intact: the debugger will still 
 be attached, the breakpoints set.

 -- K

 2012/11/7 Evan Ruff evan...@gmail.com

 Hello all,

 I'm having some very frustrating and confusing issues getting my 
 application to function as it has been. My application uses an Application 
 object to hold a user object. This object is large and is loaded from the 
 database and held in the Application singleton (MyApplication extends 
 Application) by an async task in my .Splash activity. All activities 
 subclass a BaseActivity that checks for the existence of this user. If the 
 user is not present, it finish()es the activity and finishes all the way 
 back to the Splash screen, where the user is loaded from the DB.

 The splash activity looks like this:
 activity
 android:name=.Splash
 android:label=@string/app_name
 android:screenOrientation=portrait 
 intent-filter
 action android:name=android.intent.action.MAIN /

 category 
 android:name=android.intent.category.LAUNCHER /
 /intent-filter
 /activity

 This application has been deployed in various forms all the way since 
 1.5. In the past, let's say you were working in the application on an 
 Activity four down the stack. You hit home/phone call/whatever and, when 
 the application returns, the onResume activity picks up the user from the 
 Application and everything works as normal. I am not getting this behavior 
 anymore. On my MyTouch running 1.6, it works as expected. Whatever Activity 
 was previously on top of the stack is loaded and onResume called.

 All of a sudden, I am not seeing that behavior.

 On my Galaxy Nexus, it does not work as expected. On the GNexus, if I 
 hit HOME then hit the Launcher icon, sometimes, the Application is 
 clobbered and the fall through happens. Other times, it goes right back to 
 the launcher .Splash activity. If I hit HOME, then hit the recent apps, it 
 works fine. Looking at LogCat output, it doesn't seem to try to resume at 
 all if I hit the Launcher button.  I have tried launchMode=singleTop, but 
 that doesn't seem to work.

 And here's even the crazier part... if I deploy the application from the 
 debugger over ADB... WITHOUT ANY CODE CHANGES, I get the behavior I'm 
 expecting and have gotten in the past. The last activity pops up as usual, 
 onResume executed and the application can find the Application. This holds 
 true even if I disconnect the debugger, restart the phone, and just use the 
 application that way. The problem occurs when I compile, deploy and install 
 the APK directly.

 I'm quite baffled by this behavior. Has anyone else had this sort of 
 scenario?

 I'd appreciate any help anyone could provide.

 Thanks!

 Evan

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-d...@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email

Re: [android-developers] Launch Behavior Issues, 2.3 vs. 4

2012-11-07 Thread Evan Ruff
And... I spoke too soon.

When I exported the application and installed it on the device, it goes 
back to the wonky launch behavior...

E

On Wednesday, November 7, 2012 2:54:44 PM UTC-5, Evan Ruff wrote:

 So I found an edge case where I was calling finish() on my Launcher 
 activity. This was causing the behavior I described above.

 I'm still not sure why it's different for the emulator and for the actual 
 running, but preliminary testing has indicated that it solves the issue... 
 so far so good, will report back with findings if anything changes.

 E

 On Wednesday, November 7, 2012 2:12:08 PM UTC-5, Evan Ruff wrote:

 Hey Kostya,

 Thanks for the reply. 

 What are the differences in these flag?

 Do you have any insight into how to make the production app perform the 
 same Home  Launcher behvior as when it's production?

 Thanks,

 E

 On Wednesday, November 7, 2012 1:47:09 PM UTC-5, Kostya Vasilyev wrote:

 Evan,

 Eclipse uses a slightly different intent when launching your app than 
 the Launcher does. The following are log lines from my current project.

 Launcher:

 11-07 22:39:50.309 I/AccountListActivity(25660): * onCreate: Intent 
 { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
 flg=0x1020 cmp=org.kman.AquaMail/.ui.AccountListActivity 
 bnds=[520,585][680,785] }

 Starting a debug session from Eclipse:

 11-07 22:40:33.543 I/AccountListActivity(27935): * onCreate: Intent 
 { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
 flg=0x1000 cmp=org.kman.AquaMail/.ui.AccountListActivity }

 Note the difference in flags: 0x1020 vs 0x1000.

 To work around, you could press back to finish your top activity 
 immediately after launching from Eclipse, then go back into the app from 
 Launcher. This will keep your debug session intact: the debugger will still 
 be attached, the breakpoints set.

 -- K

 2012/11/7 Evan Ruff evan...@gmail.com

 Hello all,

 I'm having some very frustrating and confusing issues getting my 
 application to function as it has been. My application uses an Application 
 object to hold a user object. This object is large and is loaded from the 
 database and held in the Application singleton (MyApplication extends 
 Application) by an async task in my .Splash activity. All activities 
 subclass a BaseActivity that checks for the existence of this user. If the 
 user is not present, it finish()es the activity and finishes all the way 
 back to the Splash screen, where the user is loaded from the DB.

 The splash activity looks like this:
 activity
 android:name=.Splash
 android:label=@string/app_name
 android:screenOrientation=portrait 
 intent-filter
 action android:name=android.intent.action.MAIN /

 category 
 android:name=android.intent.category.LAUNCHER /
 /intent-filter
 /activity

 This application has been deployed in various forms all the way since 
 1.5. In the past, let's say you were working in the application on an 
 Activity four down the stack. You hit home/phone call/whatever and, when 
 the application returns, the onResume activity picks up the user from the 
 Application and everything works as normal. I am not getting this behavior 
 anymore. On my MyTouch running 1.6, it works as expected. Whatever 
 Activity 
 was previously on top of the stack is loaded and onResume called.

 All of a sudden, I am not seeing that behavior.

 On my Galaxy Nexus, it does not work as expected. On the GNexus, if I 
 hit HOME then hit the Launcher icon, sometimes, the Application is 
 clobbered and the fall through happens. Other times, it goes right back to 
 the launcher .Splash activity. If I hit HOME, then hit the recent apps, it 
 works fine. Looking at LogCat output, it doesn't seem to try to resume at 
 all if I hit the Launcher button.  I have tried launchMode=singleTop, but 
 that doesn't seem to work.

 And here's even the crazier part... if I deploy the application from 
 the debugger over ADB... WITHOUT ANY CODE CHANGES, I get the behavior I'm 
 expecting and have gotten in the past. The last activity pops up as usual, 
 onResume executed and the application can find the Application. This holds 
 true even if I disconnect the debugger, restart the phone, and just use 
 the 
 application that way. The problem occurs when I compile, deploy and 
 install 
 the APK directly.

 I'm quite baffled by this behavior. Has anyone else had this sort of 
 scenario?

 I'd appreciate any help anyone could provide.

 Thanks!

 Evan

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-d...@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

[android-developers] Launch Behavior Issues, 2.3 vs. 4

2012-11-06 Thread Evan Ruff
Hello all,

I'm having some very frustrating and confusing issues getting my 
application to function as it has been. My application uses an Application 
object to hold a user object. This object is large and is loaded from the 
database and held in the Application singleton (MyApplication extends 
Application) by an async task in my .Splash activity. All activities 
subclass a BaseActivity that checks for the existence of this user. If the 
user is not present, it finish()es the activity and finishes all the way 
back to the Splash screen, where the user is loaded from the DB.

The splash activity looks like this:
activity
android:name=.Splash
android:label=@string/app_name
android:screenOrientation=portrait 
intent-filter
action android:name=android.intent.action.MAIN /

category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

This application has been deployed in various forms all the way since 1.5. 
In the past, let's say you were working in the application on an Activity 
four down the stack. You hit home/phone call/whatever and, when the 
application returns, the onResume activity picks up the user from the 
Application and everything works as normal. I am not getting this behavior 
anymore. On my MyTouch running 1.6, it works as expected. Whatever Activity 
was previously on top of the stack is loaded and onResume called.

All of a sudden, I am not seeing that behavior.

On my Galaxy Nexus, it does not work as expected. On the GNexus, if I hit 
HOME then hit the Launcher icon, sometimes, the Application is clobbered 
and the fall through happens. Other times, it goes right back to the 
launcher .Splash activity. If I hit HOME, then hit the recent apps, it 
works fine. Looking at LogCat output, it doesn't seem to try to resume at 
all if I hit the Launcher button.  I have tried launchMode=singleTop, but 
that doesn't seem to work.

And here's even the crazier part... if I deploy the application from the 
debugger over ADB... WITHOUT ANY CODE CHANGES, I get the behavior I'm 
expecting and have gotten in the past. The last activity pops up as usual, 
onResume executed and the application can find the Application. This holds 
true even if I disconnect the debugger, restart the phone, and just use the 
application that way. The problem occurs when I compile, deploy and install 
the APK directly.

I'm quite baffled by this behavior. Has anyone else had this sort of 
scenario?

I'd appreciate any help anyone could provide.

Thanks!

Evan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Transporting to Server Problems

2012-07-31 Thread Evan Ruff
Hey guys,

I'm having some trouble getting my phone collected data up to my servers. I 
thought that I was getting old fashioned SocketTimeouts due to the phones 
having a bad connection or something of the like. After jacking up the 
timeouts WAY up on the phone (120 seconds) and the timeout WAY up on the 
server (120 seconds) I think that I must be doing something wrong in my 
code.

After changing the timeouts, I am now getting other odd timeout exceptions 
on the server. I'm getting a variety of Unexpected EOF read on the 
socket, java.io.IOException: Invalid CRLF and the venerable 
java.net.SocketTimeoutException. I'm wondering if I'm not properly 
flushing or clearing out the connection/entity in the Service logic. I was 
hoping someone could point out what I was doing wrong.

My data-sending code is as follows:
DefaultHttpClient httpClient = Util.getHttpClient(); // nothing special, 
just sets the timeouts

HttpPost httpPost = new HttpPost( Moose.getServerAddress() );
ByteArrayOutputStream baos = new ByteArrayOutputStream();

*// Write out the payload using Jackson to the baos*

ByteArrayEntity baEntity = new ByteArrayEntity( baos.toByteArray() );
baEntity.setContentType(application/json); 
baEntity.setChunked( true );
httpPost.setEntity( baEntity );

HttpResponse response = httpClient.execute( httpPost );
HttpEntity entity = response.getEntity(); 

I'm not doing any cleanup at all, and I think that might be my problem. Is 
there a correct way to terminate this off? I assume I should be closing 
the  ByteArrayOutputStream, but what about the ByteArrayEntity? Do I need 
to do anything with the response after I'm doing consuming it?

Thanks for any help and suggestions!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Transporting to Server Problems

2012-07-31 Thread Evan Ruff
Right, the thing is, I NEVER get the the problem when I'm testing. It's
only happening in the field.

What's really weird is that it's just not THAT much data. I mean, I'd say
the average payload size is 200kb!

Thanks!

E

On Tue, Jul 31, 2012 at 10:27 AM, bob b...@coolfone.comze.com wrote:

 If you are getting a variety of errors, as opposed to a single
 reproducible error, it could indeed be something goofy with your
 connection.  Why not at least switch to a solid Wifi connection so you can
 eliminate that possibility?


 On Tuesday, July 31, 2012 8:35:42 AM UTC-5, Evan Ruff wrote:

 Hey guys,

 I'm having some trouble getting my phone collected data up to my servers.
 I thought that I was getting old fashioned SocketTimeouts due to the phones
 having a bad connection or something of the like. After jacking up the
 timeouts WAY up on the phone (120 seconds) and the timeout WAY up on the
 server (120 seconds) I think that I must be doing something wrong in my
 code.

 After changing the timeouts, I am now getting other odd timeout
 exceptions on the server. I'm getting a variety of Unexpected EOF read on
 the socket, java.io.IOException: Invalid CRLF and the venerable 
 java.net.**SocketTimeoutException. I'm wondering if I'm not properly
 flushing or clearing out the connection/entity in the Service logic. I was
 hoping someone could point out what I was doing wrong.

 My data-sending code is as follows:
 DefaultHttpClient httpClient = Util.getHttpClient(); // nothing special,
 just sets the timeouts

 HttpPost httpPost = new HttpPost( Moose.getServerAddress() );
 ByteArrayOutputStream baos = new ByteArrayOutputStream();

 *// Write out the payload using Jackson to the baos*

 ByteArrayEntity baEntity = new ByteArrayEntity( baos.toByteArray() );
 baEntity.setContentType(**application/json);
 baEntity.setChunked( true );
 httpPost.setEntity( baEntity );

 HttpResponse response = httpClient.execute( httpPost );
 HttpEntity entity = response.getEntity();

 I'm not doing any cleanup at all, and I think that might be my problem.
 Is there a correct way to terminate this off? I assume I should be closing
 the  ByteArrayOutputStream, but what about the ByteArrayEntity? Do I
 need to do anything with the response after I'm doing consuming it?

 Thanks for any help and suggestions!

 E

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Spinner Styling - Am I Nuts??

2012-07-26 Thread Evan Ruff
Hey guys!

I have a spinner backed up by an ArrayAdapter in my layout. I'd like to 
change the look of the spinner button to match the buttons that are next to 
it.

Here is my Spinner xml:
Spinner
android:id=@+id/location_type_spinner
style=@android:style/Widget.Button
android:layout_width=0dp
android:layout_height=fill_parent
android:layout_weight=.33
android:background=@drawable/control_bar_background
android:gravity=center
android:textColor=#FF00
android:textSize=12dp /

While the bounds of the button (it fills the width/height/weight correctly) 
and the background work, the text is larger and the gravity is not centered.

I'm going nuts trying to fix this! What am I missing? Is there a different 
style I need to use or something like that?

Thanks!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Spinner Styling - Am I Nuts??

2012-07-26 Thread Evan Ruff
Kostya,

Thanks for the response. Just to clarify, the getView in the adapter sets 
the BUTTON? I thought that set the view for the actual menu of items?

Thanks,

E

On Thursday, July 26, 2012 8:38:36 AM UTC-4, Kostya Vasilyev wrote:

 The contents of a spinner is provided by its adapter. Check the layout 
 used by your adapter's getView().

 -- K

 2012/7/26 Evan Ruff evan.r...@gmail.com

 Hey guys!

 I have a spinner backed up by an ArrayAdapter in my layout. I'd like to 
 change the look of the spinner button to match the buttons that are next to 
 it.

 Here is my Spinner xml:
 Spinner
 android:id=@+id/location_type_spinner
 style=@android:style/Widget.Button
 android:layout_width=0dp
 android:layout_height=fill_parent
 android:layout_weight=.33
 android:background=@drawable/control_bar_background
 android:gravity=center
 android:textColor=#FF00
 android:textSize=12dp /

 While the bounds of the button (it fills the width/height/weight 
 correctly) and the background work, the text is larger and the gravity is 
 not centered.

 I'm going nuts trying to fix this! What am I missing? Is there a 
 different style I need to use or something like that?

 Thanks!

 E

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Spinner Styling - Am I Nuts??

2012-07-26 Thread Evan Ruff
AND BOOM. That's where I was getting all turned around.

Thanks Mark and Kostya! 

E

On Thursday, July 26, 2012 8:56:06 AM UTC-4, Kostya Vasilyev wrote:

 2012/7/26 Mark Murphy mmur...@commonsware.com

 On Thu, Jul 26, 2012 at 8:44 AM, Evan Ruff evan.r...@gmail.com wrote:
  Thanks for the response. Just to clarify, the getView in the adapter 
 sets
  the BUTTON? I thought that set the view for the actual menu of items?

 The SpinnerAdapter supplies both the View for the Spinner in the
 closed state and the Views for the rows in the pop-up list that
 appears when the Spinner is in the open state. That is why you need to
 supply two layout resources.


 And to further clarify - it's getView() and getDropDownView() respectively.
  


 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 3.8 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] JAVA_HOME Not recognized in Tools?

2011-02-08 Thread Evan Ruff
Hey guys,

Not to sound like a grump, but why does \tools\lib\find_java.bat ignore the 
JAVA_HOME environmental variable? I have having to change my config around 
just to reference this.

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Development Tools Crashing

2011-02-07 Thread Evan Ruff
Xav,

I have, ~all the targets since 1.0 installed! Maybe this is breaking
everything?

I'll remove everything except 1.6 and see if that helps.

Also, is there a new version (you mention ADT 10.0). I'm on 9.0, but the
Update Manager does not inform me of anything?

Thanks for the help!

E

On Sun, Feb 6, 2011 at 5:33 PM, Xavier Ducrohet x...@android.com wrote:

 I can't seem to reproduce (running ADT 10.0, tip of tree, and Eclipse
 3.5r2))

 - created a new project
 - edited main.xml

 the rendering target is properly selected (in this case Android 2.2),
 and the default theme (Theme) was selected.

 I don't think we changed things around this so I'm not sure what's up.
 How many Android Targets do you have installed?

 Xav

 On Sun, Feb 6, 2011 at 7:53 AM, Seni Sangrujee s...@fieldteams.com
 wrote:
  about 85% of the time. If it does not throw the NPE, it says Missing
 Theme
 
  I'm getting the same thing on Galileo.  It looks like a temporary
  workaround is to select the platform dropdown(Android 2.2/2.3) in the
  upper right which will cause the Theme dropdown to appear next to it.
 
 
 
  --
  Seni Sangrujee
  http://fieldteams.com
  http://metosphere.com
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 



 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.
 http://developer.android.com | http://tools.android.com

 Please do not send me questions directly. Thanks!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Development Tools Crashing

2011-02-07 Thread Evan Ruff
Kostya,

Thanks for the very informative post. I'll make the changes you suggested
and report back!

E

On Sun, Feb 6, 2011 at 11:07 AM, Kostya Vasilyev kmans...@gmail.com wrote:

  Slow code assist, or, more precisely, JavaDoc lookup (which is shown side
 by side with code assist suggestions) is a known Eclipse Helios 3.6SR1
 issue.

 I've written a summary of various workarounds here:

 http://kmansoft.wordpress.com/category/tools/

 The good news is that this is fixed in 3.6SR2, due February 25.

 -- Kostya

 06.02.2011 18:15, Evan Ruff пишет:

 Hey Guys,

  I'm having a NPE thrown when I try to edit a layout. I generally happens
 about 85% of the time. If it does not throw the NPE, it says Missing Theme
 with no assist or layout. The XML editor does still provide assistance if
 the NPE is not thrown. Additionally, my auto-complete is taking FOREVER
 inside Android classes. Is anyone else experiencing something like this? Any
 ideas how to rectify the situation?

  Thank you for any help!

  Evan

  Here's the details:
 Eclipse Helios R1, 32-bit Windows installed on Drive E. Projects/Workspace
 installed on E.
 Android Development Tools 9.0.0.v201101191456-93220
 Google Plugin for Eclipse 1.4.2.v201012111742
 Subversion, etc... everything else is pretty stock.

  In my Content Assist preferences, I only have Basic Proposals and Java
 Proposals checked in both dialog.

  Here's the NPE from the trying to edit the layout:
  java.lang.NullPointerException
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
 Source)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(Unknown
 Source)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(Unknown
 Source)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange(Unknown
 Source)
  at
 org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
  at
 org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
  at
 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)
  at
 org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
  at
 org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
  at
 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
  at
 org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
  at
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
  at
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
  at
 org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
  at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
  at
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
  at
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
  at
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
  at
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
  at
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
  at
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
  at
 org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
  at
 org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
  at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
  at
 org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
  at
 org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
  at
 org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
  at
 org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
  at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
  at
 org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84

Re: [android-developers] Re: Development Tools Crashing

2011-02-07 Thread Evan Ruff
Seni,

I can verify that I am getting the same behavior. First load it bombs out.
Second load it complains about the Theme.

Still working on removing the platforms...

E

On Mon, Feb 7, 2011 at 2:40 PM, Seni Sangrujee s...@fieldteams.com wrote:

 I don't know if this helps, but I get different errors in the log when
 I open a layout file for the first time vs. later.

 My setup:
 Plug-in Name: Android Development Toolkit
 Plug-in Id: com.android.ide.eclipse.adt
 Version: 9.0.0.v201101191456-93220


 1) Create new project, first open layout main.xml file:
 - Could not open the editor: An unexpected exception was thrown.
 - workspace/.metadata/.log says:
 !ENTRY org.eclipse.ui 4 0 2011-02-07 11:21:50.943
 !MESSAGE Unable to create editor ID
 com.android.ide.eclipse.editors.layout.LayoutEditor: An unexpected
 exception was thrown.
 !STACK 0
 - java.lang.NullPointerException
 at

 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
 Source)

 2) Close main.xml file, opening it again results in:
 - Graphical layout tab is open, but says Missing theme. Platform
 dropdown is not selected.
 - workspace/metadata/log says:
 !ENTRY com.android.ide.eclipse.adt 4 0 2011-02-07 11:23:23.180
 !MESSAGE Selecting page '0' in AndroidXmlEditor failed
 !STACK 0
 java.lang.NullPointerException
at

 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
 Source)



 --
 Seni Sangrujee
 http://fieldteams.com
 http://metosphere.com

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Development Tools Crashing

2011-02-07 Thread Evan Ruff
Tor,

I'll install this tonight and test. I assume I drop the plugins folder
into my Eclipse installation.

I apologize for my naivete, but I've become stupid reliant on the Plug-in
Manager in my old age.

E

On Mon, Feb 7, 2011 at 5:08 PM, Tor Norbye tnor...@google.com wrote:

 Unfortunately, the Android Eclipse tooling was compiled without debug
 info, which means we don't have line numbers pin-pointing the problem,
 and that's particularly problematic in this case because the method
 where the problem occurs is really large.

 We've regenerated a new build of ADT 9 with debug symbols (and builds
 form now on will all include debug info).

 Would those of you who can reproduce this problem mind downloading
 this new version of ADT 9 and try to reproduce it there? If you hit
 the exception again, the stacktrace should be a lot more useful to us
 since it should have valid line numbers.

 You can find the new build at the bottom of the Attachments list from
 http://tools.android.com/download -
 or use this direct link:

 http://tools.android.com/download/ADT-9.0.0-with-debug.zip?attredirects=0d=1

 These bits are identical to the ADT R9 release except for the compiler
 flag to enable debug information.

 -- Tor

 On Mon, Feb 7, 2011 at 11:45 AM, Evan Ruff
 evan.r...@hendersonsawmill.com wrote:
  Seni,
  I can verify that I am getting the same behavior. First load it bombs
 out.
  Second load it complains about the Theme.
  Still working on removing the platforms...
  E
 
  On Mon, Feb 7, 2011 at 2:40 PM, Seni Sangrujee s...@fieldteams.com
 wrote:
 
  I don't know if this helps, but I get different errors in the log when
  I open a layout file for the first time vs. later.
 
  My setup:
  Plug-in Name: Android Development Toolkit
  Plug-in Id: com.android.ide.eclipse.adt
  Version: 9.0.0.v201101191456-93220
 
 
  1) Create new project, first open layout main.xml file:
  - Could not open the editor: An unexpected exception was thrown.
  - workspace/.metadata/.log says:
  !ENTRY org.eclipse.ui 4 0 2011-02-07 11:21:50.943
  !MESSAGE Unable to create editor ID
  com.android.ide.eclipse.editors.layout.LayoutEditor: An unexpected
  exception was thrown.
  !STACK 0
  - java.lang.NullPointerException
 at
 
 
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
  Source)
 
  2) Close main.xml file, opening it again results in:
  - Graphical layout tab is open, but says Missing theme. Platform
  dropdown is not selected.
  - workspace/metadata/log says:
  !ENTRY com.android.ide.eclipse.adt 4 0 2011-02-07 11:23:23.180
  !MESSAGE Selecting page '0' in AndroidXmlEditor failed
  !STACK 0
  java.lang.NullPointerException
 at
 
 
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
  Source)
 
 
 
  --
  Seni Sangrujee
  http://fieldteams.com
  http://metosphere.com
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Development Tools Crashing

2011-02-07 Thread Evan Ruff
Kostya,

I followed your instructions to update Eclipse and it has fixed my content
assist issue! Thank you for the great tip!

Xavier, I have removed all of my unused Platforms and now only have 1.6 and
2.1 with the Google APIs. I have confirmed I can recreate the NPE issue. I
am installing the new version with the debug now...

E

On Sun, Feb 6, 2011 at 11:07 AM, Kostya Vasilyev kmans...@gmail.com wrote:

  Slow code assist, or, more precisely, JavaDoc lookup (which is shown side
 by side with code assist suggestions) is a known Eclipse Helios 3.6SR1
 issue.

 I've written a summary of various workarounds here:

 http://kmansoft.wordpress.com/category/tools/

 The good news is that this is fixed in 3.6SR2, due February 25.

 -- Kostya

 06.02.2011 18:15, Evan Ruff пишет:

 Hey Guys,

  I'm having a NPE thrown when I try to edit a layout. I generally happens
 about 85% of the time. If it does not throw the NPE, it says Missing Theme
 with no assist or layout. The XML editor does still provide assistance if
 the NPE is not thrown. Additionally, my auto-complete is taking FOREVER
 inside Android classes. Is anyone else experiencing something like this? Any
 ideas how to rectify the situation?

  Thank you for any help!

  Evan

  Here's the details:
 Eclipse Helios R1, 32-bit Windows installed on Drive E. Projects/Workspace
 installed on E.
 Android Development Tools 9.0.0.v201101191456-93220
 Google Plugin for Eclipse 1.4.2.v201012111742
 Subversion, etc... everything else is pretty stock.

  In my Content Assist preferences, I only have Basic Proposals and Java
 Proposals checked in both dialog.

  Here's the NPE from the trying to edit the layout:
  java.lang.NullPointerException
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
 Source)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(Unknown
 Source)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(Unknown
 Source)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange(Unknown
 Source)
  at
 org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
  at
 org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
  at
 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)
  at
 org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
  at
 org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
  at
 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
  at
 org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
  at
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
  at
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
  at
 org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
  at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
  at
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
  at
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
  at
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
  at
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
  at
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
  at
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
  at
 org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
  at
 org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
  at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
  at
 org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
  at
 org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
  at
 org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
  at
 org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264

Re: [android-developers] Development Tools Crashing

2011-02-07 Thread Evan Ruff
Also, not sure if I tried this previously, but it seems that now I can get
the layout editor if I close the opened XML tab, wait a minute, then reopen.
I still get the No theme selected message, but after selecting one it does
render properly!

E

On Mon, Feb 7, 2011 at 6:22 PM, Evan Ruff evan.r...@hendersonsawmill.comwrote:

 Xavier,

 Here's the output from NPE issue in the Layout Editor with the ADT Plug
 w/Debug:

 java.lang.NullPointerException
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1484)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1211)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:1039)
  at
 com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange(LayoutEditor.java:365)
  at
 org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
  at
 org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
  at
 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)
  at
 org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
  at
 org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
  at
 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
  at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
 at
 org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
  at
 org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
  at
 org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
  at
 org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
  at
 org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
  at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
  at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
 at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
  at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
 at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
  at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
 at
 org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
  at
 org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
  at
 org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
  at
 org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
  at
 org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
  at
 org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
  at
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
  at
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
  at
 org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
  at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
  at
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
 at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
  at
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
  at
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
 at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
  at
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
  at
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
  at
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
  at
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
  at
 org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
  at
 org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
  at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
 at
 org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843

Re: [android-developers] Development Tools Crashing

2011-02-07 Thread Evan Ruff
Thanks Xavier. I'll just deal with the open/close/open until then, it's no
too bad now that I've reduced the number of platforms.

E

On Mon, Feb 7, 2011 at 7:42 PM, Xavier Ducrohet x...@android.com wrote:

 I think the issue is when you open the editor while the SDK is still
 loading.
 We've done some work around this for 10.0 so it should be better.

 Xav

 On Mon, Feb 7, 2011 at 3:23 PM, Evan Ruff
 evan.r...@hendersonsawmill.com wrote:
  Also, not sure if I tried this previously, but it seems that now I can
 get
  the layout editor if I close the opened XML tab, wait a minute, then
 reopen.
  I still get the No theme selected message, but after selecting one it
 does
  render properly!
  E
 
  On Mon, Feb 7, 2011 at 6:22 PM, Evan Ruff 
 evan.r...@hendersonsawmill.com
  wrote:
 
  Xavier,
  Here's the output from NPE issue in the Layout Editor with the ADT Plug
  w/Debug:
  java.lang.NullPointerException
  at
 
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1484)
  at
 
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1211)
  at
 
 com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:1039)
  at
 
 com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange(LayoutEditor.java:365)
  at
 
 org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
  at
 
 org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
  at
 
 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)
  at
 
 org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
  at
 
 org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
  at
 
 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
  at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
  at
 
 org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
  at
 
 org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
  at
 
 org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
  at
 
 org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
  at
 
 org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
  at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
  at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
  at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
  at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
  at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
  at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
  at
 
 org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
  at
 
 org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
  at
 
 org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
  at
 
 org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
  at
 
 org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
  at
  org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
  at
 
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
  at
 
 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
  at
  org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
  at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
  at
 
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
  at
 
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
  at
 
 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
  at
 
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
  at
 
 org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
  at
 
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
  at
 
 org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
  at
 
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
  at
 
 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open

[android-developers] Development Tools Crashing

2011-02-06 Thread Evan Ruff
Hey Guys,

I'm having a NPE thrown when I try to edit a layout. I generally happens 
about 85% of the time. If it does not throw the NPE, it says Missing Theme 
with no assist or layout. The XML editor does still provide assistance if 
the NPE is not thrown. Additionally, my auto-complete is taking FOREVER 
inside Android classes. Is anyone else experiencing something like this? Any 
ideas how to rectify the situation?

Thank you for any help!

Evan

Here's the details:
Eclipse Helios R1, 32-bit Windows installed on Drive E. Projects/Workspace 
installed on E. 
Android Development Tools 9.0.0.v201101191456-93220
Google Plugin for Eclipse 1.4.2.v201012111742
Subversion, etc... everything else is pretty stock.

In my Content Assist preferences, I only have Basic Proposals and Java 
Proposals checked in both dialog.

Here's the NPE from the trying to edit the layout:
java.lang.NullPointerException
at 
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
 
Source)
at 
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(Unknown
 
Source)
at 
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(Unknown
 
Source)
at 
com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange(Unknown
 
Source)
at 
org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
at 
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)
at 
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at 
org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at 
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at 
org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at 
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
at 
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at 
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
at 
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
at 
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
at 
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
at 
org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
at 
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
at 
org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at 
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at 
org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
at 
org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
at 
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at 
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at 

[android-developers] Help with GridView, ImageAdapter and Custom Drawable

2010-09-09 Thread Evan Ruff
Hey guys,

This is my first stab at programmable graphics on Android and I'm
running into some LifeCycle issues (I think). If any of the gurus on
the board could point me in the right direction, I'd appreciate it.
Here's the scenario:

1. Dialog box that contains a GridView.
2. GridView contains an ImageAdapter (extends BaseAdapter)
3. ImageAdapter contains an ImageView, which is returned on getView,
handing the recycling based on the convertView parameter. It's about
95% of the 
http://developer.android.com/resources/tutorials/views/hello-gallery.html
ImageAdapter.
4. The ImageView is either an ImageResource or an ImageDrawable. If
the ImageResource for the given element is available, it uses that. If
not, it constructs a custom Drawable that's a filled rectangle with
the name of the element in text.

I recently added the custom drawable portion, so I believe that's part
of my issue, as it was working previously.

The behavior I'm seeing is that when the Dialog is 1st displayed,
everyhting happens as expected; however, when I close the dialog and
open it back up, the application crashes with the following stack:

pre
java.lang.NullPointerException
at android.view.ViewConfiguration.get(ViewConfiguration.java:211)
at android.view.View.init(View.java:1814)
at android.widget.ImageView.init(ImageView.java:103)
at com.federated.droid.moose.input.BrandSelectionGrid
$ImageAdapter.getView(BrandSelectionGrid.java:154)
at android.widget.AbsListView.obtainView(AbsListView.java:1315)
at android.widget.GridView.onMeasure(GridView.java:932)
at android.view.View.measure(View.java:8173)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:
3132)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8173)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8173)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:
3132)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8173)
at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
/pre

The getView method looks like this:

pre
public View getView( int position, View convertView, ViewGroup
parent )
{
if (convertView == null)
{ // if it's not recycled, initialize some attributes
imageView = new ImageView( mContext );
imageView.setLayoutParams( new GridView.LayoutParams( 
thumbHeightPx,
thumbWidthPx ) );
imageView.setScaleType( ImageView.ScaleType.CENTER_CROP );

imageView.setBackgroundResource( R.drawable.acc_brand_select_background );
}
else
{
imageView = (ImageView) convertView;
}

Brand theBrand = Moose.getUser().getBrandList().get( position );
BrandType type =
BrandResourceDictionary.getBrandById( theBrand.getId() );

if( type == null )
{
BrandThumbnail brandThumb = new BrandThumbnail( theBrand );
imageView.setImageDrawable( brandThumb );
imageView.setOnClickListener( new
BrandImageClick( theBrand.getId() ) );
}
else
{
imageView.setImageResource( type.getThumbResource() );
imageView.setOnClickListener( new BrandImageClick( type.getId() 
) );
}

if (position  imageViewList.size())
{
imageViewList.set( position, this );
}
else
{
imageViewList.add( this );
}

return imageView;
}
/pre

With the error coming on line 154: imageView = new
ImageView( mContext ); (Line 5 in the pasted code above)

Why does it crash when displaying the second time? Am I fundamentally
missing a part of the lifecycle of this object? Any other advice you
can give me?

Thanks for reading throgh the post! I really appreciate any help I can
get!

Thanks,

Evan Ruff, Atlanta

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email

[android-developers] ADT Crashing Constantly - Background Image Related

2010-08-12 Thread Evan Ruff
Hey guys,

I don't know if this is the right group, but my ADT keeps crashing
while editing layout files. I'm not positive, but I think it might
have something to do with the background images that I'm attempting to
use, as they are not rendered in the preview at all. Is this the
appropriate group to discuss the ADT tools? If so, does anyone else
have problems getting background images to display?

Thanks!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADT Crashing Constantly - Background Image Related

2010-08-12 Thread Evan Ruff
I'm on ADT 0.9.7.v2010050711...

Eclipse 3.5 EE SR2, specifically build 20100218-1602.

If I have a tiled pattern, all I get is a black background. If doing a
gradient fill in the background, I also get a blank black background.

For instance, here is a text view with a @drawable background:
TextView xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/title android:gravity=center
android:layout_width=fill_parent android:layout_height=40dp
android:background=@drawable/app_header_background_gradient
android:text=QSA Checkout android:textStyle=bold
android:textSize=22dp android:textColor=#
android:shadowColor=#FF00
android:shadowDx=.5
android:shadowDy=.5
android:shadowRadius=2
android:typeface=serif
/

and the drawable:

shape xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle
gradient
android:startColor=#FF349359
android:endColor=#FF04753d
android:angle=90/
/shape

Which is not displayed at all in the layout view.

E


On Aug 12, 12:09 pm, { Devdroid } webnet.andr...@gmail.com wrote:
 On 12 August 2010 17:48, Evan Ruff evan.r...@gmail.com wrote:

  Hey guys,

  I don't know if this is the right group, but my ADT keeps crashing
  while editing layout files. I'm not positive, but I think it might
  have something to do with the background images that I'm attempting to
  use, as they are not rendered in the preview at all. Is this the
  appropriate group to discuss the ADT tools? If so, does anyone else
  have problems getting background images to display?

 Works here. What version of ADT? What version of Eclipse (note it's told 
 Helios
 shall not be used due to some known problems)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ADT Crashing Constantly - Background Image Related

2010-08-12 Thread Evan Ruff
Oh forgot to include, that it displays as intended in the emulator.

E

On Aug 12, 12:09 pm, { Devdroid } webnet.andr...@gmail.com wrote:
 On 12 August 2010 17:48, Evan Ruff evan.r...@gmail.com wrote:

  Hey guys,

  I don't know if this is the right group, but my ADT keeps crashing
  while editing layout files. I'm not positive, but I think it might
  have something to do with the background images that I'm attempting to
  use, as they are not rendered in the preview at all. Is this the
  appropriate group to discuss the ADT tools? If so, does anyone else
  have problems getting background images to display?

 Works here. What version of ADT? What version of Eclipse (note it's told 
 Helios
 shall not be used due to some known problems)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: eclipse HELIOS (3.6) Code Assist very slow

2010-08-06 Thread Evan Ruff
After upgrading to Helios, my code assist is dog slow as well.

I am currently experimenting with the location of Eclipse (was on D,
moving to C) as well as the memory args...

E

On Jul 8, 7:27 am, gDev sab...@gmail.com wrote:
 CodeAssistveryslow

 any soluation for that?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Eclipse Helios running SLOW

2010-08-06 Thread Evan Ruff
Hey guys,

Just upgraded to 3.6 after this whole Sun/Oracle JVM fix/debacle and I
notices that 3.6 EE runs super, duper slow. So slow to the point that
code assist is unusable. Here are some changes I made to the config to
make it operate a lot better:

eclipse.ini: replace the end with this:
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=512m
-Xms128m
-Xmx1024m

And turn off JAX-WS Proposals in Content Assist
Window  Preferences  Java  Editor  Content Assist  Advanced

I also disabled JPA and PDE, but you might need them depending on what
you're doing.

Hope this helps,

Evan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] More about WakeLocks and Services

2010-05-25 Thread Evan Ruff
Hey all,

I was wondering if someone could help me clarify how I can created the
following:

1. My application uses AlarmManager to trigger an IntentService
2. IntentService gets a WakeLock
3. IntentService runs all the necessary code
4. IntentService releases WakeLock

For an IntentService, Is there a way to accomplish this without using
the BroadcastReciever Pattern, as created by Mark Murphy? It's my
understanding that the AlarmManager will invoke the Service directly,
so can I get a valid wake lock inside of the onHandleIntent method?

Thanks!

Evan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Extended Resources Strategy

2010-02-13 Thread Evan Ruff
Hey guy,

I was wondering if some of the experts out there could help me with an
extended resource strategy? I'm interested to hear about some of the
accepted best practices that everyone is using to tackle some of the
issues that arise when you've got a ton of graphics/resources.

I just recently upgraded all the resources in my application to have
separate hdpi and mdpi graphics. After struggling with and figuring
out the dpi-based methodology that android employs I have to say that
I'm very impressed with the design. The application looks absolutely
fantastic and renders great on a number of devices. Really not that
much additional coding once you get it all figured out. The problem I
have now is that my application is over 4mb.

The application is heavily PNG driven and, even after punypng*
optimizing everything, it is still a huge amount of graphics. There
are over 150 different icons and headers used in the application. When
you add another set for high resolution, you're looking at over 300
images that drive the user experience. Currently, everything is thrown
in the /res folder and managed from there through a lookup dictionary.
Functionally it works 100%, but I'm worried about the massive amount
of transfer time when people upgrade.

Has anyone tried breaking out the images and then downloading those
separately from the main application? What I'd like to do is publish
the APK to the market and have it managed as usual. Then, depending on
the device, I'd like to go to an S3 store and download a ZIP of the
graphics. Once the download was complete (1.3mb for hdpi, 500k for
mdpi) I would like to move the graphics to the storage card and unzip
them there, referencing them from the main application on the card.

Is this a good strategy? Am I missing anything regarding the auto-
scaling and such? Other than the various synchronization issues does
anyone see any problems with this approach? Would there be a
noticeable performance hit loading the graphics from the SD Card as
opposed to memory? Does Android include native zip/unzip libraries?

Thanks for all your help and input!

Evan Ruff

*best optimization tool on the web: http://www.gracepointafterfive.com/punypng/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Prevent view from scaling background

2010-02-01 Thread Evan Ruff
Hey guys,

I've got a quick question that I can't seem to find the answer too. I
have a LinearLayout with fill_parent for both height and width. I set
the background to a hires image that is 480x855 in case I encounter a
long device. When it goes to put the imagine in the background for
both the ADP1 and the Droid devices, it ends up squishing the imagine
down when I'd prefer to just maintain the aspect ratio and crop.

Is there a way I can accomplish that? I've tried adding
scaleType=center and fitStart but it seems to want to squish it
every time. Is there a way I can just line it up at the top?

Thanks!

Evan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Screen Sizes with 1.5, 1.6 and 2.0

2009-11-17 Thread Evan Ruff
Good to know.

Thanks!

Evan

On Fri, Nov 13, 2009 at 2:15 PM, MrChaz mrchazmob...@googlemail.com wrote:

 It seems like the links in the reference are broken

 1.6 lets you specify which screen sizes you support and what to do in
 each case, so you'll be ok compiling against that.  I'd still download
 the 2.0 and create an emulator image running that at the droid screen-
 resolution.  By default android will just upscale your application, I
 think.

 The manifest attributes are here:

 http://developer.android.com/guide/topics/manifest/supports-screens-element.html

 On Nov 13, 2:49 pm, Evan Ruff evan.r...@gmail.com wrote:
  Hey guys,
 
  I've got a quick question about screen size support. Currently, I've
  got an application that is rockin' along just fine on 1.5 and 1.6.
  Today the client called and says they want to run on Droid. While I've
  downloaded the 2.0 SDK, I'm a little wary of compiling against it.
  Will it break 1.5 and 1.6 compatilbility? How will the medium phones
  (G1, MyTouch) know to use those layouts?
 
  I imagine this is a pretty rudimentary question so if it's in a doc
  somewhere, can someone point me in the right direction?
 
  Thanks!
 
  E

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Screen Sizes with 1.5, 1.6 and 2.0

2009-11-13 Thread Evan Ruff
Hey guys,

I've got a quick question about screen size support. Currently, I've
got an application that is rockin' along just fine on 1.5 and 1.6.
Today the client called and says they want to run on Droid. While I've
downloaded the 2.0 SDK, I'm a little wary of compiling against it.
Will it break 1.5 and 1.6 compatilbility? How will the medium phones
(G1, MyTouch) know to use those layouts?

I imagine this is a pretty rudimentary question so if it's in a doc
somewhere, can someone point me in the right direction?

Thanks!

E

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Widget Layout Frustration

2009-11-11 Thread Evan Ruff
Great tip Matt! Thanks for sharing!

E

On Wed, Nov 11, 2009 at 9:34 AM, Matt Kanninen mathias...@gmail.com wrote:

 When I'm 2px off I find negative layout margins help immensely.


 http://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html

 On Oct 29, 8:40 pm, Evan Ruff evan.r...@gmail.com wrote:
  Hey Guys,
 
  I was hoping someone could help me with a home screen widget I'm
  trying to layout. Basically, I'm trying to layout my widget so it
  matched a standard home screen application shortcut perfectly.
  Basically, at this point, I'm about ~2px off and it's driving me
  crazy! Has anyone gotten this to match up just right? Should I be
  able to find this layout in the source somewhere? Any clues would be
  much appreciated. Here's my layout thus far:
 
  drawable/text_border.xml - For the black background around the text:
  shape xmlns:android=http://schemas.android.com/apk/res/android;
  solid android:color=#9900/
  padding android:left=5dp android:right=5dp
  android:bottom=1dp android:top=1dp /
  corners android:radius=7dp /
  /shape
 
  layout/widget.xml - The widget itself:
  ?xml version=1.0 encoding=utf-8?
  FrameLayout xmlns:android=http://schemas.android.com/apk/res/
  android
  android:layout_width=fill_parent
  android:layout_height=fill_parent
  android:layout_gravity=center
  
  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
  android:orientation=vertical
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:layout_gravity=center
  
ImageView android:id=@+id/icon
  android:layout_gravity=center
  android:src=@drawable/icon_gray
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:paddingBottom=5px
  android:paddingTop=5px
/
TextView android:id=@+id/message
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  android:background=@drawable/text_border
  android:textColor=#
  android:layout_gravity=center
  android:text=Assistant
  android:textSize=12px
  /
  /LinearLayout
  /FrameLayout
 
  Thanks for any help tuning this badboy.
 
  Thanks!
 
  Evan

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Widget Layout Frustration

2009-11-04 Thread Evan Ruff
Susan,

I've tweaked it a little bit more and here is where I'm at:

http://i243.photobucket.com/albums/ff2/gte619n/widgetLayout.png

Pixel for Pixel, the text is exactly the same. The location within the
bounding box is the same, as is the distance between the text and the
graphic. In order to do this, I used the XML Layout and an XML
drawable, no 9-patch was necessary.

Here's the code:
res/drawable/text_border.xml
shape xmlns:android=http://schemas.android.com/apk/res/android;
solid android:color=#AA11/
padding android:left=5dp android:right=5dp
android:bottom=1dp android:top=1dp /
corners android:radius=8dp /
/shape

res/layout/widget.xml
?xml version=1.0 encoding=utf-8?
FrameLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent
android:layout_gravity=center

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=center

  ImageView android:id=@+id/icon
android:layout_gravity=center
android:src=@drawable/icon_gray
android:layout_width=wrap_content
android:layout_height=wrap_content
android:paddingBottom=5px
android:paddingTop=5px
  /
  TextView android:id=@+id/message
android:layout_width=wrap_content
android:layout_height=wrap_content
android:background=@drawable/text_border
android:textColor=#
android:layout_gravity=center
android:text=Assistant
android:textSize=13px
/
/LinearLayout
/FrameLayout

Hope this helps!

E



On Nov 4, 4:28 pm, Susan ska...@gmail.com wrote:
 Evan,

 You may find this post helpful as well. Not exactly right, but closer
 than what I have...

 http://www.anddev.org/viewtopic.php?p=28996#28996

 On Nov 3, 11:39 pm, Susan ska...@gmail.com wrote:



  Evan,

  I am also struggling with this same problem. It's mystifying because
  so many widgets seem to have this look and yet I find it hard to
  believe that all the developers painstakingly did it by hand.

  Can you post a screenshot of what you have? In what way is yours just
  a couple of pixels off?

  Also, did you make that text_border file yourself? (I assume it is a
  ninepatch...?) I scanned the SDK for *.9.png and found several
  ninepatches that were similar but none that looked exactly right.
  (Here's an example of how mine looks with the Toast 
  ninepatch:http://screencast.com/t/zEyDZr8fnI) It sure seems like if we 
  found the
  right ninepatch image we'd just have to add the faint shadow to thetextand 
  then we'd be home free.

  On Oct 29, 10:40 pm, Evan Ruff evan.r...@gmail.com wrote:

   Hey Guys,

   I was hoping someone could help me with a home screenwidgetI'm
   trying tolayout. Basically, I'm trying tolayoutmywidgetso it
   matched a standard home screen application shortcut perfectly.
   Basically, at this point, I'm about ~2px off and it's driving me
   crazy! Has anyone gotten this to match up just right? Should I be
   able to find thislayoutin the source somewhere? Any clues would be
   much appreciated. Here's mylayoutthus far:

   drawable/text_border.xml - For the black background around thetext:
   shape xmlns:android=http://schemas.android.com/apk/res/android;
       solid android:color=#9900/
       padding android:left=5dp android:right=5dp
   android:bottom=1dp android:top=1dp /
       corners android:radius=7dp /
   /shape

  layout/widget.xml - Thewidgetitself:
   ?xml version=1.0 encoding=utf-8?
   FrameLayout xmlns:android=http://schemas.android.com/apk/res/
   android
               android:layout_width=fill_parent
               android:layout_height=fill_parent
               android:layout_gravity=center
           
           LinearLayout xmlns:android=http://schemas.android.com/apk/res/
   android
               android:orientation=vertical
               android:layout_width=wrap_content
               android:layout_height=wrap_content
               android:layout_gravity=center
               
             ImageView android:id=@+id/icon
               android:layout_gravity=center
               android:src=@drawable/icon_gray
               android:layout_width=wrap_content
               android:layout_height=wrap_content
               android:paddingBottom=5px
               android:paddingTop=5px
             /
             TextView android:id=@+id/message
               android:layout_width=wrap_content
               android:layout_height=wrap_content
               android:background=@drawable/text_border
               android:textColor=#
               android:layout_gravity=center
               android:text

[android-developers] Re: manually update AppWidgetProvider's onUpdate

2009-11-04 Thread Evan Ruff
I don't know if this is EXACTLY kosher, but I've overriden the
onRecieve method in my AppWidgetProvider to look like:

@Override
public void onReceive( Context context, Intent intent )
{
this.view = new RemoteViews( context.getPackageName(),
R.layout.widget );
if (intent.getAction().equals( MY_AWESOME_CUSTOM_INTENT ))
{
// DO AWESOME STUFF HERE
}
else
{
super.onReceive( context, intent );
}

ComponentName me = new ComponentName( context, VAWidget.class );
AppWidgetManager.getInstance( context ).updateAppWidget( me,
view );
}

Then I just add the custom intents to the widget's intent-filter in
the manifest as usual.

It has worked every time for me, but I'm wondering if there is a
scenario where it would not be preferable to do it this way?

E


On Nov 4, 1:11 pm, skink psk...@gmail.com wrote:
 Mark Murphy wrote:
  skink wrote:
   hi,

   my custom AppWidgetProvider has onUpdate method where i have logic to
   update RemoteViews

   it is not periodically updated by system, but rather, i'd like to
   trigger onUpdate if something happens (in one of my app Activities).
   both custom AppWidgetProvider and Activities i'd like to trigger
   update from run with the same UID

   i tried some AppWidgetManager's methods, but no luck, finally i ended
   with really weird solution: i'm sending broadcast with action
   ACTION_APPWIDGET_UPDATE and extras EXTRA_APPWIDGET_IDS which i got
   from AppWidgetManager

   is it a common way of updating AppWidgetProvider?

  You could also just send a broadcast to the provider directly, via the
  component-name version of the Intent constructor. Look for a null
  action, or some extra you package in, or something to tell it is your
  own custom Intent, then do the update work.

 thank you Mark,

 this is exactly what i'm doing now - sending broadcast directly to my
 AppWidgetProvider by manually creating proper Intent and adding some
 EXTRA_APPWIDGET_IDS extras

 yet my impression was that this is not the way one should do: i mean i
 thought there must be some higher level helper method to update
 AppWidgetProvider

 pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Widget Layout Frustration

2009-11-04 Thread Evan Ruff
RG,

My widget manages the state of a Service running in the background. As
you click the widget it starts/stops/pauses/etc the service. I want it
to look like a Shortcut so that it fits into the Home Screen
seamlessly. Additionally, the icon and text change depending on the
state of the service. Is there a way to do that using a shortcut
without going with a widget? Otherwise, can you think of another way
to use the OS-level resources to render the same sort of thing?

Thanks!

Evan



On Nov 4, 4:59 pm, Romain Guy romain...@google.com wrote:
 Note that Home uses a custom view derived from TextView to create this
 effect. Also, if you want your widget to look like a shortcut, why
 provide a widget in the first place? It's very easy for applications
 to offer shortcuts and let Home take care of how it looks (what will
 happen to your widget with other Home screens? What if we decide to
 change the radius of the background behind the text? etc.)





 On Wed, Nov 4, 2009 at 1:55 PM, Evan Ruff evan.r...@gmail.com wrote:
  Susan,

  I've tweaked it a little bit more and here is where I'm at:

 http://i243.photobucket.com/albums/ff2/gte619n/widgetLayout.png

  Pixel for Pixel, the text is exactly the same. The location within the
  bounding box is the same, as is the distance between the text and the
  graphic. In order to do this, I used the XML Layout and an XML
  drawable, no 9-patch was necessary.

  Here's the code:
  res/drawable/text_border.xml
  shape xmlns:android=http://schemas.android.com/apk/res/android;
     solid android:color=#AA11/
     padding android:left=5dp android:right=5dp
  android:bottom=1dp android:top=1dp /
     corners android:radius=8dp /
  /shape

  res/layout/widget.xml
  ?xml version=1.0 encoding=utf-8?
  FrameLayout xmlns:android=http://schemas.android.com/apk/res/
  android
             android:layout_width=fill_parent
             android:layout_height=fill_parent
             android:layout_gravity=center
         
         LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
             android:orientation=vertical
             android:layout_width=wrap_content
             android:layout_height=wrap_content
             android:layout_gravity=center
             
           ImageView android:id=@+id/icon
             android:layout_gravity=center
             android:src=@drawable/icon_gray
             android:layout_width=wrap_content
             android:layout_height=wrap_content
             android:paddingBottom=5px
             android:paddingTop=5px
           /
           TextView android:id=@+id/message
             android:layout_width=wrap_content
             android:layout_height=wrap_content
             android:background=@drawable/text_border
             android:textColor=#
             android:layout_gravity=center
             android:text=Assistant
             android:textSize=13px
         /
         /LinearLayout
  /FrameLayout

  Hope this helps!

  E

  On Nov 4, 4:28 pm, Susan ska...@gmail.com wrote:
  Evan,

  You may find this post helpful as well. Not exactly right, but closer
  than what I have...

 http://www.anddev.org/viewtopic.php?p=28996#28996

  On Nov 3, 11:39 pm, Susan ska...@gmail.com wrote:

   Evan,

   I am also struggling with this same problem. It's mystifying because
   so many widgets seem to have this look and yet I find it hard to
   believe that all the developers painstakingly did it by hand.

   Can you post a screenshot of what you have? In what way is yours just
   a couple of pixels off?

   Also, did you make that text_border file yourself? (I assume it is a
   ninepatch...?) I scanned the SDK for *.9.png and found several
   ninepatches that were similar but none that looked exactly right.
   (Here's an example of how mine looks with the Toast 
   ninepatch:http://screencast.com/t/zEyDZr8fnI) It sure seems like if we 
   found the
   right ninepatch image we'd just have to add the faint shadow to 
   thetextand then we'd be home free.

   On Oct 29, 10:40 pm, Evan Ruff evan.r...@gmail.com wrote:

Hey Guys,

I was hoping someone could help me with a home screenwidgetI'm
trying tolayout. Basically, I'm trying tolayoutmywidgetso it
matched a standard home screen application shortcut perfectly.
Basically, at this point, I'm about ~2px off and it's driving me
crazy! Has anyone gotten this to match up just right? Should I be
able to find thislayoutin the source somewhere? Any clues would be
much appreciated. Here's mylayoutthus far:

drawable/text_border.xml - For the black background around thetext:
shape xmlns:android=http://schemas.android.com/apk/res/android;
    solid android:color=#9900/
    padding android:left=5dp android:right=5dp
android:bottom=1dp android:top=1dp /
    corners android:radius=7dp /
/shape

   layout/widget.xml - Thewidgetitself:
?xml version=1.0 encoding=utf-8?
FrameLayout xmlns:android

[android-developers] Re: Widget Layout Frustration

2009-11-04 Thread Evan Ruff
I hope it doesn't sounds like I'm being argumentative, but, I mean,
REALLY? That's like saying We reserve the right to an Icon with Text
on the home screen.

FWIW, some of my favorite home screen widgets are the Bluetooth Toggle
guy and the Calendar tCalendar widget. They do EXACTLY what they say
and don't take up any more than the minimum space; additionally, they
maintain an heterogeneous look on my home screen, which really helps
with my OCD! :-)

E

On Nov 4, 5:07 pm, Romain Guy romain...@google.com wrote:
 You cannot change the text or icon of a shortcut. Just don't make your
 widget look like a shortcut. There's no reason to make it look like a
 shortcut if it's a widget. It's just misleading.





 On Wed, Nov 4, 2009 at 2:05 PM, Evan Ruff evan.r...@gmail.com wrote:
  RG,

  My widget manages the state of a Service running in the background. As
  you click the widget it starts/stops/pauses/etc the service. I want it
  to look like a Shortcut so that it fits into the Home Screen
  seamlessly. Additionally, the icon and text change depending on the
  state of the service. Is there a way to do that using a shortcut
  without going with a widget? Otherwise, can you think of another way
  to use the OS-level resources to render the same sort of thing?

  Thanks!

  Evan

  On Nov 4, 4:59 pm, Romain Guy romain...@google.com wrote:
  Note that Home uses a custom view derived from TextView to create this
  effect. Also, if you want your widget to look like a shortcut, why
  provide a widget in the first place? It's very easy for applications
  to offer shortcuts and let Home take care of how it looks (what will
  happen to your widget with other Home screens? What if we decide to
  change the radius of the background behind the text? etc.)

  On Wed, Nov 4, 2009 at 1:55 PM, Evan Ruff evan.r...@gmail.com wrote:
   Susan,

   I've tweaked it a little bit more and here is where I'm at:

  http://i243.photobucket.com/albums/ff2/gte619n/widgetLayout.png

   Pixel for Pixel, the text is exactly the same. The location within the
   bounding box is the same, as is the distance between the text and the
   graphic. In order to do this, I used the XML Layout and an XML
   drawable, no 9-patch was necessary.

   Here's the code:
   res/drawable/text_border.xml
   shape xmlns:android=http://schemas.android.com/apk/res/android;
      solid android:color=#AA11/
      padding android:left=5dp android:right=5dp
   android:bottom=1dp android:top=1dp /
      corners android:radius=8dp /
   /shape

   res/layout/widget.xml
   ?xml version=1.0 encoding=utf-8?
   FrameLayout xmlns:android=http://schemas.android.com/apk/res/
   android
              android:layout_width=fill_parent
              android:layout_height=fill_parent
              android:layout_gravity=center
          
          LinearLayout xmlns:android=http://schemas.android.com/apk/res/
   android
              android:orientation=vertical
              android:layout_width=wrap_content
              android:layout_height=wrap_content
              android:layout_gravity=center
              
            ImageView android:id=@+id/icon
              android:layout_gravity=center
              android:src=@drawable/icon_gray
              android:layout_width=wrap_content
              android:layout_height=wrap_content
              android:paddingBottom=5px
              android:paddingTop=5px
            /
            TextView android:id=@+id/message
              android:layout_width=wrap_content
              android:layout_height=wrap_content
              android:background=@drawable/text_border
              android:textColor=#
              android:layout_gravity=center
              android:text=Assistant
              android:textSize=13px
          /
          /LinearLayout
   /FrameLayout

   Hope this helps!

   E

   On Nov 4, 4:28 pm, Susan ska...@gmail.com wrote:
   Evan,

   You may find this post helpful as well. Not exactly right, but closer
   than what I have...

  http://www.anddev.org/viewtopic.php?p=28996#28996

   On Nov 3, 11:39 pm, Susan ska...@gmail.com wrote:

Evan,

I am also struggling with this same problem. It's mystifying because
so many widgets seem to have this look and yet I find it hard to
believe that all the developers painstakingly did it by hand.

Can you post a screenshot of what you have? In what way is yours just
a couple of pixels off?

Also, did you make that text_border file yourself? (I assume it is a
ninepatch...?) I scanned the SDK for *.9.png and found several
ninepatches that were similar but none that looked exactly right.
(Here's an example of how mine looks with the Toast 
ninepatch:http://screencast.com/t/zEyDZr8fnI) It sure seems like if 
we found the
right ninepatch image we'd just have to add the faint shadow to 
thetextand then we'd be home free.

On Oct 29, 10:40 pm, Evan Ruff evan.r...@gmail.com wrote:

 Hey Guys,

 I

[android-developers] Widget Layout Frustration

2009-10-29 Thread Evan Ruff

Hey Guys,

I was hoping someone could help me with a home screen widget I'm
trying to layout. Basically, I'm trying to layout my widget so it
matched a standard home screen application shortcut perfectly.
Basically, at this point, I'm about ~2px off and it's driving me
crazy! Has anyone gotten this to match up just right? Should I be
able to find this layout in the source somewhere? Any clues would be
much appreciated. Here's my layout thus far:

drawable/text_border.xml - For the black background around the text:
shape xmlns:android=http://schemas.android.com/apk/res/android;
solid android:color=#9900/
padding android:left=5dp android:right=5dp
android:bottom=1dp android:top=1dp /
corners android:radius=7dp /
/shape

layout/widget.xml - The widget itself:
?xml version=1.0 encoding=utf-8?
FrameLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent
android:layout_gravity=center

LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_gravity=center

  ImageView android:id=@+id/icon
android:layout_gravity=center
android:src=@drawable/icon_gray
android:layout_width=wrap_content
android:layout_height=wrap_content
android:paddingBottom=5px
android:paddingTop=5px
  /
  TextView android:id=@+id/message
android:layout_width=wrap_content
android:layout_height=wrap_content
android:background=@drawable/text_border
android:textColor=#
android:layout_gravity=center
android:text=Assistant
android:textSize=12px
/
/LinearLayout
/FrameLayout

Thanks for any help tuning this badboy.

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sending/Receiving Java Objects to Server

2009-09-30 Thread Evan Ruff

That's a great question and something that I'm wondering too. Perhaps
there is an optimized version available that only does the simple
encode/decode?

FWIW, the Jackson JSON mapper that I'm using currently weighs in at
397kb.

E


On Sep 23, 11:44 pm, bseib broc.s...@gmail.com wrote:
 BTW, I just built theprotobuf-java-2.2.0.jar file and noticed it is
 just over 300K in size. Anyone else using protocol buffers from an
 android device? Does it necessarily need to be so big, or am I missing
 some build param? It just doubled my application size.

 -broc

 On Sep 24, 7:09 am, nEx.Software email.nex.softw...@gmail.com
 wrote:



  You could tryprotocolbuffers...http://code.google.com/apis/protocolbuffers/

  On Sep 23, 1:11 pm, Evan Ruff evan.r...@gmail.com wrote:

   You know,

   I would be awesome if we could get some sort of native C++ system
   service to solve this issue. I don't really care WHAT the
   implementation is, so long as it's blazing fast.

   Is that even part of the Android thing?

   E

   On Sep 23, 4:07 pm, WoodManEXP woodman...@gmail.com wrote:

Evan, As far as I can tell there is little support native to Android
for what you are lookng for. It has good basic http communication
support but not much higher level abstractions. That being said you
could write a layer to do the serialization into a stream and then
HTTP it to the server to be deserialized. On the server it would
reconstruct from a stream you get out of an HTTP POST payload. Its not
fancy but it would definitly work. I simply POST simple XML to the
server and DOM parse it out rather then trying to send objects.

I imagine Google's concern is two-fold a) resource constraints for the
development team to add such support and b) Its alot of s'ware to add
to the system at this time.

Sorry to not be of more help.

On Sep 23, 3:40 pm, Evan Ruff evan.r...@gmail.com wrote:

 I have a Tomcat Server in front of a Servlet that gets/stores
 information in a MySQL Database. My Android application needs to get/
 put information on to this server. I control both ends of the
 communication, so I've basically been exploring the best way to send
 information back and forth. So far, I've tried Jackson for JSON and
 the native Java Serialization packages. My object is relatively
 complex and completely serializable. I have no desire to write a
 custom guy at all, as I doubt I'd actually be able to improve on
 most of the packages.

 Times are from when the response lands on the Android device until the
 Object is fully cast:

 Jackson for JSON 1.0: 17.176 seconds.
 Native Java Serialization: 36.132 seconds.

 WOW. Java Serialization is a D-O-G.

 So with that being said, are there any other strategies/packages I
 should try to get information to/from my server?

 Thanks!

 Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Weird height of ScrollView

2009-08-10 Thread Evan Ruff

Hey guys,

I'm trying to build an interface and I'm having some trouble with the
ScrollView component. Basically, no matter what height I set the
ScrollView, it only renders 45px high. Even if I set the height to a
fixed pixel number (like, 200px) it still only renders into a tiny
area of the screen.

Generally, I've got a pair of tabs at the top, then the FrameLayout.
Inside of that, my first tab is a vertical LinearLayout, with a
horizontal LinearLayout holding small labels, then a ScrollView with a
ListView inside of that. The FrameLayout appears to be rendering the
full height, as my second tab fills the space as you would expect.

Here is the XML:

LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
TabHost
android:id=@+id/tabhost
android:layout_width=fill_parent
android:layout_height=fill_parent
TabWidget
android:id=@android:id/tabs
android:layout_width=fill_parent
android:layout_height=wrap_content
/

FrameLayout
android:id=@android:id/tabcontent
android:layout_width=fill_parent
android:layout_height=fill_parent
android:paddingTop=35px

LinearLayout
android:id=@+id/packageTab

xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
include 
layout=@layout/review_collection_header /
ScrollView
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=200px
ListView

xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/listByPackage

android:layout_width=fill_parent

android:layout_height=wrap_content

android:drawSelectorOnTop=false
/

/ScrollView
/LinearLayout

Button
android:id=@+id/brandTab
android:layout_width=fill_parent
android:layout_height=fill_parent
android:text=A semi-random button
/
/FrameLayout
/TabHost
/LinearLayout

also, here is the included review_collection_header layout:

LinearLayout
android:layout_width=fill_parent
android:layout_height=wrap_content
android:background=#FF00
xmlns:android=http://schemas.android.com/apk/res/android;
TextView
android:text=Name
android:gravity=left
android:layout_width=152px
android:layout_height=wrap_content
android:textColor=#
android:textSize=10px
android:textStyle=bold
/
TextView
android:text=Max
android:gravity=left
android:layout_width=50px
android:layout_height=wrap_content
android:textColor=#
android:textSize=10px
android:textStyle=bold
/
TextView
android:text=Qty
android:gravity=left
android:layout_width=50px
android:layout_height=wrap_content
android:textColor=#
android:textSize=10px
android:textStyle=bold
/
TextView
android:text=Price
android:gravity=left
android:layout_width=78px
android:layout_height=wrap_content
android:textColor=#
android:textSize=10px
android:textStyle=bold
/
/LinearLayout


Can anyone shed some light on what could be happening here?

Thanks a lot!

E
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Weird height of ScrollView

2009-08-10 Thread Evan Ruff

Doh! That was it! I knew it had to be something simple!

Thanks Mark!

E

On Aug 10, 9:42 am, Mark Murphy mmur...@commonsware.com wrote:
 Evan Ruff wrote:
  then a ScrollView with a
  ListView inside of that

 You should not put a ListView, or any widget that does its own
 scrolling, in a ScrollView. Just drop the ScrollView and use the ListView.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Android 1.5 Programming Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MyLocationOverlay and enableMyLocation()

2009-08-01 Thread Evan Ruff

Hey Guys,

I've got a bit of a weird issue here.

In my activity, I've got MyLocationOverlay on top of my map and
enableMyLocation() in my onResume function. Funny thing is that when I
go to run the app in debug, enableMyLocation() returns false. I'm
targeting the Google Platform, and my Google Maps application
successfully takes location data from DDMS.

Can anybody think of a reason why enableMyLocation() would always
return false?

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ListView and Selectors

2009-07-28 Thread Evan Ruff

Hey Guys,

After going through a bunch of posts here I've got a List Activity
with a pair of custom selectors that do the alternating row background
thing while maintaining the default selector behavior! The trick was
figuring out that in the selector, you had to fire a shape in there
instead of a plain android:background tag!

Looking to further extend the function, I was wondering if there is a
way to get the same sort of long-press/fading effect that the default
Google Applications have. For instance, when you long press an SMS in
the Messaging application, it kinda fades from the orange to white. Is
that possible to implement in a standardized fashion?

Thanks for any tips!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Some Basic Questions

2009-07-21 Thread Evan Ruff

Hey guys,

I'm just starting to refine my first Android application and I was
wondering if you could help me with a couple of general issues I'm
having.

1. State

Honestly, I haven't really done too much research here except for
looking at the Activity/SubActivity stuff (that's how most of my
interaction is driven) within the google dev sight. Basically, I was
wondering if anyone had a reference to a good article/tutorial about
how to manage the state of the application when I user exits, hits
'home', answers a call, etc. Currently, my app pops all the way out to
my main activity whenever the user moves from the app.

2. Activity Lifecycle

I'm also a little confused with how the Activities get used/recycled.
It seems like every time I call an activity it calls onCreate, no
matter what, even if the activity has already been created or is
static. Is there a way to hide activities instead of reinflating
layouts every time something is called?

Thanks for all your help!

Evan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView + Gears

2009-06-29 Thread Evan Ruff

Huh, that seems kind of like a curious decision.

So, in order to use WebView and have persistent storage, I have to use
the Javascript - Android Interface specifically, then either expose
standard getDB, executeStatement, getResultSet in
WebView#addJavascriptInterface() ?

Also Mark, thanks for all your help. I really appreciate you answering
my questions so quickly! I have to say that without your help the
learning curve for Android Development would be insurmountable.

E

On Jun 29, 7:03 am, Mark Murphy mmur...@commonsware.com wrote:
 Evan Ruff wrote:
  I was wondering if I can use the Gears Toolkit within WebView? I heard
  a nasty rumor that it was not available in WebView.

 At least as of Android 1.1, it was not available in WebView, and I am
 not aware that situation has changed.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView + Gears

2009-06-29 Thread Evan Ruff

Well, the whole point was kind of to be able to take my exisiting GWT/
Gears Application and fire it down into a WebView Component to gain
more control over the chrome, resource loading, etc.

It doesn't look like that's really going to work with this
implementation!

E

On Jun 29, 8:36 am, Mark Murphy mmur...@commonsware.com wrote:
 Evan Ruff wrote:
  Huh, that seems kind of like a curious decision.

  So, in order to use WebView and have persistent storage, I have to use
  the Javascript - Android Interface specifically, then either expose
  standard getDB, executeStatement, getResultSet in
  WebView#addJavascriptInterface() ?

 Well, I'd wrap the APIs in my own business rules, for input validation
 and such, rather than expose the raw Android APIs.

 And once the Android edition of WebKit is up on HTML5, I imagine you'll
 get much of Gearsy goodness without the need for the plugin.

 As to why the plugin is not available for WebView, I have no idea.

  Also Mark, thanks for all your help. I really appreciate you answering
  my questions so quickly! I have to say that without your help the
  learning curve for Android Development would be insurmountable.

 You're very welcome!

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView + Gears

2009-06-28 Thread Evan Ruff

Hey guys,

I was wondering if I can use the Gears Toolkit within WebView? I heard
a nasty rumor that it was not available in WebView.

If Gears is not available, what other storage mechanisms/paradigms are
recommended?

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Events in Browser

2009-06-24 Thread Evan Ruff

Nothing on this? Is it really not possible?

E

On Jun 17, 6:49 pm, Evan Ruff evan.r...@gmail.com wrote:
 Hey guys,

 I was wondering if there was a way to use the mouse events in the
 Android Browser or in the Webview? I'd like to have mousedown/mouseup
 but if I could get drag events that would be great!

 Anyway to do this?

 Thanks!

 Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Events in Browser

2009-06-24 Thread Evan Ruff

LOL! Touche Mr. Murphy.

I was referring to the OnMouseDown, OnMouseUp, OnMouseMove family of
events in the browser. Are there Android Browser Equivalents that I'm
just missing?

Thanks!

Evan

On Jun 24, 1:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 Evan Ruff wrote:
  Nothing on this? Is it really not possible?

 Few mobile phones have mice. You are probably looking for touch events
 or gestures:

 http://developer.android.com/reference/android/view/GestureDetector.html

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Mouse Events in Browser

2009-06-17 Thread Evan Ruff

Hey guys,

I was wondering if there was a way to use the mouse events in the
Android Browser or in the Webview? I'd like to have mousedown/mouseup
but if I could get drag events that would be great!

Anyway to do this?

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Webview: CSS Gradients vs Background Images

2009-05-28 Thread Evan Ruff

Hey guys,

I've got a general performance question. In my Webview app, I'm trying
to display a div (statically-sized) that is 100px x 200px. The div has
a linear gradient that goes the whole 200px. From a performance
standpoint, do you believe that it would be fastest to use an
optimized 1px image and tile the background, or to use the -webkit-
gradient function?

I'm really only asking because the webkit-gradient implementation
looks a little crappy to me. The gradient isn't smooth like it is in
Chrome,/Safari; it's extremely striated, like you'd get with a poorly
optimized .GIF, circa 1998. Would a tiled image degrade performance?

I like the idea of the CSS as I can change the size of the elements
easily for future phones, but I'm not sure if the visual hit is worth
it.

Thanks for any help!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] RPC Best Practices

2009-05-25 Thread Evan Ruff

Hey guys,

I'm starting my first Android Application and I'm trying to figure out
the best way to implement an RPC layer to communicate with my Tomcat
server. Basically, I've got POJOs on the Android Client and on the
Server. I simply would like to serialize the POJOs on Android, send up
an HTTP Post, deserialize on the server, do some work, then serialize
a POJO response back down to the client.

I've seen a number of posts referencing JSON and XML but nothing
really definitive. Further clouding the matter is the different
Android SDKs out there that seem to have different levels of support
for each. Obviously, if Android has a native library that works well,
I'd like to use that. Additionally, I'd like something that could work
with my existing POJOs without a great deal of trouble.

What are the best practices for this sort of thing? Can anyone send me
to any tutorials that have some solid examples on how to get this
implemented and going?

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: RPC Best Practices

2009-05-25 Thread Evan Ruff

Alright, I'm going to give it a shot. I will report back.

Thanks!

Evan

On May 25, 1:21 pm, Mark Murphy mmur...@commonsware.com wrote:
 Evan Ruff wrote:
  I've been living over in GWT land for the last year or so, so I guess
  I've gotten spoiled. GWT's whole object-internet-object magic
  has really taken me out of the transport game!

 Sorry, Android is much more normal than that... ;-)

  Do you have any experience/
  recommendation with any of the available libraries that do the mapping
  automatically? I'm wondering if XStream, Json-lib Jackson JSON would
  work in a compatible and performance-acceptable manner.

 I seem to recall hearing somewhere that Jackson worked on Android, but I
 have no direct experience with any of those. Usually, I am stuck writing
 clients to existing back-ends, and as such lack control over both ends
 of the communications.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Location of Gears Local DB

2009-05-05 Thread Evan Ruff

hey guys,

I was wondering if anyone could direct me to where Gears is putting
the local SQL Lite DBs.

I can't seem to find it mentioned in the documentation anywhere!

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Location of Gears Local DB

2009-05-05 Thread Evan Ruff

I was afraid of that :-)!

In case anyone else is wondering, I was able to troubleshoot my issue
using the tools included in the standard gears SDK distro. There's a
database.html file in there that will let you run SQL against any
target. I used it to double check my DB.

E

On May 5, 10:59 am, Mark Murphy mmur...@commonsware.com wrote:
  I was wondering if anyone could direct me to where Gears is putting
  the local SQL Lite DBs.

 Probably some place that cannot be accessed on production hardware. My
 guess is that it is in the Browser application's private file store.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Nightly Build for Emulator

2009-04-09 Thread Evan Ruff

Hey guys,

I'm a lame-o Windows developer trying to do some Browser specific
development targeting Android. I'm having some funny issues with my G1
and my older emulator (WebKit CSS/Layout, etc). I was wondering if any
of you Linux guys out there might be so kind as to give me a compiled
image of the latest nightly build? I believe I need three files out of
the tools directory:

/tools/lib/images/userdata.img
/tools/lib/images/system.img
/tools/lib/images/ramdisk.img

I'd build it myself, but my windows box can't do it!

Thanks!

Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: GWT and the Android Browser

2009-04-09 Thread Evan Ruff

JP,

Thanks for your response! I've downloaded 1.1_r1 and done a little bit
more testing and:

#5, #6. This is something that seems to ONLY happen on the Android
system. In Chrome it screams along like a scalded dog. Stuff pops up,
hides, fades etc like it was a native application.

#2. There's some work going on over in the GWT stack to have Gears/AIR/
HTML5 native storage/workers/caches abstracted in GWT. This is a
pretty exciting project and will hopefully lead to some truely awesome
android ports.

#4. Farts. Still there. Maybe a TICK faster, but not really.

#1. Still weird.

#3. ditto.

iPhone has implemented a mouse drag event framework that looks pretty
cool. No love for Android yet though. I'd love to try a nightly build,
but as I'm on Windows I can't do a image compilation from source.

E



On Apr 8, 9:10 pm, JP joachim.pfeif...@gmail.com wrote:
 I've done someGWTwork in 2007 so I've fired up the site and checked
 it withAndroid'sbrowser(for the first time, it never occurred to me
 to try this out. I also tried Opera Mini but it wouldn't even start
 loading).
 1. I cannot confirm your layout issues. I need to add however that the
 web developer who provided the HTML framework used HTML tables for
 layout purposes (his task, not mine).
 2. Gears wasn't around back then (;-)
 3. I can confirm this, and it renders some of my web site's
 functionality mostly useless (table-based slider). I think some fine
 work inGWTwould be in order here (Note: I am onGWT1.5.3 as no
 maintenance is performed). Or, as you hope, the newer Webkit may help
 you out.
 4. I can confirm this also. In my book, this is cosmetic, in
 particular considering all the other issues.
 5. From your description - I've seen this effect with Firefox 2.x over
 an Internet connection. Never in a LAN environment and also not with
 IE 6 (both LAN/Internet). So this problem may not be specific 
 toAndroid'sbrowseronly.
 6. Likely connected to 5.

 I would cross check your web app against other WebKit-based browsers
 as well as older and newer and other browsers in various environments
 so you can find some patterns that you can research/report on theGWT
 side of things. To answer your question where these questions
 belong... over toGWTIMHO, because it is a declared goal ofGWTto
 handlebrowserquirks for you - the developer.
 I hope you're not in a time crunch here... Good luck.

 JP

 On Apr 8, 10:53 am, Evan Ruff evan.r...@gmail.com wrote:

  Hey guys,

  Little stream of conciseness here, sorry if this is a bit long/
  disjoined.

  I was wondering if anyone had done any work withGWTand theAndroid
 Browser. While I'm getting basic functionality to work, the general
  speed, responsiveness and user experience seem very sluggish and,
  well, sorta bad. Another issue I'm having is locating a group to go to
  for support, examples and help. While I'm interested inGWTwith
 Android, it seems thatAndroidDevelopers Group is really only
  interested in native apps. Where to go forBrowserspecific help?

  Anyways, some of the particulars I've run into:

  What group to go to?

  1. Issues Controlling the viewport: No matter what I do, I can't seem
  to get proper control of the viewport. Editing the meta data, overflow
  CSS properties, insuring that the window's objects are small, etc. I'm
  continually getting white space borders and stuff like that. This
  causes weird finger behavior, especially allowing the user to browse
  into the white space.

  2. HTML5/Gears Wrappers: I was wondering if the Gears API has an
  implementation to support HTML5 storage/cache issues in case of a non-
  gears enabled client. If not, is there a library anywhere that
  supports the encapsulation forGWT?

  3. MouseListeners: The OS seems to swallow up the MouseUp event in
  order to do detection of scroll/drag type stuff. I guess I understand
  why it does it for the drag type thing, but it never fires MouseUp
  even after the drag is done. Ehh... fair enough, I guess.

  4. Focus Panel ClickListeners: When I click a focus panel, a orange
  circle shows up in the upper/left corner with what seems like a cursor
  in it? (http://i243.photobucket.com/albums/ff2/gte619n/
  selectBubble.png) Also seems like a non-trivial delay between the
  press and then a following action. Makes the app seem especially
  sluggish.

  5. Image Loading/Display: Seems really slow. Even when doing
  background repositioning to flip sprites. Additionally, the images
  don't seem to load in any fixed order and method. Also seems to hang
  when loading images (http://i243.photobucket.com/albums/ff2/gte619n/
  selectBubble.png) I've attempted to get around this by doing Prefetch
  and such, but nothing seems to work. Seems like it needs to talk
  itself into refreshing the screen after loading finishes (even in
  localhost in the emulator)

  6. Visibility hide/show: Very sluggish in general.

  7. Scroll inside divs: Flat out doesn't support this. I guess the
  Cupcake release, bringing

[android-developers] Re: Nightly Build for Emulator

2009-04-09 Thread Evan Ruff

That's just want I was looking for.

Thanks Al!

E


On Apr 9, 10:50 am, Al Sutton a...@funkyandroid.com wrote:
 There have been no checkins I'm aware of since my builds at;

 http://andappstore.com/AndroidPhoneApplications/sdk/

 Regards,

 Al.

 ---

 * Written an Android App? - List it athttp://andappstore.com/*

 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.

 -Original Message-
 From: android-developers@googlegroups.com

 [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
 Sent: 09 April 2009 15:40
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Nightly Build for Emulator

  I'm a lame-o Windows developer trying to do some Browser specific
  development targeting Android. I'm having some funny issues with my G1
  and my older emulator (WebKit CSS/Layout, etc). I was wondering if any
  of you Linux guys out there might be so kind as to give me a compiled
  image of the latest nightly build?

 There are no nightly builds at present that I am aware of. It's something I
 and some others are working on. Watch this space for announcements.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Nightly Build for Emulator

2009-04-09 Thread Evan Ruff

Hey Al,

Sorry to bother you about this, but when I installed your package, I
can't seem to get any network access.

When I used the regular emulators, I get 3G without problem, but your
dist seems to say no connection. Any ideas?

Thanks!

E

On Apr 9, 10:50 am, Al Sutton a...@funkyandroid.com wrote:
 There have been no checkins I'm aware of since my builds at;

 http://andappstore.com/AndroidPhoneApplications/sdk/

 Regards,

 Al.

 ---

 * Written an Android App? - List it athttp://andappstore.com/*

 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.

 -Original Message-
 From: android-developers@googlegroups.com

 [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
 Sent: 09 April 2009 15:40
 To: android-developers@googlegroups.com
 Subject: [android-developers] Re: Nightly Build for Emulator

  I'm a lame-o Windows developer trying to do some Browser specific
  development targeting Android. I'm having some funny issues with my G1
  and my older emulator (WebKit CSS/Layout, etc). I was wondering if any
  of you Linux guys out there might be so kind as to give me a compiled
  image of the latest nightly build?

 There are no nightly builds at present that I am aware of. It's something I
 and some others are working on. Watch this space for announcements.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Web Browser stop Selection

2009-04-06 Thread Evan Ruff

Hello,

I am developing a GWT-based application to be used on the Android
Platform through the browser. The one big problem that I'm running
into is the hijacking of my press-and-hold methodology. Basically,
I've got an image that has a timer on it. When you press the button
the timer runs (onMouseDown), and then it cancels when you lift the
finger (onMouseUp).

The problem I am running into is that when you hold your finger down
on a button, the Android Browser pops the View Image/Save Image
dialog over everything, effectively killing my UI.

Is there a way to disable that functionality? I was thinking there was
a Webkit type css in there that would allow me to do it, but so far
I've been unsuccessful.

Thanks!

Evan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---