[android-developers] SQLite case insensitive matching

2015-04-18 Thread Doug Gordon
Similar questions have been asked, but many are old and it's not clear 
to me exactly what the resolution is. I have a list filter with a local 
db query that is matching columns against user input (uses MATCH, but 
that is probably not significant). Both the contents of the columns and 
the user input can be mixed case, but the match should be 
case-insensitive. This has been working (for years!) for most 
situations, but it was recently pointed out to me by a user (in France) 
that if he inputs a lowercase accented character, e.g. é, it will not 
match a database entry containing the uppercase equivalent, e.g. É.


My understanding is that Android SQLite does not support this 
automatically as it does for ASCII characters, but is there a solution 
within Android? I have no control over what is in the database (it comes 
from an outside source) or what the user inputs.


Doug Gordon
GHCS Software

--
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/d/optout.


[android-developers] Re: Image is being oriented differently once uploaded to server, why?

2015-04-12 Thread Doug Gordon
I've seen this happen in a number of places when uploading images. The 
basic issue is that there are two ways to save a "rotated" image: save the 
raster data in the correct orientation and without metadata, or save the 
raster data in its "native" orientation and set the metadata value to 
indicate the desired rotation. The problem is that some software 
implementations still do not look at the metadata field and just display 
the raw raster image. So the photo may appear rotated correctly in one 
place and not rotated in another!


On Sunday, April 12, 2015 at 1:00:41 AM UTC-4, Dan Cha wrote:
>
> So within my app, i have the ability to allow the user to take a pic, see 
> a thumbnail within the app and once the form is submitted, its uploaded to 
> the server.
>
> But something ive noticed lately is that (since im storing the image taken 
> in the users gallery within a folder specific to the app) if you view the 
> pic outside the app in the actually folder, it looks oriented correctly, if 
> i take it portrait its portrait, if i take the pic landscape, its stored in 
> landscape.
>
> Also when the user is presented the thumbnail, it also shows correct, but 
> for some reason when the image is uploaded to the server, it no longer has 
> the correct orientation.
>
> Im using ftp to upload the image with this code:
>
> try
> {
> int reply;
> String reply2;
> ftpClient.connect("ftp.site.com");
> ftpClient.login("site","pass");
> ftpClient.changeWorkingDirectory("/imgs/");
> ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
> BufferedInputStream buffIn = null;
> buffIn = new BufferedInputStream(new 
> FileInputStream(file));
> ftpClient.enterLocalPassiveMode();
> ftpClient.storeFile(destinFolder,buffIn);
> buffIn.close();
> reply = ftpClient.getReplyCode();
> if(!FTPReply.isPositiveCompletion(reply))
> {
> ftpClient.disconnect();
> }
> ftpClient.logout();
> }
>
> I even changed my logic to this and still nothing, the image is always 
> uploaded in landscape. Even though the thumbnail and stored image on the 
> phone is portrait.
> Found at this link: 
> http://stackoverflow.com/questions/24629584/image-orientation-changes-while-uploading-image-to-server
>
>
>   int rotate = 0;
> try {
> getContentResolver().notifyChange(imageUri, null);
> File imageFile = new File(al_image_paths.get(i)); 
> ExifInterface exif = new ExifInterface(
> imageFile.getAbsolutePath());
> int orientation = exif.getAttributeInt(
> ExifInterface.TAG_ORIENTATION,
> ExifInterface.ORIENTATION_NORMAL);
>
> switch (orientation) {
> case ExifInterface.ORIENTATION_ROTATE_270:
> rotate = 270;
> break;
> case ExifInterface.ORIENTATION_ROTATE_180:
> rotate = 180;
> break;
> case ExifInterface.ORIENTATION_ROTATE_90:
> rotate = 90;
> break;
> }
> Log.v(Common.TAG, "Exif orientation: " + orientation);
>
> Bitmap rotattedBitmap= BitmapFactory.decodeFile(al_image_paths.get(i));   
> 
> Matrix matrix = new Matrix();
> matrix.postRotate(rotate);
> return Bitmap.createBitmap(rotattedBitmap, 0, 0, 
> rotattedBitmap.getWidth(), rotattedBitmap.getHeight(), matrix,   true);
> } catch (Exception e) {
> e.printStackTrace();
> }
>
>

-- 
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/d/optout.


Re: [android-developers] ViewPager pages not drawn

2014-12-20 Thread Doug Gordon
SOLVED! After tracing the execution through ViewPager and 
FragmentPagerAdapter and trying to explain the very strange behavior I was 
seeing, I eventually discovered that when I wrote my fragments extending 
Fragment and ListFragment a long time ago, I had added a getView() method 
that was (inadvertently) overriding the method by that name in the 
superclass and was returning the wrong view for what the ViewPager was 
expecting. I removed these methods and everything started working.

The only explanation I have for why this code was working OK with the 
native fragments is that I noticed that the support.v4 fragments enclose 
the fragment's actual root view as returned by onCreateView with some sort 
of FrameLayout that they create, and that is what getView returns. The 
native fragments apparently do not do this, so the view returned by my 
getView method worked correctly.

The only odd thing, and I am not a Java expert, is that I did not precede 
my getView with @Override and did not notice any error or warning about 
that. Isn't this required? I know that when I wrote that code that I was 
not intending to override the superclass.

On Saturday, December 20, 2014 1:04:23 PM UTC-5, Kostya Vasilyev wrote:
>
> Ok, so the items are there and the views are there.
>
> What I would do at this point is check the attributes (data) of those 
> views:
>
> - Their positions and sizes
> - Visibility
> - Animation state
> - Translation / scaling
> - Scroll positions
>
> Or I would try to debug into the view pager's onMeasure / onLayout / 
> populate + scrollToItem
>
> For this second part, I would perhaps add a button in the layout that 
> calls requestLayout or setCurrentItem on the pager, to trigger as needed.
>
> -- K
>
> 2014-12-20 17:17 GMT+03:00 Doug Gordon >:
>
>> Kostya, I have done that and what I am seeing is the background of the 
>> ViewPager, but not my fragments' views. I set a breakpoint so I could go 
>> back into the ViewPager, and examining its data structure I find that not 
>> only does its mItems array contain my instantiated fragments, but also the 
>> mChildren array in the base View contains my fragments' expanded view 
>> hierarchies!
>>
>> There is just something that is preventing the views from being drawn, 
>> even if I explicitly call invalidate() on the ViewPager. And it still seems 
>> that it must have something to do with using the support.v4 fragment 
>> support since it all works fine using native fragments.
>>
>> On Friday, December 19, 2014 4:57:43 PM UTC-5, Kostya Vasilyev wrote:
>>>
>>> Have you tried debugging into ViewPager code?
>>>
>>> To see if your fragments' views are actually there and how they're laid 
>>> out?
>>>
>>> Another thing I often use in cases like this -- is to set the background 
>>> color of various views to distinct noticeable colors, like pink, cyan, etc. 
>>> In this case, I'd try the view pager itself, its parent view, and your 
>>> fragments' views.
>>>
>>> -- K
>>>
>>> 2014-12-20 0:30 GMT+03:00 Doug Gordon :
>>>
>>>> I haven't received any responses on stackoverflow about this, so am 
>>>> giving it a shot here.
>>>>
>>>> My app, which is fairly large and complex (hard to post meaningful 
>>>> code) uses as its main view a ViewPager with a FragmentPagerAdapter. Since 
>>>> the minSDK is 14, I originally wrote it to use the native Fragment and 
>>>> related classes (ViewPager from support.v4 and FragmentPagerAdapter from 
>>>> support.v13). This has all been working perfectly for a long time.
>>>>
>>>> Recently I decided to build in more compatibility, mainly for themes, 
>>>> by using the appcompat.v7 library. However, using this library required 
>>>> that I use the Fragment and FragmentPagerAdapter, etc. classes from the 
>>>> support.v4 library (meaning that I also had to change my Activity to a 
>>>> FragmentActivity, call getSupportFragmentManager, etc.).
>>>>
>>>
>

-- 
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/d/optout.


Re: [android-developers] ViewPager pages not drawn

2014-12-20 Thread Doug Gordon
Kostya, I have done that and what I am seeing is the background of the 
ViewPager, but not my fragments' views. I set a breakpoint so I could go 
back into the ViewPager, and examining its data structure I find that not 
only does its mItems array contain my instantiated fragments, but also the 
mChildren array in the base View contains my fragments' expanded view 
hierarchies!

There is just something that is preventing the views from being drawn, even 
if I explicitly call invalidate() on the ViewPager. And it still seems that 
it must have something to do with using the support.v4 fragment support 
since it all works fine using native fragments.

On Friday, December 19, 2014 4:57:43 PM UTC-5, Kostya Vasilyev wrote:
>
> Have you tried debugging into ViewPager code?
>
> To see if your fragments' views are actually there and how they're laid 
> out?
>
> Another thing I often use in cases like this -- is to set the background 
> color of various views to distinct noticeable colors, like pink, cyan, etc. 
> In this case, I'd try the view pager itself, its parent view, and your 
> fragments' views.
>
> -- K
>
> 2014-12-20 0:30 GMT+03:00 Doug Gordon >:
>
>> I haven't received any responses on stackoverflow about this, so am 
>> giving it a shot here.
>>
>> My app, which is fairly large and complex (hard to post meaningful code) 
>> uses as its main view a ViewPager with a FragmentPagerAdapter. Since the 
>> minSDK is 14, I originally wrote it to use the native Fragment and related 
>> classes (ViewPager from support.v4 and FragmentPagerAdapter from 
>> support.v13). This has all been working perfectly for a long time.
>>
>> Recently I decided to build in more compatibility, mainly for themes, by 
>> using the appcompat.v7 library. However, using this library required that I 
>> use the Fragment and FragmentPagerAdapter, etc. classes from the support.v4 
>> library (meaning that I also had to change my Activity to a 
>> FragmentActivity, call getSupportFragmentManager, etc.).
>>
>> Making no more than these changes, my ViewPager comes up as a blank 
>> screen; all I see is the ViewPager's background color; my fragments' views 
>> are not displayed! What's really strange is that by putting in various 
>> breakpoints, I can see that almost everything is working underneath as far 
>> as my fragments' life-cycle methods being called, etc. I can swipe back and 
>> forth across the screen and the fragments appear to be swapped in and out 
>> as expected. It is particularly telling, however, that in various custom 
>> views that I have, the onMeasure and onDraw methods are never called!
>>
>> Does anyone have any idea of what would be preventing the ViewPager from 
>> actually drawing its views? If I revert the code to use the native fragment 
>> support and associated supporting classes, everything shows up, which means 
>> that if there is something wrong on my end it must be extremely subtle.
>>
>> (Just to throw in some confusion, there is another activity in the app 
>> that also uses a ViewPager with fragments, and it continues to work with 
>> either the native or support library classes. (I'm about to throw in the 
>> towel and just forget this whole update.))
>>
>> Doug Gordon
>>
>> -- 
>> 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 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/d/optout.
>>
>
>

-- 
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/d/optout.


[android-developers] ViewPager pages not drawn

2014-12-19 Thread Doug Gordon
I haven't received any responses on stackoverflow about this, so am 
giving it a shot here.


My app, which is fairly large and complex (hard to post meaningful code) 
uses as its main view a ViewPager with a FragmentPagerAdapter. Since the 
minSDK is 14, I originally wrote it to use the native Fragment and 
related classes (ViewPager from support.v4 and FragmentPagerAdapter from 
support.v13). This has all been working perfectly for a long time.


Recently I decided to build in more compatibility, mainly for themes, by 
using the appcompat.v7 library. However, using this library required 
that I use the Fragment and FragmentPagerAdapter, etc. classes from the 
support.v4 library (meaning that I also had to change my Activity to a 
FragmentActivity, call getSupportFragmentManager, etc.).


Making no more than these changes, my ViewPager comes up as a blank 
screen; all I see is the ViewPager's background color; my fragments' 
views are not displayed! What's really strange is that by putting in 
various breakpoints, I can see that almost everything is working 
underneath as far as my fragments' life-cycle methods being called, etc. 
I can swipe back and forth across the screen and the fragments appear to 
be swapped in and out as expected. It is particularly telling, however, 
that in various custom views that I have, the onMeasure and onDraw 
methods are never called!


Does anyone have any idea of what would be preventing the ViewPager from 
actually drawing its views? If I revert the code to use the native 
fragment support and associated supporting classes, everything shows up, 
which means that if there is something wrong on my end it must be 
extremely subtle.


(Just to throw in some confusion, there is another activity in the app 
that also uses a ViewPager with fragments, and it continues to work with 
either the native or support library classes. (I'm about to throw in the 
towel and just forget this whole update.))


Doug Gordon

--
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/d/optout.


[android-developers] Can't update widget preview on Nexus 5/Lollipop

2014-12-01 Thread Doug Gordon
I am modifying a widget product, including an all-new screen layout. The 
development is going well and I'm about ready to release the update, but 
am having a very "interesting" anomaly on my Nexus 5 with the recent 
Lollipop upgrade. Basically, no matter what I do, the widget preview 
shown in the launcher's widget screen is the one from the previous 
version that was installed -- not the updated one in my widget. The old 
preview graphic does not exist anywhere in my project structure and I 
even gave the new preview a different name.


The really strange thing is that the old image persists even if I 
completely uninstall the widget from the Apps Manager, then reboot the 
phone and install the new version. Interestingly, when I press and hold 
the preview image and begin to drag it onto my home screen, the image 
changes to the new one as I drag it! Obviously, the launcher has the old 
image cached somewhere and does not clear it out when the widget is 
deleted and does not check to see if it has changed when installing the 
same widget again. The preview on the widget screen does update as 
expected on my other devices.


Anyone have any ideas? Is this a Lollipop bug?

  Doug Gordon
  GHCS

--
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/d/optout.


Re: [android-developers] Simple PagerAdapter does not display views

2014-11-25 Thread Doug Gordon
Yes, and that's what's so frustrating, Kastya. The breakpoints appear to 
indicate that everything is working, as does the fact that it responds to a 
swipe. For example, if I start it off by calling ViewPager with 
setCurrentItem(3), my instantiateItem is called with position=3, followed 
by position==2 and 4 (the views to either side). When swiping to go to the 
right, destroyItem is called with position=2 and instantiateItem position=5 
as expected. isViewFromObject is called numerous times and I correctly 
return true or false. Since the data in the adapter never changes, 
getItemPosition always returns POSITION_UNCHANGED per the specs.

I feel like there is something I'm missing that is failing to make my views 
"visible", or else there is some undocumented "feature" since they do not 
provide much info for using the base PagerAdapter (all the samples are 
using FragmentPagerAdapter or FragmentStatePagerAdapter. I am now 
considering changing over to use fragments instead of simple views since I 
know that works even though to me it seems less efficient in this case.

Thanks for your response in any case!

  -- Doug


On Monday, November 24, 2014 5:09:31 PM UTC-5, Kostya Vasilyev wrote:
>
> Did you properly implement the adapter's isViewFromObject?
>
> How about getItemPosition?
>
> -- K
>
>
>

-- 
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/d/optout.


[android-developers] Simple PagerAdapter does not display views

2014-11-24 Thread Doug Gordon
I have a fragment in which I want to display a number of similar pages 
using ViewPager. For some reason I thought that it would be simpler to 
extend the base PagerAdapter to feed views to the ViewPager. My custom 
PageAdapter implements instantiateItem by inflating a layout, populating 
its widgets, and then calling addView against the container view. The 
containing ViewPager is the view that I return from the onCreateView 
method of the fragment.


The problem is that this is working from a paging point of view, but the 
screen remains blank. By setting breakpoints, I find that when I swipe 
across the (blank) screen, my PagerAdapter is called as expected 
(instantiateView, destroyView, etc.) to return the next/previous view, 
but nothing is shown -- only the background of the ViewPager. Examining 
the ViewPager at the breakpoint, the expected instantiated views are in 
its array of child views.


Any clues on where to look? I've implemented a FragmentPagerAdapter 
elsewhere with no issues, but this does seem like it would be easier, 
especially since these views have no controls on them (just data).


Doug Gordon
GHCS Software

--
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/d/optout.


[android-developers] Re: Creating a custom-view with rounded corners

2014-11-13 Thread Doug Gordon
I don't believe that would (or could) be possible. After all, the Android 
o/s doesn't "understand" the content of your background image. Those 
rounded corners just exist as pixels in an image and are not defined 
mathematically in any way so that the drawing software could clip to them. 
All that is understood by the system are the rectangular coordinate limits.

On Wednesday, November 12, 2014 5:54:02 PM UTC-5, dashman wrote:
>
> I've got a view that goes into a listview and would like each to have a 
> rounded corners.
>
> For the custom view layout, I set the parent to a RelativeLayout and
> and set the background to a shape - that sets rounded corners.
>
> http://schemas.android.com/apk/res/android";
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:background="@drawable/bg"
> >
> 
> But the problem is that if inside the view, if i draw to the edges - it 
> doesn't
> get clipped to the rounded corners.
>
> Any way to force 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
--- 
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/d/optout.


[android-developers] Android Studio Editor feature

2014-10-27 Thread Doug Gordon

  
  
After years of using Eclipse, I'm making the transition to Android
Studio and am still mystified by some of what I see. The latest
surprise was when I opened a source file to make an edit and saw
that I apparently had hard-coded a string even though I was sure
that I hadn't done so. IOW, what I saw was:

    Toast.makeText(mCtx, "Evernote app not found",
Toast.LENGTH_SHORT).show();

However, the text was lightly grayed and highlighted. When I clicked
inside the text, the line changed to what I had actually coded,

i.e.:

    Toast.makeText(mCtx, R.string.evernote_err,
Toast.LENGTH_SHORT).show();

Which was more like it! Although this feature is certainly very cool
in some circumstances, there are other times when I'd prefer to just
see what I typed. So what is this feature called? Can I switch it on
and off (once I had collapsed the string to the constant, I could
not get it to revert until I opened the file again)?
    
-- 
Doug Gordon
GHCS Software
http://www.ghcssoftware.com
g...@ghcssoftware.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 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/d/optout.


[android-developers] Re: Image captured from my app is rotated by default

2014-03-25 Thread Doug Gordon
This may not be related to your problem, but I believe that there are 
basically two ways that the orientation of a JPEG photo is determined. One 
is simply by the way the actual data in the file is laid out; for example, 
whether it is stored as 1024x768 or 768x1024. The other determinate is an 
(optional) datum in the file's "metadata" that specifies "camera 
orientation" and indicates the degrees of rotation. So even if a photo's 
data is stored as 1024x768, if the orientation data is "+90", then it is to 
be displayed rotated to the right in 768x1024 format.

The problem that I've found is that not all devices or image 
processing/display software seems to use the metadata and, making things 
worse, may not propagate the data when saving a modified image. So I've had 
photos from my phone that I've had to rotate in image software to make them 
look right on my PC, but then I'll do something like upload them to 
Facebook and they're rotated the wrong way!

I might be wrong about this, but it's what I've concluded after playing 
around with various devices and image processing programs.

On Tuesday, March 25, 2014 2:07:37 AM UTC-4, Jags wrote:
>
> Hi All,
>
> I tried to capture an image and send it to server in my app. I did that 
> using camera intent. the problem is in my samsung galaxy s4 device the 
> image is rotated -90 degree by default. I read around web that it is a 
> problem with the samsung devices. But what is the best solution to it ? if 
> i rotate the image after capture, it becomes heavy image processing in my 
> app. What is the best approach to resolve this ? 
>
> in phonegap there is something like correctOrientation = true / false 
> what's its counterpart in native code ?
>
> thanks and regards
> jags
>

-- 
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/d/optout.


[android-developers] Re: ViewPager and ListFragments with onLongClick listener problem

2013-12-31 Thread Doug Gordon
1) It seems like you could figure this out just by setting a few 
breakpoints and following what happens when the long-press menu is 
activated.

2) Do you really have a separate copy of code for each fragment that differ 
only by the FRAGMENT_DAY_NAME constant? This is bad practice for a number 
of reasons plus the extra work required (if you find a bug, you'll have to 
make edits in all those modules?).

On Friday, December 20, 2013 11:10:44 AM UTC-5, Paul-Peter Tournaris wrote:
>
> Hello to everyone! I tried asking this in StackOverflow and had to no luck 
> so you are my last hope! 
>
>
> http://stackoverflow.com/questions/20681055/viewpager-and-listfragment-with-onlongclick-strange-behaviour
>
> The problem is clearly described in the above link! If you want me to 
> clarify anything more please feel free to tell me and i will answer asap!
>
> Thank you in advance!
>
> -- 
> *Παύλος-Πέτρος Τουρνάρης*
> *Android  & Software Developer*
>
>- http://about.me/pavlospt
>- *http://acschedule.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
--- 
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: Passing the "design for tablets" checks (dev console optilmization tips)

2013-11-23 Thread Doug Gordon
My app seems to have passed the tests once I added some 7-inch tablet 
screen shots. I do have some resources in folders with the *-xlarge*attribute, 
so maybe that's a clue to what they're looking for.

On Friday, November 22, 2013 4:20:28 PM UTC-5, b0b wrote:
>
>
> I have an app that I think is tablet friendly yet the dev console 
> optimization tips report:
>
> "Your layout should make use of the available space on tablets"
>
> Great. It point to this page to solve it:
>  
> http://developer.android.com/distribute/googleplay/quality/tablet.html#use-extra-space
>
> The problem is that it is a bit vague about what exactly is required to 
> pass this requirement.
>
> - does it check for layout-sw600dp and res/layout-sw720dp   (my app only 
> has the former) ?
> - does it check for XML Fragment declaration ?
> - etc...
>
> What is exactly required is not crystal clear...
>
>

-- 
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] xxHdpi Displays

2013-11-12 Thread Doug Gordon
Having just bought a Nexus 5 (great smartphone, BTW!!), I see that I 
apparently missed the introduction of these "xxhdpi" devices (480ppi 
class). It doesn't appear that all of the Android developers' pages have 
been fully updated for these screens, but are we officially supposed to 
now be providing graphic resources in  a "drawable-xxhdpi" resource 
subfolder?


That's about all I need is yet another set of graphics to resize and 
tweak endlessly! :-(


Doug Gordon
GHCS Software

--
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: Deposits From Google Wallet Weirdness

2013-07-18 Thread Doug Gordon
According to Bank of America's site, all three payouts did go into my 
account. I guess the simplest thing would be to just consider it an 
"advance" for the next couple of months. At least it wasn't like the guy 
whose Paypal account got an erroneous balance of 94 quadrillion dollars the 
other day!

On Tuesday, July 16, 2013 5:27:30 PM UTC-4, Nathan wrote:
>
> Any one else seen weird things with Google Wallet?
>
> Like many of you, I have recently been forced into the highly inferior 
> Google Wallet interface from Google Checkout. 
>
> So should I be concerned if, say, Google Wallet says that they have 
> deposited the monthly deposit at least three times today?
>
> Not that I would complain if I really thought I could just keep it. But 
> only one really arrived in the bank account, and I hope the IRS is not 
> going to ask what I did with the other two. 
>
> I have already contacted Google Wallet through their form that says "Be 
> aware that we cannot respond to every request . . ." 
>
> Is this just another silly thing I should let take care of itself?
>
> Note to Google: Our accountants hate you. 
>
> Nathan
>
>

-- 
-- 
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] Overloading of Back Key functionality

2013-05-06 Thread Doug Gordon
Excuse me for a minor rant, but is anyone else bothered by what I call 
the "overloading" of the Android Back key? What I mean by this is that 
pressing it can have two vastly different results: it can return you to 
an earlier "view" in the app you are using, or it can effectively exit 
the app and return to the previous app or home screen.


In the original concept (?) of Android, this can work well. For example, 
you have an app with a "View on Map" control. Tap it and you throw out 
an Intent that's picked up by Google Maps. When you're done, you press 
the Back key and return to the original app. Fine.


However -- and for me this is a big however -- many if not most apps are 
a lot more complex and are more in the nature of "standalone" programs. 
When running these apps, the Back key is used to back up to previous 
viewing states of the app, such as returning from an article to the 
table of contents. Trouble is, it's not always obvious or easy to 
remember the hierarchy of the app contents, and I don't know how many 
times I press the Back key expecting to return to another state of the 
app and instead find myself looking at the home screen!


An example: The user runs a weather app and it displays the weather for 
her location. She decides to look at the weather in another city and 
uses some control to select it. At this point it is easy to assume that 
pressing the Back key will return the app to the previous city's data, 
but that's not how it works: pressing that key exits the app.


My own app has this situation, and even when using it myself I sometimes 
accidentally exit it instead of going "back" to an earlier set of 
details. I notice that some apps have put in an "Are you sure you want 
to exit?" dialog that helps prevent this, but it would seem it would be 
a lot cleaner if this were not necessary.


--
--
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: Adjust ActionBar Tabs Width

2013-02-16 Thread Doug Gordon
If you hide the app title and icon and use the splitActionBar option, you 
can get up to 4 tabs on the top row on a smartphone-size screen. I think 
that 4 is about the limit, but if there is not enough room for all the tabs 
in the top row, Android converts the tabs to a spinner (dropdown) selector. 
This works OK, but then is not as convenient as having the tabs.

On Saturday, February 16, 2013 12:59:25 AM UTC-5, sree wrote:
>
> Hi 
> see The above attachment.
> I implemented ActionBar tabs,But when i add more than 3 tabs it is going 
> back of the screen.so i need to adjust width for each tab.How can i do it.
> actually i need to implement 5 tabs.
>
> Thank you in advance.
>

-- 
-- 
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] Unexpected Action Bar Behavior

2013-02-01 Thread Doug Gordon
I've just updated my app to use an ActionBar with navigation tabs and 
the splitActionBarWhenNarrow option, integrated with ViewPager to allow 
swiping between tabs. The home icon and title in the bar are disabled.  
It is functionally working on all configurations, but in one case it 
doesn't act as I would expect.


When on a smartphone in portrait config, the Action Bar splits with the 
tabs in the top bar and the menu/action items in the bottom bar. Of 
course I can select a page by tapping a tab, and when I swipe from page 
to page the tab selection highlight (underbar) moves to the selected 
tab. So far so good.


When I turn the device into the landscape position, I now get a single 
Action Bar at the top. The action and overflow menu icons are at the 
right, and Android has turned my tabs into a dropdown selector on the 
left side. This works OK when I use the selector to change pages, but 
when I swipe from page to page the selector *does not change* to 
indicate the current tab.


My code of course does not change depending on configuration, and I set 
breakpoints to show that onPageSelected is called, which calls 
bar.setSelectedNavigationItem, causing onTabSelected to be called in 
turn. So the expected actions are taking place, but the selector in the 
dropdown does not change.


Any ideas what is going on?

(For what it's worth, in landscape position on a tablet, I get yet 
another variant: a single Action Bar with my tabs on the left and action 
items on the right. In this case, the tab highlight correctly follows 
when swiping.)


  Doug Gordon
   GHCS Software

--
--
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: Fragment Transition Animation Crashes

2013-01-29 Thread Doug Gordon
Thanks. I did manage to discover that I needed to specify R.*animator*.fade_in, 
etc. One of those changes that is easy to miss if you do not always follow 
every release note, etc.

On Monday, January 28, 2013 5:46:37 AM UTC-5, Kostya Vasilyev wrote:
>
> The native fragment API uses the new (since 3.0) animators.
>
> http://developer.android.com/guide/topics/graphics/prop-animation.html
>
> You can see the difference in the source, too:
>
>
> https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v4/java/android/support/v4/app/FragmentManager.java
>
>
>1. Animation anim = AnimationUtils.*loadAnimation*(
>mActivity, fragment.mNextAnim);
>
>
>
> https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/app/FragmentManager.java
>
>
>1. Animator anim = AnimatorInflater.*loadAnimator*(
>mActivity, fragment.mNextAnim);
>
>
> -- K
>
> On Monday, January 28, 2013 4:14:36 AM UTC+4, Doug Gordon wrote:
>>
>> The following code used to work fine in a previous iteration of my app 
>> that was targeted to V11 but used the support library to support 
>> fragments, etc., from the minimum V7 and up: 
>>
>>  Fragment frag = 
>> ShowExhibit.ShowExhibitFrag.newInstance(args); 
>>  FragmentTransaction ft = 
>> mFrag.getFragmentManager().beginTransaction(); 
>>  ft.setCustomAnimations(android.R.anim.fade_in, 
>> android.R.anim.fade_out, 
>>  android.R.anim.fade_in, android.R.anim.fade_out); 
>>  ft.replace(mParentId, frag); 
>>  ft.addToBackStack(null); 
>>  ft.commit(); 
>>
>> Now I'm creating a new version that targets V14 and also has a min of 
>> V14, so no need to use the support library for fragments. Running this 
>> on the emulator running Android 4.0 (V14), I get the following fatal 
>> error on the transition: 
>>
>> FATAL EXCEPTION: main 
>>   java.lang.RuntimeException: Unknown animator name: alpha 
>>   at 
>> android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:129)
>>  
>>
>>   at 
>> android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:93)
>>  
>>
>>
>> So what has changed? I can load my previous app version on this same 
>> emulator and it runs just fine. None of the code related to this 
>> operation has changed in any way. The emulator was created using the 
>> standard "Galaxy Nexus" definition within ADT. 
>>
>

-- 
-- 
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] Fragment Transition Animation Crashes

2013-01-27 Thread Doug Gordon
The following code used to work fine in a previous iteration of my app 
that was targeted to V11 but used the support library to support 
fragments, etc., from the minimum V7 and up:


Fragment frag = ShowExhibit.ShowExhibitFrag.newInstance(args);
FragmentTransaction ft = 
mFrag.getFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.anim.fade_in, 
android.R.anim.fade_out,

android.R.anim.fade_in, android.R.anim.fade_out);
ft.replace(mParentId, frag);
ft.addToBackStack(null);
ft.commit();

Now I'm creating a new version that targets V14 and also has a min of 
V14, so no need to use the support library for fragments. Running this 
on the emulator running Android 4.0 (V14), I get the following fatal 
error on the transition:


FATAL EXCEPTION: main
 java.lang.RuntimeException: Unknown animator name: alpha
 at 
android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:129)
 at 
android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:93)


So what has changed? I can load my previous app version on this same 
emulator and it runs just fine. None of the code related to this 
operation has changed in any way. The emulator was created using the 
standard "Galaxy Nexus" definition within ADT.


--
--
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] Kudos to ADT package developers

2012-11-28 Thread Doug Gordon
Having just bought a new PC, I wasn't particularly looking forward to 
installing my Eclipse/Android development environment yet once again and 
could only hope to find my old notes on what to install, what settings 
to  make, etc. So I was pleasantly surprised to find that this has been 
packaged into a single download that almost instantly gets me back to 
being productive. I think the only thing I needed to do was to tell it 
where the SDK was and download some earlier platforms.


So thanks to whoever it was that did this work -- greatly appreciated!

Doug Gordon
GHCS Software

--
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] Windows 8

2012-11-21 Thread Doug Gordon
My development PC just took a dive, and most of the decent PCs that I can 
find locally are now coming with Windows 8. I really don't want to go that 
route, but if I do, will the Android development environment, i.e., Eclipse 
and the various SDK tools, run OK on Windows 8? And how about drivers for 
Android devices?

-- 
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 Product Updates

2012-06-04 Thread Doug Gordon
Good info. This actually explains some of the "buggy" behavior I've seen, 
not on my own apps, but on various others on my own devices. Especially 
when I apply an update and then the screen widget stops working with an 
"App not installed" error popping up.

On Sunday, June 3, 2012 10:57:37 PM UTC-4, Dianne Hackborn wrote:
>
> This is an overview I wrote last year on the things you shouldn't change 
> in your app if you want updates to go smoothly:  
> http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html
>
> On Sun, Jun 3, 2012 at 4:09 AM, Kostya Vasilyev wrote:
>
>>
>> 03.06.2012 14:22, David Ross написал:
>>
>>  Sadly, this does not work at all well. Just as when you have a widget
>>> and you uninstall the app you get the horrid "Problem Loading Widget"
>>> message, the same thing happens when the user accepts the update from
>>> the Play site.
>>>
>>
>> Never seen this with my own widgets, or other installed widgets on any of 
>> my phones.
>>
>> Now, if the updated package uses a different class name for "the same" 
>> widgets, the home screen won't know this, and the user will get the message 
>> you describe.
>>
>> So, pick those class names carefully, and don't change them :)
>>
>> Besides, package updates happen all the time during development 
>> (run/debug), and they doesn't cause existing widgets to go sour.
>>
>> In fact, the launcher will update all of them just after the installation 
>> is complete to ensure consistency with new code and assets.
>>
>>
>>  Also watch out for irritating things like ghost widgets on lower API
>>> levels (1.6) when unexpected things happen like there's not enough
>>> home screen space for your widget. I keep my own track of the widgets
>>> so I can detect and ignore ghost widgets.
>>>
>>
>> I've seen ghost widget ids on my Galaxy Nexus with 4.0.4, so don't throw 
>> that code away just yet :)
>>
>>
>> -- 
>> Kostya Vasilyev
>>
>>
>> -- 
>> 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
>>
>
>
>
> -- 
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to 
> provide private support, and so won't reply to such e-mails.  All such 
> questions should be posted on public forums, where I and others can see and 
> answer them.
>
>

-- 
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] Widget Product Updates

2012-06-02 Thread Doug Gordon
I'll shortly be releasing my first widget product and am wondering if 
there are any restrictions as to how the user updates a widget when a 
new version is posted. I've noticed that if you use the App Manager to 
delete a widget that's in use without removing it from the home screens, 
an error message ends up being displayed in that location on the screen 
(which you then have to remove in the standard way).


But if an updated version is installed over the existing version, is the 
updated widget now displayed as expected on the home screen? Or would 
the user be forced to remove the existing instances and add back the 
updated widget?


Doug Gordon
GHCS Software

--
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] Getting "Unable to Instantiate activity; Component ClassNotFound exception"

2012-04-18 Thread Doug Gordon
I'm suddenly unable to run my app due to this error, where the 
ClassNotFound refers to my main activity class. It happens on my phone 
as well as in the emulators in various versions. This is an existing 
stable app that's been around for quite a while, and I haven't made any 
code changes since the last time it was working a few weeks ago.


The only recent changes I've made is that I started a new project in the 
same workspace and updated the Eclipse components to SDK Tools V19 and 
SDK Platform Tools V11, plus updating the Eclipse plug-in as indicated. 
I checked and nothing has changed in my project source directories.


Any ideas at all of what suddenly broke here?

--
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] Does Market Recognize Internationalization?

2012-02-27 Thread Doug Gordon
If I put up a new version of my app that includes support for new 
languages -- for example, with a "/values-fr" directory -- will the 
Market indicate this in any way to users who have this language 
selected? Is there any way to note this feature other than the update 
comments in the Market description?


  Doug Gordon
  GHCS Software

--
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: Prevent image from being scaled in ImageView

2012-02-11 Thread Doug Gordon
Are you saying that the "X" gets scaled up to the full size of the
ImageView as though the transparent "border" were not there? I have an
ImageView that displays photos in their "native" pixel dimensions up
to a max size by doing this:



This does *not* scale up images that are less than the max dimensions.
But I might be aiming for something quite different from your case.

On Feb 11, 12:22 am, Kookamonga  wrote:
> I have an ImageView defined like so:
>
>                                                     android:layout_width="fill_parent"
>                                    android:layout_height="40dp"
>                                    android:background="@null"
>                                    android:src="@drawable/delete"
>                                    android:scaleType="center"
>                                    android:layout_weight="1"/>
>
> The "delete" drawable is a 60x60 png with a roughly 28x28 white X in
> its center; the rest of the png is transparent. When this view
> appears, the white X appears scaled (larger than original). This looks
> ugly. Is there any way to prevent this scaling? What is causing it?
>
> I have tried to follow Mark's suggestion here (drawable-nodpi folder),
> but unfortunately, it didn't work:
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> I have tried android:background="@null" and android:scaleType="center"
> and android:src, according to this:
>
> http://stackoverflow.com/questions/2406172/android-how-to-prevent-ima...
>
> Still no dice. I'm not sure what I'm missing here.

-- 
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: sqlite size capacity

2012-01-29 Thread Doug Gordon
I believe that there is a maximum file size limit of 2Gb, but this has
more to do with Android in general than specifically with SQLite.
Performance has more to do with your database schema than with the
size of the file, but Android was not designed as a "database engine"
and I had to resort to some tricks -- such as record caching -- in my
app to achieve reasonable performance.

On Jan 28, 3:56 am, Live Happy  wrote:
> what is the maximum size of sqlite on the mobiles phone (android, iPhone,
> blackberry, windows mobile) its the same on all of them
> and in wish of them sqlite more compatibility and the performance of it is
> high
> thx for answer

-- 
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: Supporting Galaxy Note Issues Due To It Displaying Itself as a LARGE screen layout.

2012-01-21 Thread Doug Gordon
This is why I sometimes envy developers who write for iOS -- they have
only a few well-defined form factors to consider and don't have new
"surprises" coming out every few weeks! :-)

  Doug Gordon
  GHCS Software

On Jan 20, 9:09 pm, jtoolsdev  wrote:
> I have a similar problem with one of my apps where I created a special
> version (same app different APK) for 10" Honeycomb tablets.  If a 7"
> Honeycomb tablet (1024x600) tries to run the app the screen will get
> cropped and if a 7" tablet with 1280x720 runs it the widgets will be
> difficult to use.   The layout for small, normal and large will work fine
> on 7" screens even with 1280x720 resolution.  So there needs to be a way to
> handle an overlap.  I agree this was all not thought out very well.

-- 
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: Difference between fragment add and replace

2012-01-10 Thread Doug Gordon
Yes I did, and it is not clear why I would want to use one vs. the
other in many cases since the end behavior seems to be the same. The
"add" method also implies that you're adding the fragment "to the
activity", whereas replace talks about removing and adding "to the
container".

In general, the Android documentation is good, but sometimes
inconsistent in terminology when read closely.

On Jan 9, 11:38 am, TreKing  wrote:
> On Mon, Jan 9, 2012 at 9:27 AM, Doug Gordon  wrote:
> > So what is the difference behind the scenes between these two methods?
>
> Did you try reading the documentation for each function ... ?
>
> --- 
> --
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

-- 
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] Difference between fragment add and replace

2012-01-09 Thread Doug Gordon
I display information in a frame by instantiating fragment A and showing 
it with calls to ft.add().addToBackStack(). Later, a user selection 
causes fragment B to be displayed in that frame. When the user presses 
the Back button, it returns to showing frag A, and another press of Back 
results in an empty frame.


This is all working well, but what I've observed is that there is no 
visible difference in behavior whether I show frag B by calling 
ft.replace().addToBackStack() or ft.add().addToBackStack(). So what is 
the difference behind the scenes between these two methods?


  Doug Gordon
  GHCS Software

--
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: xlargeScreens ?

2011-12-13 Thread Doug Gordon
Are you sure you're using the correct symbol, i.e.
Configuration.SCREENLAYOUT_SIZE_XLARGE?

  Doug Gordon
  GHCS Software

On Dec 12, 7:39 pm, martypantsROK  wrote:
> seems to be an Eclipse problem. Build target is set to 11 but it
> doesn't recognize it.
> Got all the latest updates...any other wise info?
>
> On Dec 12, 8:59 pm, Mark Murphy  wrote:
>
>
>
>
>
>
>
> > On Mon, Dec 12, 2011 at 6:07 AM, martypantsROK  wrote:
> > > I'm getting an error on compile:
>
> > >       error: No resource identifier found for attribute
> > > 'xlargeScreens' in package 'android'
>
> > > I'm trying to use API 11, andxlargeScreenswas to have been setup in
> > > 9+.
>
> > > So what have I done wrong to cause this not to be recognized?
>
> > Double-check your project's build target. Having a build target below
> > API Level 9 is the only thing that I have seen that causes this error.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.2
> > 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: What are ideal parameters for the width & height of the layout of widget?

2011-12-03 Thread Doug Gordon
You are not very specific about what you are doing, but in general the
"container" section of your layout -- the RelativeLayout part -- would
be set to "match_parent", but a typical widget such as a Button would
be set to "wrap_content" because you don't want it to be any larger
than it has to be. "match_parent" for a Button could result in a full-
screen button! You can also affect the visible size of widgets by
adjusting their padding.

On Dec 2, 2:34 am, Abhishek Kumar Gupta  wrote:
> In the case of Widget, if I use RelativeLayout as the main layout, then
> what will be the best parameters for layout_width & layout_height i.e.
> whether I have to use "match_parent" or "wrap_content"? Please help me.
> If the question is below standard then sorry 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] Re: Fragment Re-instantiation on Activity Restart

2011-11-29 Thread Doug Gordon
To wrap this up, I've found that the arguments "sent" to the fragment
with setArguments are preserved when the fragment is reinstantiated by
the framework. So what I'm now doing is only creating a new fragment
if there is no previous one after a config-change restart. For
example:


mTabBar = (TabBarFrag) fm.findFragmentByTag(PERS_TAB_TAG);

if (mTabBar == null) {
mTabBar = TabBarFrag.newInstance(R.id.tab_pers);
}

ft.add(R.id.tab_bar, mTabBar, PERS_TAB_TAG);

And where the newInstance function contains:

public static TabBarFrag newInstance(int dsbId) {
TabBarFrag frag = new TabBarFrag();
Bundle args = new Bundle();
args.putInt(DISABLE_ID, dsbId);
frag.setArguments(args);
return frag;
}

-- 
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: Fragment Re-instantiation on Activity Restart

2011-11-29 Thread Doug Gordon
Rony, you are correct, but of course if (savedInstanceState != null)
then I'd need to use the manager findFragmentByTag call to find these
recreated fragments since I need to be able to add them to their
container view and also to be able to call custom methods that update
the displayed data, etc. Now that I understand how and why it works
this way, I might make these changes for the sake of efficiency.

On Nov 28, 2:16 pm, Rony Hotimsky  wrote:
> What exactly you mean with "all sorts of bizarre behavior"?
> I've seen a problem with fragments duplicating themselves after each
> screen rotation, and that could be avoided checking if
> (savedInstanceState == null) before creating them.

-- 
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] Fragment Re-instantiation on Activity Restart

2011-11-28 Thread Doug Gordon
My app is built with V4 of the Compatibility Library (in case that makes 
a difference) and all of my fragments are "dynamic". That is, I 
explicitly create the fragment objects and put them in a view with an 
"add" or similar transaction, etc.


What I have discovered is that, when my activity is restarted after a 
config change (e.g., screen rotation), the Android framework itself 
automatically reinstantiates any existing fragment objects (done in the 
activity's call to super.onCreate). Due to the way I expect to start 
"from scratch" each time, this caused all sorts of bizarre behavior and 
crashes until I figured out what was happening.


I've managed to basically work around this and get rid of these 
extraneous fragments, but I'm thinking that I might have missed 
something fundamental in how to manage these types of objects across a 
restart event, etc. The documentation mentions dynamic fragments in a 
few places, but there seem to be few examples or samples of how to 
manage them (declaring them in the xml layout seems to be much more common).


Anyone have any particular experience in this area?

--
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: Fragment within a fragment?

2011-11-16 Thread Doug Gordon
Thanks for the confirmation; I sort of expected that. After browsing
StackOverflow, one of the posts gave me an idea for an alternative
design that will actually make everything much simpler and more
elegant than what I was thinking of doing. So it worked out for the
better. :-)

  Doug Gordon

On Nov 16, 4:24 pm, Mark Murphy  wrote:
> On Wed, Nov 16, 2011 at 1:38 PM, Doug Gordon  wrote:
> > So Fragment A is instantiated, inflates its view, and goes on its merry way.
> > Can Fragment A later instantiate a Fragment B and add it to one of Fragment
> > A's own child views, thus creating a sort of fragment within a fragment?
>
> No, sorry, Ms. Hackborn has indicated that nesting fragments in
> fragments is not supported. There's a StackOverflow post or two on
> this topic.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.1
> 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] Fragment within a fragment?

2011-11-16 Thread Doug Gordon
So Fragment A is instantiated, inflates its view, and goes on its merry 
way. Can Fragment A later instantiate a Fragment B and add it to one of 
Fragment A's own child views, thus creating a sort of fragment within a 
fragment?


I can't think of a reason why not, but still don't have a really good 
grasp on how fragments are implemented and managed. Thanks.


  Doug Gordon
  GHCS Software

--
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] String isEmpty()

2011-11-01 Thread Doug Gordon

On 11/1/2011 3:45 PM, Marc Petit-Huguenin wrote:

The method String.isEmpty() exists only since Java 1.6/Android API 9.


Thanks. That explains a lot. This was a recent change. I thought surely 
I'd used that method before, but when I searched my entire project, 
"isEmpty" was nowhere to be found! It obviously wasn't available when I 
did my original development on Android 2.1.


--
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] String isEmpty()

2011-11-01 Thread Doug Gordon
Why in the world would my app crash with a "No such method" Java error 
on a statement like "if (!myString.isEmpty()" for a perfectly valid 
String object? If I simply change it to "if (myString.length() > 0)" it 
works just fine, so it's not like I'm not pointing to a valid String 
object or anything.


Interestingly, this only appears to happen when running it on my actual 
Android 2.2 phone. It works OK on a V2.3.3 emulator. It is built with 
the V2.3.3 SDK. What gives?


  Doug Gordon
  GHCS Software

--
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] Tag and onCreateView

2011-11-01 Thread Doug Gordon
Attempting to learn about fragments, and studying the docs and some 
samples, I am not really clear as to what the  tag represents 
in an XML file and how it relates to the fragment "container view" that 
is supposed to be passed to onCreateView. Mainly, in the sample that I'm 
using, which defines the fragment in the XML file using the syntax 
", when onCreateView in 
the fragment is called, the 2nd argument (supposed to be the containing 
ViewGroup) is always null. What's up with that? Shouldn't it be the 
LinearLayout or whatever contains this fragment in the XML code?


In fact, the entire declaration of  confuses me, since I don't 
think that it is really a view by itself, so why does it have width and 
height dimensions? After all, if you dynamically add a fragment to a 
ViewGroup, it's the view returned by onCreateView that gets displayed, 
so why these dimensions?


Same thing with the fragment ID; is this the ID of the view created by 
the fragment, or of its container, or something else?


I must be missing a concept here, but maybe I just have to start working 
on my own code conversion to fragments and see what happens...


  Doug Gordon
  GHCS Software

--
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] Building V4 sample

2011-10-21 Thread Doug Gordon
I'm trying to build the Sample4Demos project (copied to my own 
workspace) with Android V4.0 as the target SDK. It is not building due 
to a number of errors of this type: "The method onPageScrolled(...) of 
type FragmentTabsPager.TabsAdapter must override a superclass method".


It seems to be fixed by removing the @Override that precedes the method 
in the code. Anyone else had this issue? Are these methods indeed not 
overrides?


  Doug Gordon
  GHCS Software

--
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] Changing the "scaled pixel" size

2011-09-13 Thread Doug Gordon
In a number of places the documentation recommends specifying font sizes 
in "sp" (scaled pixels) because the size can then be adjusted by "user 
preference". However, AFAIK there is no global way to do this. So if I 
want to allow users to increase or decrease the font size in my app, I 
assume that I'll have to implement my own app-specific preference.


The problem is that I can't see how to change the setting. 
DisplayMetrics has a "scaledDensity" field that is obviously the scaling 
factor that affects font specified in "sp", but I don't see any way to 
change that value. Am I missing something?


Doug Gordon
GHCS Software

--
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] onLayout not always called after onMeasure

2011-09-07 Thread Doug Gordon
There are at least two passes made for laying out views, and my custom 
view has onMeasure and onLayout overrides. At the end of onMeasure I 
call setMeasuredDimension as required by the API, and then onLayout 
usually gets called next. What I have noticed is that if, on the 2nd 
pass, I call setMeasuredDimension with the same arguments as the first 
time, then my onLayout is not called the 2nd time.


This was causing a bug in my app since I have several child views that I 
need to size and rearrange within this parent container view. But since 
what I am doing is to fit the child views into the visible space on the 
screen, the "measured dimension" of the container view may not change 
from one pass to the other, and the children don't get re-layed out (the 
layout parameters from the 1st pass are not the final values).


I currently have a kludged workaround for this, but I'm wondering if it 
would be OK to call layout() on my child views from within onDraw 
instead of within onLayout. The parent view does get drawn first, so I 
would guess that this wouldn't hurt anything.


Doug Gordon
GHCS Software

--
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] Converting to Fragments

2011-07-06 Thread Doug Gordon
I have an app which currently builds up a stack of activities as the 
user drills down into the data. It would be an ideal candidate for using 
side-by-side fragments when run on a tablet (in landscape). But when I 
finally got around the other day to looking at what would be necessary 
to convert all that code to a fragment-based design, it looks a lot more 
complicated than I had hoped; more of a full rewrite of a lot of the 
structure. Not to mention continuing to support smartphone screens with 
the same app.


So has anyone had success in morphing an existing Android 2.x app to run 
using fragments on 3.x without having to start with too much of a clean 
sheet? I could see some real ugly code and kludges creeping in if I try 
to force fragments into what I currently have.


Doug Gordon

--
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: Minimum Age?

2011-06-21 Thread Doug Gordon
I'm more concerned there will be a _maximum_ age and I'll have to drop
out of the community. :-)

On Jun 19, 3:07 pm, Mehwar Raza  wrote:
> Is there a minimum age requirement to become an android developer? I
> have been trying to hunt down the answer to no avail.

-- 
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: Google Docs Access

2011-05-19 Thread Doug Gordon
The databases are user-generated, so I need a "public" solution. I
can't use my web server to store megabytes of data for thousands of
users, manage usernames and passwords, etc.

On May 18, 9:41 pm, Nikolay Elenkov  wrote:
> On Thu, May 19, 2011 at 4:31 AM, Doug Gordon  wrote:
> > My app is mainly self-contained, interacting only with the user's databases,
> > and does not use any web or cloud technology to do its thing. However, I'd
> > like to add functionality to download database files from the user's Google
> > Docs account to make it easier to transfer data.
>
> Why would you want to use Google Docs to download database file? Is it
> even possible? Put your files on a web server, use some sort of authentication
> if you don't want everyone to download them, and you are set.
>
>

-- 
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] Google Docs Access

2011-05-18 Thread Doug Gordon
My app is mainly self-contained, interacting only with the user's 
databases, and does not use any web or cloud technology to do its thing. 
However, I'd like to add functionality to download database files from 
the user's Google Docs account to make it easier to transfer data.


There are docs online for the required APIs, but it really seems 
complicated and assumes prior knowledge of various web technologies 
(XML, JSON, HTTP headers, etc.) that are outside my realm of knowledge. 
It looks like a very steep learning curve just to perform this basic 
operation: obtain authentication, get a list of available docs to 
display, download selected doc file to the SD card.


Is there anyplace where I can find a tutorial on what I need to know, or 
possibly sample code? My experience in the past is that the 
documentation can make it seem more complex than it actually is: 20 
pages of confusing text, and then you see a sample implementation and 
it's just a couple dozen lines of code!


Any help getting me started on this would be appreciated!

  Doug Gordon
  GHCS Software

--
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] How To Use MTP-connected Devices

2011-03-02 Thread Doug Gordon
My app currently requires the user to manually copy certain files from 
their PC to their USB-mounted Android device where my app can open them 
and do its thing. But I'm already running into issues with users' 
devices that want to mount in this "MTP" mode, and I hear that the Xoom 
*only* supports MTP, etc.


So how can MTP be used to transfer files to the device that don't really 
fit into the "Media files" category, and how do I locate the directory 
from my app? What do getExternalStorageDirectory and getExternalFilesDir 
return for a device like the Xoom?


Doug Gordon
GHCS Software

--
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: Developing for tablets

2011-02-22 Thread Doug Gordon
Thanks for the helpful answer, Mark. This sounds like an excellent
approach, as I'd definitely prefer having one app that runs on
multiple devices (but backward compatibility to Android 2.x could be
an issue). I'll wait for all the doc pages to be updated to read about
this and figure it all out. I would also hope that you'll be updating
some of your publications accordingly; they were a big help when I was
just starting out with this project.

Doug Gordon

On Feb 21, 4:43 pm, Mark Murphy  wrote:
> On Mon, Feb 21, 2011 at 4:36 PM, Doug Gordon  wrote:
> > Mainly, it seems like many applications would be better off being redesigned
> > or offered in separate versions for tablets as opposed to simply being
> > handled by different layouts within a single app. A device like the Xoom has
> > a resolution of 1280x800, but this is on a 10.1-inch screen where there's a
> > lot of physical real-estate, making it hard to simply scale existing
> > layouts.
>
> That is why Honeycomb introduces the fragments system -- a layer you
> can introduce between the view/layout and the activity, to allow you
> to organize your UI into modules that can be assembled into different
> sorts of activities based on screen size.
>
> The quintessential example of this is a ListFragment and a separate
> detail fragment (e.g., list of emails and the body of the selected
> email). For large- or xlarge-screen devices, you might put both of
> those fragments in one activity. For small- and normal-screen devices,
> you would put the ListFragment in one activity and the detail fragment
> in a separate activity.
>
> While there is nothing stopping you from creating a separate
> tablet-only app, and using  to ensure the
> tablet-only app only winds up on large-/xlarge-screen devices, users
> can still always select to install your "normal" app on their tablet.
> This means, IMHO, that your "normal" app has to not look bad on a
> large-/xlarge- device (e.g., tons of wasted whitespace). You might
> reserve the separate tablet-only app as a paid upsell with extra
> tablet-specific features, or something.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

-- 
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] Developing for tablets

2011-02-21 Thread Doug Gordon
I've not paid much attention to the Honeycomb SDK issues since I figured 
it's better to wait until something final is available, but I am 
definitely wondering if we will be getting any specific information or 
guidance from the Android folks regarding developing for device with the 
larger tablet form factors that are starting to be announced, if not 
actually available yet (Xoom, G-slate, et al).


Mainly, it seems like many applications would be better off being 
redesigned or offered in separate versions for tablets as opposed to 
simply being handled by different layouts within a single app. A device 
like the Xoom has a resolution of 1280x800, but this is on a 10.1-inch 
screen where there's a lot of physical real-estate, making it hard to 
simply scale existing layouts.


For example, my genealogy app is mainly about displaying textual 
information at increasing levels of detail, which I now do by launching 
activities that display the data as an overlay. I can see that, on a 
tablet, I could probably make better use of the display by showing the 
data in a side-by-side fashion, and so on. There's just a lot more space 
to make use of.


Perhaps this has all been thought of and will be covered when the final 
SDK is released. But I would also like some guidance on how to handle an 
increasingly fragmented array of devices.


Doug Gordon
GHCS Software

--
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: FilterQueryProvider not working

2011-02-18 Thread Doug Gordon
Thanks for the tip. That's what is sometimes lacking in the
documentation: the methods are explained in a basic way, but it's not
always clear exactly how they are intended to be used.

On Feb 17, 5:36 pm, Kostya Vasilyev  wrote:
> I don't think you are supposed to call runQueryOnBackgroundThread yourself,
> it's an implementation method.
>
> Use getFilter().filter("some text") to kick things off.
>
> http://developer.android.com/reference/android/widget/Filter.html#fil...)
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
> 18.02.2011 0:23 пользователь "Doug Gordon"  написал:

-- 
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] FilterQueryProvider not working

2011-02-17 Thread Doug Gordon
I'm trying to use a FilterQueryProvider to filter some ListView contents 
since it should be simpler than managing this on my own, but it doesn't 
seem to be working as documented, or else I've missed something. My 
basic code for initializing the adapter is as follows:


startManagingCursor(curs);
mAdapter = new CursorAdapter(this, curs, true);// curs has 
the initial full contents

mAdapter.setFilterQueryProvider(new ItemFilter());
setListAdapter(mAdapter);

My ItemFilter class is simply:

class ItemFilter implements FilterQueryProvider {
public Cursor runQuery(CharSequence filter) {
Cursor curs = getNewCursor(filter);
startManagingCursor(curs);
return curs;
}
}

I have a key listener that updates the filter string and calls 
mAdapter.runQueryOnBackgroundThread() as described in the docs.


My runQuery is correctly filtering the table and returning a cursor with 
a subset of the full contents according to the filter string, but the 
ListView never changes. Some debug code calling mAdapter.getCount() 
always returns the original row count -- not the filtered count that I 
get if I call curs.getCount() in the runQuery routine. It's almost as if 
the adapter's changeCursor method is not being called, even though it 
states in the documentation that it will be called.


Did I miss something here?

Doug Gordon
GHCS Software

--
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] Cursor Management with ListView

2011-02-15 Thread Doug Gordon
I've got a ListActivity that displays a list of items from a database 
using a CursorAdapter, which initially contains all items in the table. 
I also provide an EditText view where the user can enter search text, 
and as characters are entered, I requery the database using a "LIKE" or 
"MATCH" where clause to filter the results (IOW, what lots of apps do 
when searching).


Currently, I do this in an AsyncTask by creating a new Cursor from the 
query, creating a new instance of my CursorAdapter class, and then 
calling list.setAdapter from the UI thread when the task completes. This 
is all working, but is there a more elegant way of effectively 
requerying the database with a new WHERE clause from withing the 
existing adapter/cursor and avoiding having to create new object 
instances each time? Any examples of this technique?


Doug Gordon
GHCS Software

--
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] Closing Cursors

2011-02-15 Thread Doug Gordon
I'm trying to clean up my cursor management and have taken care of all 
the cases where I strictly use a cursor within my own classes. But what 
about cursors passed in a CursorAdapter to a ListView? Does the ListView 
or adapter take care of closing the cursor when the activity exits?


Doug Gordon
GHCS Software

--
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] onPostExecute and Activity State

2011-01-23 Thread Doug Gordon
After the background thread of an AsyncTask has completed (i.e., 
doInBackground returns), it is stated that onPostExecute runs "on the UI 
thread". Can I assume that if the activity has gone into the "paused" 
state or other non-active state, that onPostExecute will not be called 
until the activity has resumed (and is in the foreground)?


It seems like it has to work this way, but I'm not sure exactly how the 
threading model works in Android.


  Doug Gordon
  GHCS Software

--
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] Best way to resize photo

2010-12-31 Thread Doug Gordon
Among other things, my app displays photos in an ImageView in a popup 
Dialog. These images come out of a database that is created on the 
user's PC. Before storing them in the database, I resize them for max 
dimensions of 320x320 pixels.


So, in almost all cases, on the Android device I simply display the 
photos at their "natural" dimension, which fits nicely on almost all 
screens. However, I have at least one customer with an HTC Wildfire 
which, even though its screen is 3.2", has only QVGA dimensions 
(240x320). With my current code, the photos do seem to be resized by the 
system to display within the screen boundaries, but the rest of the 
views in the dialog (caption, buttons, etc.) get "pushed off the screen" 
and are not visible or usable.


Obviously I need to handle this case by setting some specific dimensions 
on the ImageView when running on a QVGA device, but what is the best 
approach? Should I use DisplayMetrics to discover the dimensions and 
adjust accordingly? This would work, but seems like it might be too 
low-level of an approach. Could I put dimension the image in the XML in 
some way using "dips"?


(By the way, it's interesting that Android considers this class of 
display to be a "small screen" for Manifest purposes, but at 3.2" it's 
not physically all that smaller than a lot of other devices with higher 
res.)


--
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] Market in U.K. not up to date?

2010-12-23 Thread Doug Gordon
According to one of my users in the U.K. (I'm in the U.S.), my app is 
still showing a version that's at least two weeks old in the Android 
Market that he has access to. Is there any particular reason for this? 
It's causing some grief since he could really use the update. I'm also 
surprised that I haven't heard of this from any other users (or maybe 
they're just not aware that an update is available).


Doug Gordon

--
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] "Read phone identity" privilege

2010-12-23 Thread Doug Gordon
I've considered three different apps today on the Market. All three are 
basically news-oriented (Motor Trend, Time, and MSNBC). They are also 
all associated with something called the "Zumobi Network". Anyway, I 
declined to install any of them because they were requesting a privilege 
labeled "Phone Calls: Read phone state and identity".


I can't think of a single reason why an app that's going to display news 
articles from an internet connection needs to access my phone data. The 
only thing I could think of was that it could harvest my phone number 
and upload it somewhere, and I could end up getting phone calls or text 
messages. With my pay-per-call/text phone plan that's the last thing I need!


Can anyone tell me if there's anything I'm missing about granting this 
privilege? Is there any reason to require it other than just plain snooping?


  Doug Gordon
  GHCS Software

--
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] Who or What is AppBrain?

2010-12-19 Thread Doug Gordon
OK, I went to their site and "claimed" my product, but I'm confused as 
to the relationship between AppBrain and the Android Market. Mainly, 
where are the statistics on AppBrain coming from?


In addition to the description and screenshots, they have the overall 
rating and comments directly from the Market, but how do they get those 
(very useful!) statistics on device type, age, gender, etc.? Are these 
only for apps when they're downloaded from AppBrain, or do they somehow 
come from Market data?


This is stuff that would make our pages on the Android Market a lot more 
interesting and helpful!


  Doug Gordon

--
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: Concern on AsyncTask in an Activity

2010-12-13 Thread Doug Gordon
The problem I've had with AsyncTask is that if the main activity exits
and the background task finishes a bit later, the UI that the b/g task
wants to update in its PostExecute method no longer exists, and I get
a Force Close when it tries to use one of the Views that I'd
previously saved. So you might want to do some checking from
PostExecute to verify that your views still exist if you need them.

  Doug G

On Dec 13, 7:17 am, Mark Murphy  wrote:
> On Mon, Dec 13, 2010 at 7:13 AM, umakantpatil  wrote:
> > I'm just confused about the lifecycle of activity and AsyncTask.
> > I have an activity which opens new AsyncTask. Now if finish() that activity,
> > will be background task also get closed ?
>
> No.
>
> > Or will it be still going ?
>
> Yes.
>
> > If going on then how long it will be going, till my code exceute or till the
> > app gets exited ?
>
> The background thread of the AsyncTask should keep running until
> doInBackground() completes or the process is terminated.
>
> However, this is not a good thing. If you need to have background
> threads live even after an activity is finished, please have those
> threads be managed by a Service (perhaps even an IntentService).
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> 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: How to control the width and height of Alert dialog.

2010-12-10 Thread Doug Gordon
In a similar situation, I stopped using AlertDialog and went directly
to the Dialog class. You can do everything you need to do that way,
but a bit more complex since you don't get some of the shortcuts that
AlertDialog provides.

  Doug Gordon

On Dec 10, 7:39 am, sat  wrote:
> AlertDialog.Builder builder = new AlertDialog.Builder(this);
>             builder.setTitle("Title");
>             builder.setItems(items, new
> DialogInterface.OnClickListener() {
>                 public void onClick(DialogInterface dialog, int item)
> {
>                     Toast.makeText(getApplicationContext(),
> items[item], Toast.LENGTH_SHORT).show();
>                 }
>             });
>             AlertDialog alert = builder.create();
>
> I am using above code to show alert dialog , By default it fills the
> screen in width and wrap_content in height.
> How to control the width and height of default alert dialog ?
> I tried , alert.getWindow().setLayout(100,100); // It dint work.
> How to get the layout params on the alert window and set manually the
> width and height ?

-- 
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: Poor SQLite implementation? first time data access way to slow

2010-12-09 Thread Doug Gordon
I found that I had to significantly restructure both my database
design and query sequences in order to get satisfactory performance on
an actual phone. There are big differences between Android and a PC,
such as lack of gobs of real (and virtual!) memory. You don't have a
database server that can do things like cache indices, etc. I also put
my query work into an AsyncTask to keep from stalling the UI, but even
so when I took a PC-like approach to my queries the busy-dialog was up
there way too long.

You really have to optimize everything.

  Doug Gordon

On Dec 8, 3:49 pm, carbi84  wrote:
> Hi there,
>
> i am new to android programming, however i am quite used working with
> sqlite databases.
>
> - my application opens a sqlite3 database on the sd card and runs a
> kinda complex query (5 joins, 1 subquery, 2 where clauses) using
> SQLiteDatabase.rawQuery
>
> public Cursor queryDataBase(String sql, String[] selectionArgs){
>                 Cursor c = myDB.rawQuery(sql, selectionArgs);
>                 return c;
>         }
>
> - the sql statement is given by a hardcoded String
> - the query returns 585 rows with 24 columns
> - i had to do a trade-off between storage space and indexing, but on
> all bigger tables (about ~ 40 000 entries, for now) indexes are used,
> SQLite shows for the query: Steps: 155 , Sorts: 0, AutoIdx: 1077
> - i am not using primary keys, thus i also didn't rename anything to
> "_id"
>
> - the execution of rawQuery is kinda fast, execution time is about 2
> ms
> - however accessing this data takes way too much time, e.g. by
> c.moveToFirst(), execution time about 1700 ms ! (same for
> Cursor.getRowCount(), or apparently all first time access to the
> actual result set)
> - doing the same on a PC ( 2 Ghz, 1 GB RAM) with e.g. SQLiteSpy it
> takes 15 ms to display the result set
> - doing it on the PC with a C++ Implementation it's also 15 ms up to
> 30 ms
>
> So what am i missing here? Is it actually possible that my Handset
> with 800 MHz and 2 GB RAM is about 120 times slower??
>
> ( of course i am also aware of the speed difference between a microSD
> card and a sata2 hdd, but that shouldn't explain this huge difference,
> right? )

-- 
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: SQLite Performance

2010-11-29 Thread Doug Gordon
The database is strictly read-only on the Android side. When created
on the PC, I issue, for example, the command "CREATE INDEX EvtIdx ON
tblEvtRef (idind);". On the Android side, I use the
SQLiteDatabase.query method, in which one specifies the SQL command in
fragments as opposed to having it parse out an entire query string,
but what I'm doing is equivalent to:

"SELECT col1,col2,... FROM tblEvtRef WHERE idind = ;"

Where "val" is an integer e.g, "idind = 221" (this is not the primary
key, and multiple matches are expected). All of my queries are
basically at this level of simplicity. I'll take a look at the
database on the Android using the sqlite3 utility and see what it
tells me, but overall SQLite is a somewhat restricted subset of what a
typical database server would provide. Still, I'd like to exhaust any
possible avenues for improving efficiency.

  Doug Gordon

On Nov 28, 3:14 pm, Frank Weiss  wrote:
> I assume you appreciate the fact that just knowing SQL is not knowing how to
> optimize queries.
>
> I'm also going to assume that the read queries are the issue. Insert and
> delete queries are a whole different issue with respect to indexing.
>
> Indexes are indeed the primary means of optimizing SQL queries. I'm
> wondering if the create index command you ran on the PC is actually in
> effect on the Android device. If I'm not mistaken, you should be able to
> verify that the DB on the device actually has indexing enabled. Have you
> verified the speedup that indexing provided on the PC?
>
> If adding column indexing by itself is not effective, you'll need to look
> into the queries and the actual data patterns. Some queries are structured
> so that the DB cannot use indexes. See if sqlite has an "analyze" command
> for debugging queries. It will show the steps it would use to execute the
> query. If there's no step that uses the index (even if there is a column
> index) or if the index lookup is at the end of the steps, then the query is
> not making maximal use of the index. It's a bit of an art to coerce the
> query compiler to do it right and sometimes there are pitfalls in SQL that
> need to be understood.
>
> How many queries does you app use? Which one is the bottleneck? Can you post
> the query?

-- 
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] SQLite Performance

2010-11-28 Thread Doug Gordon
My app works by using a SQLite database that is generated on the user's 
PC and transferred to the device. It all works, but I had not 
anticipated the number of users who would have really huge amounts of 
data. In these cases, the UI is very sluggish as it waits for the data 
to be fetched.


I've tried a number of tricks that I was "sure" would speed things up, 
but nothing seems to have any noticeable effect. My queries are almost 
all very simple, being usually a single "col=val" for the WHERE clause, 
and INTEGER data in the column.  So I can't do much with the queries.


The latest, and I am not an SQL expert by any means, was to use "CREATE 
INDEX" commands on the PC, believing that these indeces are used to 
speed up database searches. The indeces increased the size of the 
database file significantly, so I was then surprised that it seemed to 
have no effect whatsoever on the speed of my app! A screen that was 
taking 8 seconds to fill without indeces still takes about 8 seconds 
even with them. I was hoping to get things down to at least half that.


What I am wondering at this point is if the SQLite implementation on 
Android uses database indeces at all, or if I'm just wasting space by 
generating them. Can anyone answer this?


Also, any other things to try to speed up access?

(For what it's worth, on an absolute basis the users have nothing to 
complain about. My worst-case user so far has data that generates 
630,000 records (15 tables), so there's only so much that's possible!)


Doug Gordon
GHCS Systems

--
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: 512x512 high res icon required?

2010-11-18 Thread Doug Gordon
Yes, we really need to know the actual size of the graphic when it's
viewed in order to figure out what to put in it. On my PC screen,
512x512 is HUGE and I could put a lot of detail in it, but if it gets
shrunk down to a centimeter or two on a side on someone's tablet
device, it's another story!

  Doug Gordon
  GHCS Software

On Nov 18, 9:52 am, Christophe 
wrote:
> well, that's great, but it would be better to know what we are suppose
> to put in these pictures (icon & "feature") and where it is going to
> be used BEFORE making it mandatory.
>
> On Nov 18, 2:48 pm, Warren  wrote:
>
>
>
>
>
>
>
> > There wasn't much notice, but there was an email that came from
> > Android Market Support that gave a maintenance window and a list of
> > changes to the market. I was also lucky enough to have designed my
> > icon at 1024x1024, which I then downsize for antialiasing. As for my
> > other apps, I guess I'll have to redo them. Slightly annoying, sure.
> > But then, they are doing this to help us market our apps, so I can't
> > complain too much ;)
>
> > Warren
>
> > On Nov 18, 4:35 am, Daniel Drozdzewski 
> > wrote:
>
> > > On Thu, Nov 18, 2010 at 9:16 AM, MrChaz  wrote:
> > > > You forgot to mention the required 1024 'feature' image as well,
> > > > whatever the hell that is!
>
> > > The featured 1024 is in case your app gets featured, obviously...
> > > you are right, I am guessing.
> > > The whole thing must be a quiet (half of the internet is talking about
> > > it) move to enable existing apps for Google TV.
>
> > > Polishing things is a worthy cause - just look how focused and
> > > successful Apple is with such strategy.
>
> > > Daniel

-- 
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] Crash reports on Market

2010-11-18 Thread Doug Gordon
Anyone else having trouble getting "Server error" messages instead of 
their crash reports on AM? This didn't just start today after the recent 
updates -- I couldn't get them a couple days ago either.


  Doug Gordon
  GHCS Software

--
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] First Market Experiences

2010-11-03 Thread Doug Gordon
Now that I've released my first app on Android Market, I can see some of 
the good and bad features that I've seen discussed here. I was mainly 
surprised by a number of low ratings by people who had obviously hardly 
used the program, or at least not for what it was intended for. 
Especially for free apps, there seem to be a number out there who 
download anything new & free, try things until they find something they 
don't like, then rate it 1 star with a comments like "Doesn't do X. 
Uninstalling." Too bad there's not a way to respond to some of these.


The big surprise to me, however, was the error reporting capabilities. I 
had no idea that AM would provide details on errors right down to the 
stack trace! Yes, I did have some dreaded NullPointer situations hanging 
around, but was able to immediately get fixes into the next update to 
take care of them.  I am mightily impressed with this feature!


  Doug Gordon

--
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] Where to learn Android graphics concepts and techniques

2010-11-02 Thread Doug Gordon
I need to do some custom drawing on the screen and am a bit overwhelmed 
when looking at documentation on extending a View, what a Canvas is, 
Paint, strokes, determining current size of screen space, etc. All I'm 
looking for is a good sample or tutorial that explains the concepts 
behind all of this and might give me an idea of which way to go about it.


What I need to do is to draw what basically looks like an organization 
chart. That is, there will be several text boxes (TextViews) with 
borders drawn around them to box them in. The boxes will be 
interconnected by lines running horizontally and vertically. The trick 
will be to dynamically place everything to fit on the screen and then to 
compute the end points for the various line segments and draw them.


I did this for the PalmOS version of my product and it was not that 
difficult, but then PalmOS had a very crude graphic API compared to 
Android (crude but easy to use!). Any ideas on where I can look to get 
an idea of how to approach this?


  Doug G
  GHCS Software

--
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] Updating Market Apps

2010-10-30 Thread Doug Gordon
When publishing an update on the Android Market, is there any way to 
inform users of fixes & new features? I just published my first app and 
am still getting used to everything about the experience, including 
being taken aback by the types of comments that some people post.


But I am definitely impressed with the error reporting capabilities!

  Doug Gordon
  GHCS Software

--
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: ResourceNotFound occurs sometimes during layout inflation

2010-10-21 Thread Doug Gordon
Yes. It occurred to me at the time that my technique was a bit of a
kludge to avoid writing some additional routines, so I'm going to take
TreKing's suggestion and put it into onCreate.

On Oct 21, 6:55 pm, William Ferguson 
wrote:
> In ActivityA's #onCreate are you invoking super#onCreate before you do
> any other work like starting ActivityB?
>

-- 
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] ResourceNotFound occurs sometimes during layout inflation

2010-10-21 Thread Doug Gordon
 My app may launch a sub-activity for a specific purpose. When that 
activity finishes, I get the results in onActivityResult. These results 
are then processed in the subsequent onResume. This consists of a 
setContentView and also starting an AsyncTask that puts up a ProgressDialog.


This all works well when initiated the normal way, which is via a user 
request (i.e., menu selection) after the app is up and running. However, 
under some conditions I need to do this right as the app is starting up, 
so I initiate this sequence right from my onCreate. What then happens is 
that I get fatal ResourceNotFound errors within any o/s call that 
implicitly calls the layout inflater. I got around this with 
setContentView by pre-inflating the view in my onCreate method, but the 
AsyncTask's onPreExecute still fails on ProgressDialog.show() as it 
"fails to find" Android's own progress_dialog.xml!


Anyone know what's happening here?

I suspect it's something to do with the timing, where this is occurring 
before the main activity has even had a chance to display its screen. 
These calls are all being made on the main UI thread, but maybe 
something hasn't completed within the o/s under these conditions.


  Doug Gordon
  GHCS Software

--
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: how to get device's android version

2010-10-21 Thread Doug Gordon
Seems like this just gets the version that you compiled the app on. I
think the OP is looking for a runtime version for an app that can run
on multiple versions.

  Doug Gordon

On Oct 20, 7:34 pm, Mark Murphy  wrote:
> On Wed, Oct 20, 2010 at 7:32 PM, cindy  wrote:
> > Ho could I get Android version of a running device using java code?
>
> Use android.os.Build.VERSION:
>
> http://developer.android.com/reference/android/os/Build.VERSION.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

-- 
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] TableLayout text wrapping issue

2010-09-24 Thread Doug Gordon
 I was configuring a two-column table where the TextView column on the 
right sometimes has a long text string and I wanted it to wrap around 
and expand the table cell vertically as it would in HTML. I found that I 
had to configure the TextView with layout height & width of wrap_content 
in order for it to wrap, but I was losing some of the text content as if 
the TextView were extending to the right of the edge of the screen 
before wrapping.


I finally got it to work by applying shrinkColumns to the RH column. It 
now wraps properly, but I'm a bit at a loss to explain this behavior. Is 
this a quirk of this layout type?


--
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] Trouble with TableLayout wrapping text

2010-09-22 Thread Doug Gordon
I have a 2-column table where the right-hand column in the rows might
have too much text to fit on one line, so I wanted it to wrap and
expand the table cell similar to the way it would work on a web page.
This turned out to be more difficult than I expected. When I
configured that TextView to wrap_content for both width and height,
the text would wrap, but not correctly. Some of the text was missing
as though the lines were extending past the right edge of the screen.

I finally solved it by putting shrinkColumns on the 2nd column; the
text wraps and it's all there. But I'm still curious as to what the
problem was with the off-screen wrapping. The table is fill_parent
wide, so how can a row exceed its width? And why did shrinkColumns fix
it?

-- 
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] Trouble with TableLayout wrapping text

2010-09-22 Thread Doug Gordon
I have a 2-column table where the right-hand column in the rows might
have too much text to fit on one line, so I wanted it to wrap and
expand the table cell similar to the way it would work on a web page.
This turned out to be more difficult than I expected. When I
configured that TextView to wrap_content for both width and height,
the text would wrap, but not correctly. Some of the text was missing
as though the lines were extending past the right edge of the screen.

I finally solved it by putting shrinkColumns on the 2nd column; the
text wraps and it's all there. But I'm still curious as to what the
problem was with the off-screen wrapping. The table is fill_parent
wide, so how can a row exceed its width? And why did shrinkColumns fix
it?

-- 
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] I'm really impressed...

2010-09-16 Thread Doug Gordon
...with this operating system and tool chain. When I decided to "port"
my old PalmOS app over a few weeks ago, I faced a steep learning curve
since this was all new to me: Android, Java, and Eclipse. Now that
I've worked up the mountain much more quickly than expected and am
making excellent progress, I'm appreciating all of the things the O/S
(and language) do for you that used to be much more painful.

For example, I added photo support to my app yesterday, taking JPEG
data as a "blob" out of a SQLite database, converted it to a Bitmap,
put a thumbnail version in an ImageButton, then when the user clicks
the button the full-size image pops up. I was surprised at how few
lines of XML/Java were required for all this, plus with Java doing its
dynamic compilation it all worked on the first try (it's nice that
Java eliminates the possibility of many of the dumb mistakes that you
can make in C/C++).

Sorry for this semi-OT post, but among some of the gripes that we
sometimes express here, the developers have gotten a LOT right! And
apparently an old dog can still learn a few new tricks...

-- 
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: Can android support more than one sdcard?

2010-09-11 Thread Doug Gordon
I get your point, and unfortunately I once worked for such an
organization! :-)

I was just thinking back to the evolution of the PC, which also
started out supporting just one of everything (e.g., the C: drive) and
ended up with multiple disks, multiple partitions on a disk, multiple
pointing devices, multiple screens, etc., etc.

But in this case, even though you're understandably trying to keep
things simple, I tend to think of my Android phone as a replacement
for my Palm PDA, which did have OS support for the resource in
question: multiple removable storage cards (however, I don't think
that any such device was ever produced).


> On Fri, Sep 10, 2010 at 2:33 PM, Doug Gordon  wrote:
> A marketing or engineering department that can't accept limitations is an
> organization that will never ship a product.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
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: Can android support more than one sdcard?

2010-09-10 Thread Doug Gordon
I am really surprised that the Android design would only account for
one of anything. In my experience, any time you say "we're only going
to support one of feature X", the marketing or engineering departments
decide to add another "X". In any case, having support for more than
one is the same as having support for any quantity.

On Sep 10, 1:51 pm, Dianne Hackborn  wrote:
> There is no platform API for developers to find the second SD card, so I
> would strongly discourage having one since it will result in a poorer user
> experience with their apps.
>
>
>
>
>
> On Thu, Sep 9, 2010 at 11:23 PM, Nikkea Dong  wrote:
> > Hey Guys,
>
> >     Is there anyone tell me android support more than one sdcard?
> >     How to add one more sdcard by coding?
>
> >     Thanks,
>
> > Nikki
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-platf...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platform+unsubscr...@googlegroups.com > e...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/android-platform?hl=en.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
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] Converting binary JPEG data to Bitmap

2010-09-08 Thread Doug Gordon
My app will have an SQLite database with some embedded JPEG images --
basically the binary contents of a JPEG file stored as a Blob in the
database. Can someone point me in the general direction of where to
start to figure out how to convert this "array of bytes" into a Bitmap
object that can be further manipulated and displayed in an ImageView?
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


[android-developers] Getting source line no after crash

2010-09-08 Thread Doug Gordon
An Eclipse question, I know, but maybe some Android-specific
considerations. When I'm in Eclipse and running my app in debug mode,
if it halts due to a runtime exception, where can I look to find the
java source line number that was executing at the time?

I've been able to find the error message, which often leads me to the
general area of the faulty code, but it would be nice to get an actual
line number (sometimes TMI in the Eclipse windows when I'm looking for
the basic facts!).

-- 
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] Solid color listSelector?

2010-09-02 Thread Doug Gordon
When I try to override the default list selector by setting
listSelector to a solid color in my layout file, touching an item in
the list causes the entire list background to be set to the color.
What gives?

Also, is there someplace where it describes how to create your own
graphic for the list selector background?

-- 
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] Using setContentView to change info presentation

2010-09-02 Thread Doug Gordon
My users will want to toggle between two different "presentations" of
their current data selection, with differing layouts. I want to handle
this part of the app in a single activity, so am thinking of simply
calling setContentView to change the layout and then of course fill in
the data accordingly.

Are there any drawbacks with this approach? It does not have to be
particularly speedy. Also, exactly when does the window get redrawn in
this case? When the method that does the work (i.e., an event
callback) returns?

-- 
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] Samsung Galaxy suitable for development work?

2010-08-25 Thread Doug Gordon
I can see that I'm going to have to get an actual phone sooner than
later, and for various reasons I'll need to get an "unlocked" version.
As long as I'm laying out that many $$$, I might as well get one that
I can use personally and shop some apps, etc.

So would the Samsung Galaxy S be suitable for development work? I
assume that a general unlocked version would have all the expected
Android built-in apps and would not have restrictions on what apps can
be installed and from what sources. Any comments on this device?

(This also assumes that I can actually get one. The effects of that
chip shortage that they've been talking about seems to be hitting the
supply lines already.)

-- 
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 confusion on resource IDs

2010-08-24 Thread Doug Gordon
I'm just getting into developing my app, which will have quite a
number of activities and thus quite a few XML files to lay out the
screens and define all the views. What I'm just seeing is that if I
assign the IDs using "@+id/name", I'll have to have a unique name for
every widget on every screen since all the symbols get defined in one
big R.java file.

Or can I just generate the definitions once in one of the XML files
and then reference them in the other layout files? For example, if I
have a TextView that I'd like to call "surname" in multiple layout
files, can I declare it one of the files using "@+id/surname" and then
simply use "@id/surname" in the other files? I assume that as long as
all the IDs are unique within a layout file, all is OK.

-- 
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: Must pass Context to other classes?

2010-08-22 Thread Doug Gordon
Yes, I'm admittedly weak on object-oriented design experience and
still tend to treat classes more like "subroutine libraries" than true
objects. I also miss the ability to simplify life (at least as far as
writing the initial code is concerned) by being able to fall back on
"global" variables that are visible everywhere.

But learning to program in Java will eventually cure me of this
ailment. :-)

On Aug 21, 11:38 pm, Mark Murphy  wrote:
> On Sat, Aug 21, 2010 at 11:12 PM, Doug Gordon  wrote:
> > Am I correct that this is the only way to do this?
>
> Yes.
>
> > Also, if I want to
> > use any other Android class that requires a context (e.g.
> > AlertDialog.Builder), I essentially have to "pass" the context from
> > the main Activity object to any class that needs to use it?
>
> Yes. The more you find that you are doing this, the more you have
> over-engineered your object model, IMHO.
>
> > I guess my main question is whether there's another way to get the
> > Context without having to pass it from class to class as an argument.
>
> No, sorry.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 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] Must pass Context to other classes?

2010-08-21 Thread Doug Gordon
I'm not sure if this is an Android question or just due to my being
new to Java as well. I'd like to use the getString method to get
strings from my resources (R.string.whatever). I see that this is a
method of the Context class, and I can call it directly from within my
main Activity class.

But I also have some utility classes in their own class files and
can't simply call this method from them. What seems to be required is
for me to pass the context (the Activity object) into these other
classes via their constructors. Then I can call the method e.g.,
mCtx.getString().

Am I correct that this is the only way to do this? Also, if I want to
use any other Android class that requires a context (e.g.
AlertDialog.Builder), I essentially have to "pass" the context from
the main Activity object to any class that needs to use it?

I guess my main question is whether there's another way to get the
Context without having to pass it from class to class as an argument.

-- 
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: Transfer database file to Android

2010-07-27 Thread Doug Gordon
Good idea about drive-mode, at least for the beta testing and initial
release. I don't actually have an Android phone (yet), so was unaware
of this feature. I'll take a look at what it takes to do that.

(Since I'm not really much of a cell phone person, I'm waiting for the
Android equivalent of the iPod Touch or iPad, with WiFi networking
only.)

On Jul 27, 4:19 pm, greg  wrote:
> Have you considered giving your users instructions on how to put their
> Android phone in USB drive mode and writing a little PC application to
> update/backup your application's data files on the SD card?  This
> might be a setup that the old time Palm users (such as myself :*) are
> comfortable with.
>
> On Jul 27, 7:04 am, Doug Gordon  wrote:
>
>
>
> > Actually not that large by today's standards -- just in the low
> > megabytes (<10 Mb I'd guess). The reason for the uncertainty is that
> > it entirely depends on how much data the user has in their original
> > database, which can vary widely.
>
> > I can understand the web server solution, and of course I already have
> > my own business web server, but I was hoping to avoid having to build
> > my own web-based solution. Such a solution would have to include user-
> > specific login protection (name/password, etc.) since these files can
> > contain private information and I'd have to make sure that the files
> > would be fairly secure from unauthorized downloads and other hacking
> > attempts. But I've done plenty of PHP scripting before...
>
> > On Jul 26, 7:46 pm, greg  wrote:
>
> > > Before you jump to the offered solutions, it might be helpful to
> > >momentarilyback up and define what you mean by "rather large".  For
> > > example, are your data files 1 GBcompressed?

-- 
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: Transfer database file to Android

2010-07-27 Thread Doug Gordon
Actually not that large by today's standards -- just in the low
megabytes (<10 Mb I'd guess). The reason for the uncertainty is that
it entirely depends on how much data the user has in their original
database, which can vary widely.

I can understand the web server solution, and of course I already have
my own business web server, but I was hoping to avoid having to build
my own web-based solution. Such a solution would have to include user-
specific login protection (name/password, etc.) since these files can
contain private information and I'd have to make sure that the files
would be fairly secure from unauthorized downloads and other hacking
attempts. But I've done plenty of PHP scripting before...

On Jul 26, 7:46 pm, greg  wrote:
> Before you jump to the offered solutions, it might be helpful to
> momentarily back up and define what you mean by "rather large".  For
> example, are your data files 1 GB compressed?
>

-- 
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: Transfer database file to Android

2010-07-26 Thread Doug Gordon

Mark Murphy wrote:
>> Another thought I've had is some way to store the converted file out 
in the

>> "cloud" somewhere and then have my app retrieve it from there.

>That is probably the simplest for now.

Any suggestions on what facilities are available out there for secure 
storage of files that can be uploaded from a PC and then downloaded by 
an Android device? Does Google provide anything like this?


 Doug Gordon

--
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] Transfer database file to Android

2010-07-25 Thread Doug Gordon
I'm "porting" an app that I've supported for many years on PalmOS PDAs. 
In that world, the user runs a Windows program on his PC that creates a 
PalmOS database file, which is then Hotsynced to the handheld for the 
PalmOS app to use. For Android, it should work in a similar way, with 
the user periodically updating the database on the Android device by 
regenerating it on his PC.


So far, I've made the conversion on the Windows side to generate an 
SQLite database and can use "adb push" to transfer it to the emulator, 
where I've verified that I can run queries on it using the sqlite3 tool, 
etc.


What I'm unclear on at this early stage is how the file transfer can be 
accomplished with an actual Android device. These files can tend to be 
rather large, so perhaps the SD card would be a good place to put them, 
but in any case I'm unclear on if there is any built-in or automated way 
to transfer files from a PC to an Android device. My users tend to be 
non-techy people and I can't trust them to manually copy the file to the 
correct location, if that's even possible.


Another thought I've had is some way to store the converted file out in 
the "cloud" somewhere and then have my app retrieve it from there.


Any ideas or suggestions on this would be appreciated!

 Doug Gordon
 GHCS Systems

--
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] Necessary to close SQLite database?

2010-07-22 Thread Doug Gordon
I've seem some conflicting posts on this, so will ask it simply here. Is 
it really necessary to close an SQLite database that your activity has 
opened (database is in local memory or on SD card)?


I would think it would be good practice, but I noticed that the Android 
samples such as the Notepad tutorial and SearchableDictionary sample do 
not do this. I've also seen sample code where the database is 
consistently opened, read from, and closed, but that would seem to add 
unnecessary overhead.


 Doug Gordon
 GHCS Systems

--
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