[android-developers] ScrollView not erasing all of top line

2016-06-01 Thread Simon Giddings
I have a custom view embedded within a ScrollView which displays music 
scores.
When I scroll the view, after a time, parts of the top row are not erased.
Here is an example which illustrates the problem -



Here is another closeup view



I have no code which does any erasing.

Is this a known problem ?

Does anyone know of a solution or workaround ?


-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/328d904b-ce6c-492c-98f7-4c01e27999c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: ZipInputStream getNextEntry does not return file header info

2015-12-10 Thread Simon Giddings
Shame I didn't get any answers here.

Here is my solution, which might not be the best but is good for me.
Use the class ZipFile to open and read the zip contents.
Inspired from here ZipInputStream: getting file size of -1 when reading 
<http://www.coderanch.com/t/563455/java/java/ZipInputStream-file-size-reading>

Le samedi 5 décembre 2015 18:16:28 UTC+1, Simon Giddings a écrit :
>
> This would appear to be a bug.
>
> I create a zip file using ZipOutputStream with success.
> I can then transfer it from the tablet to my PC and look at it with WinZip.
> All files have the corresponding size, compressed size, and CRC values.
>
> Now, if I open the zip with ZipInputStream and call getNextEntry, these 
> values are not set.
> Here is how I am reading the file :
>
> try
> {
> // open the archive
> FileInputStream fis = new FileInputStream(fArchive);
> ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
> bBuffer = new byte[2048];
>
> // iterate through all files, putting them back into the same place
> ze = zis.getNextEntry();
> while(ze != null)
> {
> strFileName = ze.getName();
> strFileName = FILE_PATH + "/" + strFileName;
> fCheck = new File(strFileName);
> lZipFileSize = ze.getSize(); // <--- returns -1 systematically
> lTargetFileSize = fCheck.length();
> fCheck = null;
> FileOutputStream fos = new FileOutputStream(strFileName);
>
> // read the data
> while((iCount = zis.read(bBuffer)) != -1)
> {
> fos.write(bBuffer, 0, iCount);
> }
> fos.close();
>
> ze = zis.getNextEntry();
> }
> zis.close();
> fis.close();
> bOk = true;
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
>
>
> When I look into the source for ZipInputStream, I see the following code :
> if (!hasDD) {
> ceCrc = ((long) Memory.peekInt(hdrBuf, LOCCRC - LOCVER, ByteOrder.
> LITTLE_ENDIAN)) & 0xL;
> ceCompressedSize = ((long) Memory.peekInt(hdrBuf, LOCSIZ - LOCVER, 
> ByteOrder.LITTLE_ENDIAN)) & 0xL;
> ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.
> LITTLE_ENDIAN)) & 0xL;
> }
>
> This is the only position that I can see where the values are retrieved, 
> yet it is ignored because of the !hasDD condition.
>
> Have I misunderstood something here ?
> Is this a real bug or is there an extra step to be taken ?
>

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5ba7c710-99ae-4b6f-9c55-947870c3ccbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] ZipInputStream getNextEntry does not return file header info

2015-12-05 Thread Simon Giddings
This would appear to be a bug.

I create a zip file using ZipOutputStream with success.
I can then transfer it from the tablet to my PC and look at it with WinZip.
All files have the corresponding size, compressed size, and CRC values.

Now, if I open the zip with ZipInputStream and call getNextEntry, these 
values are not set.
Here is how I am reading the file :

try
{
// open the archive
FileInputStream fis = new FileInputStream(fArchive);
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));
bBuffer = new byte[2048];

// iterate through all files, putting them back into the same place
ze = zis.getNextEntry();
while(ze != null)
{
strFileName = ze.getName();
strFileName = FILE_PATH + "/" + strFileName;
fCheck = new File(strFileName);
lZipFileSize = ze.getSize(); // <--- returns -1 systematically
lTargetFileSize = fCheck.length();
fCheck = null;
FileOutputStream fos = new FileOutputStream(strFileName);

// read the data
while((iCount = zis.read(bBuffer)) != -1)
{
fos.write(bBuffer, 0, iCount);
}
fos.close();

ze = zis.getNextEntry();
}
zis.close();
fis.close();
bOk = true;
}
catch(Exception e)
{
e.printStackTrace();
}


When I look into the source for ZipInputStream, I see the following code :
if (!hasDD) {
ceCrc = ((long) Memory.peekInt(hdrBuf, LOCCRC - LOCVER, ByteOrder.
LITTLE_ENDIAN)) & 0xL;
ceCompressedSize = ((long) Memory.peekInt(hdrBuf, LOCSIZ - LOCVER, 
ByteOrder.LITTLE_ENDIAN)) & 0xL;
ceSize = ((long) Memory.peekInt(hdrBuf, LOCLEN - LOCVER, ByteOrder.
LITTLE_ENDIAN)) & 0xL;
}

This is the only position that I can see where the values are retrieved, 
yet it is ignored because of the !hasDD condition.

Have I misunderstood something here ?
Is this a real bug or is there an extra step to be taken ?

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/e76679a5-d150-4657-85fd-85db8fdad45f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Getting the list of supported devices - encoding problems

2015-09-23 Thread Simon Giddings
I wanted to obtain the list of supported devices and then automatically 
process them.
I found this page : 
https://support.google.com/googleplay/android-developer/answer/6154891?hl=en

However, the file is encoded as UCS2 Little endian.

Is there a UTF-8 or unicode version available ?

It is important for me to be able to get this automatically, ie via php 
scripting which is unable to convert from UCS2-LE to UTF-8.

-- 
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: How to change actionbar text case

2015-07-29 Thread Simon Giddings
If anyone is needing to do the same thing, here is my working solution.

Note that I am targeting API 14 and above.



@style/myActionBarMenuText




false

16sp



I hope this will be useful for someone ...

-- 
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] How to change actionbar text case

2015-07-28 Thread Simon Giddings


I have developed an application which contains this app theme style :
 

I have tried various means to change the actionbar text to be mixed case 
instead of all uppercase.
To illustrate, here is a screen shot -



The styles I have tried thus far have produced anything but the desired 
effect.

How do I restyle just the letter case of these items ?

-- 
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: How to stop ActionBar getting focus

2015-07-15 Thread Simon Giddings
Ok, here is my solution ...

When the pedal keyEvent is processed in dispatchKeyEvent, send a message to 
the same activity to call requestFocus on the main content view.

Le mardi 14 juillet 2015 17:29:49 UTC+2, Simon Giddings a écrit :
>
> I have integrated the use of Bluetooth pedals, which declare themselves as 
> being a keyboard.
>
> When the pedal is pressed, my activity gets the keypress and, in 
> dispatchKeyEvent, I return true to indicate that I have consumed the 
> event.
> However, the ActionBar is still responding to the keypress by highlighting 
> the title button - I have already set "setDisplayHomeAsUpEnabled" as true.
>
> I then captured the corresponding area in the action bar and removed 
> focusable like this -
> int iActionBarTitle = 
> getResources().getIdentifier("action_bar_title", "id", "android");
> View v = findViewById(iActionBarTitle);
> v = (View)v.getParent().getParent();
> v.setFocusable(false);
>
> However, this just moved the focus to the first action item.
>
> I do not want to do a lot of hacking so as to avoid further difficulties 
> down the line.
> Not sure of how I can overcome this problem correctly.
>
> Can anyone guide me with this ?
>

-- 
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] How to stop ActionBar getting focus

2015-07-14 Thread Simon Giddings
I have integrated the use of Bluetooth pedals, which declare themselves as 
being a keyboard.

When the pedal is pressed, my activity gets the keypress and, in 
dispatchKeyEvent, I return true to indicate that I have consumed the event.
However, the ActionBar is still responding to the keypress by highlighting 
the title button - I have already set "setDisplayHomeAsUpEnabled" as true.

I then captured the corresponding area in the action bar and removed 
focusable like this -
int iActionBarTitle = 
getResources().getIdentifier("action_bar_title", "id", "android");
View v = findViewById(iActionBarTitle);
v = (View)v.getParent().getParent();
v.setFocusable(false);

However, this just moved the focus to the first action item.

I do not want to do a lot of hacking so as to avoid further difficulties 
down the line.
Not sure of how I can overcome this problem correctly.

Can anyone guide me with this ?

-- 
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: How to remove "blue" cast on views

2015-04-27 Thread Simon Giddings
Can you give any guidance, help, as to how to achieve this ?

On Monday, 27 April 2015 09:12:51 UTC+2, Diogo Henrique wrote:
>
> Simon, check your style, and try change the main Parentor create a 
> default background in your entire app.

-- 
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] How to remove "blue" cast on views

2015-04-25 Thread Simon Giddings
In my app, I create a music score dynamically in a custom view.
This is held within a fragment, which does not have any custom background 
colour or resource applied to it.
Here is a screen shot illustrating the situation ...



How can I remove this blue cast correctly ?

Can this be done once in a global manner so that all view are impacted ?


-- 
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] Migrating to Android Studio

2015-01-10 Thread Simon Giddings
This is great - first class answer !
Thanks for reassuring me about this move - which I will indeed undertake 
after my first release.

On Saturday, January 10, 2015 at 8:29:27 PM UTC+1, TreKing wrote:
>
>
> On Sat, Jan 10, 2015 at 11:24 AM, Simon Giddings  > wrote:
>
>> Is Studio really in a production stable state yet ?
>>
>
> http://android-developers.blogspot.com/2014/12/android-studio-10.html 
>  
>
>> So, my obvious question here is - should I be migrating to Studio *now* ?
>>
>
> You should probably have migrated months ago. But at this point, do you 
> need to migrate this second? No. If Eclipse is working for you and you're 
> about to release, why complicate things with a new environment? I'd get 
> that release out the door, back up everything, create a new branch in your 
> repo, and start the process there.
>  
>
>> If so, are there any accurate guides for doing this ?
>> I have seen the, very, succinct description on the developers site which 
>> appears to skip certain steps.
>> For example, it says to import the project .gradle file - without 
>> explaining how to generate this file !
>>
>
> I assume you're referring to this: 
> https://developer.android.com/sdk/installing/migrate.html, where in step 
> 3 it says "Locate the project you exported from Eclipse". So, while it's 
> not 100% explicit, it is indicating that you should have done an export 
> from Ecipse. Did you try that?
>
> Personally I found that transition fairly smooth. You don't even have to 
> export Eclipse first anymore. Just do an import in Android Studio and it 
> will detect the Eclipse project structure and import it for you. Give that 
> a shot.
>
>
> -
> 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
--- 
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] Migrating to Android Studio

2015-01-10 Thread Simon Giddings
I have been developing a large project for a long time now and am nearly at 
the point of wanting to release it.

However, I have seen that the official IDE is no longer Eclipse but Android 
Studio.
In addition, I have seen a number of discussions passing by where people 
are complaining about bugs within Studio.
Is Studio really in a production stable state yet ?

So, my obvious question here is - should I be migrating to Studio *now* ?

If so, are there any accurate guides for doing this ?
I have seen the, very, succinct description on the developers site which 
appears to skip certain steps.
For example, it says to import the project .gradle file - without 
explaining how to generate this file !

Hopefully someone will be patient enough to help me with this ... please ?

-- 
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: Connect tablet to locally hosted web site

2014-09-27 Thread Simon Giddings
For the solution to this question, see my stackoverflow question and answer 
here :
Android: HTTP connection to localhost web site 
<http://stackoverflow.com/questions/26053675/android-http-connection-to-localhost-web-site>

Rather disappointed that nobody bothered to answer here on this dedicated 
forum, though.

On Thursday, 25 September 2014 10:36:02 UTC+2, Simon Giddings wrote:
>
> I have an application developed which needs to connect to a web site to 
> collect online content.
>
> I have seen that we can indeed connect to a web server on a local system 
> by addressing it via it's ip address.
> However, I am using virtual hosts on my system, so as to use virtual 
> domains.
> This is setup on my system in the apache httpd-vhosts.conf file like this 
> -
> #
> # Project wordpress dev site
> #
> 
> DocumentRoot "C:/web/www/boutique"
> ServerName boutique.project.dev
> 
>
> with my hosts file having the following entry
> 127.0.0.1boutique.project.dev# project woocommerce site
>
> I am using the HttpPost and HttpClient classes and I cannot see how I can 
> provide the real IP address whilst still transmitting the host name in the 
> URL request.
>
> So, what I need to know is how can I make queries from my application 
> using the virtual address " boutique.project.dev " ?
> Is this possible ?
>

-- 
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] Connect tablet to locally hosted web site

2014-09-25 Thread Simon Giddings
I have an application developed which needs to connect to a web site to 
collect online content.

I have seen that we can indeed connect to a web server on a local system by 
addressing it via it's ip address.
However, I am using virtual hosts on my system, so as to use virtual 
domains.
This is setup on my system in the apache httpd-vhosts.conf file like this -
#
# Project wordpress dev site
#

DocumentRoot "C:/web/www/boutique"
ServerName boutique.project.dev


with my hosts file having the following entry
127.0.0.1boutique.project.dev# project woocommerce site

I am using the HttpPost and HttpClient classes and I cannot see how I can 
provide the real IP address whilst still transmitting the host name in the 
URL request.

So, what I need to know is how can I make queries from my application using 
the virtual address " boutique.project.dev " ?
Is this possible ?

-- 
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] Allowing underlying ScrollView to scroll

2014-07-31 Thread Simon Giddings
I have a ScrollView which fills the screen, within a RelativeLayout.
Positioned over this are a series of transparent Views placed in each 
corner as "hotspots".
Their only purpose is to capture tap/click events.

However, I do not see how I can let dragging events be passed onto the 
underlying ScrollView.
This is needed as these hotspots are large.

Is there a "simple" way of doing this ?

-- 
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] Re: Fragment animations using objectAnimator to slide over the previous fragment

2014-06-06 Thread Simon Giddings
Thanks for this Harri,

Tried it, to no avail.
In fact, what I have found is that the new fragment, when it is animated 
in, comes in *under* the existing fragment.
What I need is for it to be inserted *over* or *before* the existing 
fragment.
Cannot see how to do  this.

Not too happy about ViewPager as it is in the support library - which for 
me means that it is not stable code, at least not as stable as system code.

Any other thoughts ?

On Friday, 6 June 2014 15:16:22 UTC+2, Harri Smatt wrote:
>
> Hmm.. Maybe I misunderstood the problem but does it help if you simply use 
> non-transparent Fragment background colour?
> On Jun 6, 2014 2:14 PM, "Simon Giddings"  > wrote:
>
>> Thanks for your suggestion.
>> No, you are right, I have not considered this as yet (didn't know I could 
>> to be honest).
>> I'll look into this option, unless anyone else has already done this and 
>> could share here ?
>>
>> On Friday, 6 June 2014 10:10:44 UTC+2, Doug wrote:
>>>
>>> I have not thought through this myself thoroughly, but have you 
>>> considered using a FragmentPagerAdapter with a ViewPager?
>>>
>>> Doug
>>>
>>> On Thursday, June 5, 2014 11:41:02 AM UTC-7, Simon Giddings wrote:
>>>>
>>>>
>>>> I have seen the kind of effect I want being demonstrated with the 
>>>> ViewPager 
>>>> <http://developer.android.com/training/animation/screen-slide.html#depth-page>
>>>>  
>>>> - but I am using Fragments.
>>>> Can this kind of transition (just the moving in from the left bit shown 
>>>> at the end) be achieved with fragment animation ?
>>>>
>>>  -- 
>> 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] Re: Fragment animations using objectAnimator to slide over the previous fragment

2014-06-06 Thread Simon Giddings
Thanks for your suggestion.
No, you are right, I have not considered this as yet (didn't know I could 
to be honest).
I'll look into this option, unless anyone else has already done this and 
could share here ?

On Friday, 6 June 2014 10:10:44 UTC+2, Doug wrote:
>
> I have not thought through this myself thoroughly, but have you considered 
> using a FragmentPagerAdapter with a ViewPager?
>
> Doug
>
> On Thursday, June 5, 2014 11:41:02 AM UTC-7, Simon Giddings wrote:
>>
>>
>> I have seen the kind of effect I want being demonstrated with the 
>> ViewPager 
>> <http://developer.android.com/training/animation/screen-slide.html#depth-page>
>>  
>> - but I am using Fragments.
>> Can this kind of transition (just the moving in from the left bit shown 
>> at the end) be achieved with fragment animation ?
>>
>

-- 
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] Fragment animations using objectAnimator to slide over the previous fragment

2014-06-05 Thread Simon Giddings
After having spent quite a bit of time searching for this, I need to 
request help here.

I have a series of fragments each representing a "page".
I want to give the user a nice animation effect when going to the next page 
he has requested.

I want that the new fragment slides in *over* the previous fragment, hiding 
it as if it were a solid page.
At present I can slide in the new fragment, but we can still see the 
underlying fragment during the transition.

Here is my "slide in" transition definition :

http://schemas.android.com/apk/res/android";
android:fillAfter="false" >




And here is my fade out transition
http://schemas.android.com/apk/res/android"; 
android:fillAfter="false" >



I apply it with :
Fragment f = (Fragment)FragClass.newInstance();
FragmentTransactionft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(R.animator.fragment_slide_in, 
R.animator.fragment_fade_out);
ft.replace(R.id.fl_frame, f);
ft.commit();

I have seen the kind of effect I want being demonstrated with the ViewPager 
 
- but I am using Fragments.
Can this kind of transition (just the moving in from the left bit shown at 
the end) be achieved with fragment animation ?

-- 
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] Unable to see installed app via DDMS

2014-05-27 Thread Simon Giddings
I have just purchased and received my Samsung Galaxy Tab Pro 10.1 tablet 
(Android 4.4.2).
Just got over the panic of not seeing the developer options in settings = 
had to tap 7 times on the version number to get this displayed.

Now, I have started a debug session to install my app for continuing 
development.
I need to add data files to the installation location, but when I go into 
DDMS file explorer, it refuses to open the /data directory.
Is there a way of opening this, somehow ?

The file permissions are : drwxrwx--x
I presume that I will need to change it to drwxrwxrwx ?

Is this 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
--- 
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] Creating a custom PreferenceScreen for configuring connected devices

2014-05-23 Thread Simon Giddings
My app will receive input from external bluetooth devices.
I want to be able to let the user configure the application according to 
the paired device present.

The obvious place for this is within the shared preference activity.
As I am only targeting tablets for this, I was wanting to take advantage of 
the side-by-side display as shown here =>


So, the right hand screen (2) will need to permit the selection of the 
supported device, display a picture of it and permit the configuring of 
relevant parts.

Should I be deriving a new class from PreferenceScreen for this ?
If so, what do I need to do to get this form of flexibility ?
Is there a better way ?

-- 
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] Re: How to calculate a tablets resolution before purchasing the tablet

2014-05-22 Thread Simon Giddings
Great Tobias,

This is a great help, thank you for taking the time to put this here !

On Wednesday, 21 May 2014 21:37:20 UTC+2, Tobias wrote:
>
> I found this dpi/ppi calculator to be useful: http://www.sven.de/dpi/
> It will give you the actual physical dpi. Taking this value and then 
> rounding it to the closet dpi bucket (
> http://developer.android.com/reference/android/util/DisplayMetrics.html) 
> would be a good bet, even though the manufacturer could choose a different 
> bucket.
>
> Tobias
>
> Den onsdagen den 16:e april 2014 kl. 09:14:48 UTC+2 skrev Simon Giddings:
>>
>> Thank you Marina for your reply which is much more useful.
>>
>> Even if it means that I am stuck at this point.  After all, as 
>> independent developers, we are not all sufficiently rich to be able to 
>> purchase a number of tablet devices to be able to run our tests.
>>
>> Thank you again Marina, I won't be wasting my time searching further.
>>
>> On Tuesday, 15 April 2014 15:27:10 UTC+2, Marina Cuello wrote:
>>>
>>> You can search for/make an app that detects the bucket and install it, 
>>> if you have access to the device. A quick search gives me 
>>> https://play.google.com/store/apps/details?id=com.pmc.android.checkscreensize,
>>>  
>>> but there are plenty.
>>> Otherwise, as far as I can recall it depends on the manufacturer's 
>>> decision which bucket it takes. So no, you can't "calculate" the bucket 
>>> given the physical screen size and dpi specs.
>>>
>>> Marina
>>>
>>>
>>> On Tue, Apr 15, 2014 at 4:06 AM, Simon Giddings wrote:
>>>
>>>> The "effort" I made did not reveal this result and it certainly does 
>>>> not answer the question !
>>>>
>>>> My question was more general, if you hadn't noticed.
>>>> Given that most tablets will give a horizontal and vertical pixel size 
>>>> as well as a diagonal size in inches, is it possible to determine the 
>>>> density bucket (to use googles term) ie: MDPI or HDPI or XHDPI, etc
>>>>
>>>> From what you have managed to find, this device would appear to fall 
>>>> between two buckets - HDPI and XHDPI because
>>>> - HDPI screens are ~240dpi
>>>> - XHDPI screens are ~320dpi
>>>> (according to Supporting Multiple 
>>>> Screens<http://developer.android.com/guide/practices/screens_support.html>
>>>> )
>>>>
>>>> So the question remains open 
>>>>
>>>>
>>>> On Monday, 14 April 2014 20:21:31 UTC+2, Chris wrote:
>>>>>
>>>>> Googling the exact phrase "Toshiba eXcite Pro AT10LE-A-10D screen DPI" 
>>>>> yields in the first result a screen DPI of 300.  
>>>>>
>>>>> At least give it an effort.
>>>>>
>>>>> - C
>>>>>
>>>>> On Tuesday, April 1, 2014 3:28:39 AM UTC-4, Simon Giddings wrote:
>>>>>>
>>>>>> I am looking at buying a Toshiba eXcite Pro AT10LE-A-10D, which 
>>>>>> boasts a screen resolution of 2560 x 1600 pixels for a screen diagonal 
>>>>>> of 
>>>>>> 10.1.
>>>>>>
>>>>>> Is it possible to calculate the DP value - ie MDPI / HDPI / XHDPI etc 
>>>>>> ?
>>>>>>
>>>>>> I haven't been able to find any form of developer support on the 
>>>>>> toshiba web site, which could have helped.
>>>>>>  
>>>>>  -- 
>>>> 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.


Re: [android-developers] Re: How to calculate a tablets resolution before purchasing the tablet

2014-04-16 Thread Simon Giddings
Thank you Marina for your reply which is much more useful.

Even if it means that I am stuck at this point.  After all, as independent 
developers, we are not all sufficiently rich to be able to purchase a 
number of tablet devices to be able to run our tests.

Thank you again Marina, I won't be wasting my time searching further.

On Tuesday, 15 April 2014 15:27:10 UTC+2, Marina Cuello wrote:
>
> You can search for/make an app that detects the bucket and install it, if 
> you have access to the device. A quick search gives me 
> https://play.google.com/store/apps/details?id=com.pmc.android.checkscreensize,
>  
> but there are plenty.
> Otherwise, as far as I can recall it depends on the manufacturer's 
> decision which bucket it takes. So no, you can't "calculate" the bucket 
> given the physical screen size and dpi specs.
>
> Marina
>
>
> On Tue, Apr 15, 2014 at 4:06 AM, Simon Giddings 
> 
> > wrote:
>
>> The "effort" I made did not reveal this result and it certainly does not 
>> answer the question !
>>
>> My question was more general, if you hadn't noticed.
>> Given that most tablets will give a horizontal and vertical pixel size as 
>> well as a diagonal size in inches, is it possible to determine the density 
>> bucket (to use googles term) ie: MDPI or HDPI or XHDPI, etc
>>
>> From what you have managed to find, this device would appear to fall 
>> between two buckets - HDPI and XHDPI because
>> - HDPI screens are ~240dpi
>> - XHDPI screens are ~320dpi
>> (according to Supporting Multiple 
>> Screens<http://developer.android.com/guide/practices/screens_support.html>
>> )
>>
>> So the question remains open 
>>
>>
>> On Monday, 14 April 2014 20:21:31 UTC+2, Chris wrote:
>>>
>>> Googling the exact phrase "Toshiba eXcite Pro AT10LE-A-10D screen DPI" 
>>> yields in the first result a screen DPI of 300.  
>>>
>>> At least give it an effort.
>>>
>>> - C
>>>
>>> On Tuesday, April 1, 2014 3:28:39 AM UTC-4, Simon Giddings wrote:
>>>>
>>>> I am looking at buying a Toshiba eXcite Pro AT10LE-A-10D, which boasts 
>>>> a screen resolution of 2560 x 1600 pixels for a screen diagonal of 10.1.
>>>>
>>>> Is it possible to calculate the DP value - ie MDPI / HDPI / XHDPI etc ?
>>>>
>>>> I haven't been able to find any form of developer support on the 
>>>> toshiba web site, which could have helped.
>>>>  
>>>  -- 
>> 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] Re: How to calculate a tablets resolution before purchasing the tablet

2014-04-15 Thread Simon Giddings
The "effort" I made did not reveal this result and it certainly does not 
answer the question !

My question was more general, if you hadn't noticed.
Given that most tablets will give a horizontal and vertical pixel size as 
well as a diagonal size in inches, is it possible to determine the density 
bucket (to use googles term) ie: MDPI or HDPI or XHDPI, etc

>From what you have managed to find, this device would appear to fall 
between two buckets - HDPI and XHDPI because
- HDPI screens are ~240dpi
- XHDPI screens are ~320dpi
(according to Supporting Multiple 
Screens<http://developer.android.com/guide/practices/screens_support.html>
)

So the question remains open 

On Monday, 14 April 2014 20:21:31 UTC+2, Chris wrote:
>
> Googling the exact phrase "Toshiba eXcite Pro AT10LE-A-10D screen DPI" 
> yields in the first result a screen DPI of 300.  
>
> At least give it an effort.
>
> - C
>
> On Tuesday, April 1, 2014 3:28:39 AM UTC-4, Simon Giddings wrote:
>>
>> I am looking at buying a Toshiba eXcite Pro AT10LE-A-10D, which boasts a 
>> screen resolution of 2560 x 1600 pixels for a screen diagonal of 10.1.
>>
>> Is it possible to calculate the DP value - ie MDPI / HDPI / XHDPI etc ?
>>
>> I haven't been able to find any form of developer support on the toshiba 
>> web site, which could have helped.
>>
>

-- 
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] Seeking layout advice

2014-04-04 Thread Simon Giddings
I am working on an application where the user can create a list of items 
(songs).
The user can also add a text block to the list - text to be read as an 
introduction to the next sequence of songs, for example.

It is with this "text editer" activity that I am having trouble deciding 
where to put things.
I am displaying it as a dialog and have therefore placed "cancel" and "ok" 
buttons at the bottom of the layout.
However, this means that they are hidden by the virtual keyboard when the 
focus is on the edittext widget.

In addition, I wanted to add the ability to paste text copied from 
elsewhere - another app, a web page.

After having looked in the design guides ... I am no further forward.

Should I rather be placing the cancel and ok buttons at the top of the 
layout ?
Should this rather be a full screen activity where I use the action bar to 
place a paste button ?
If I do this, should the cancel and ok buttons also be in the action bar ?

I hope someone can advise me with this as I am stuck at this point.

-- 
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] How to calculate a tablets resolution before purchasing the tablet

2014-04-01 Thread Simon Giddings
I am looking at buying a Toshiba eXcite Pro AT10LE-A-10D, which boasts a 
screen resolution of 2560 x 1600 pixels for a screen diagonal of 10.1.

Is it possible to calculate the DP value - ie MDPI / HDPI / XHDPI etc ?

I haven't been able to find any form of developer support on the toshiba 
web site, which could have helped.

-- 
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: Padding offsets for a TextView to perfectly align with an EditText

2014-03-28 Thread Simon Giddings
I agree, in the same way as using the relative alignments above.
However, as I stated, the displayed text is *not* at the same position - 
the EditText widget is higer and so there are offsets applied to the 
beginning of the text.


On Friday, 28 March 2014 00:21:52 UTC+1, yaturner wrote:
>
> Try wrapping  both views in a FrameLayout. That should guarantee that they 
> both occupy the same space 

-- 
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] Padding offsets for a TextView to perfectly align with an EditText

2014-03-26 Thread Simon Giddings
I am building a layout where text is displayed in a TextView.
When the user taps on the text, I want to display an EditText widget to 
allow for the text to be modified.

I use a relative layout to ensure have the two widgets in the same position.
The edit text is declared first and then the the TextView is made to align 
to the top and bottom of the EditText.

However, I have seen that the text displayed in the EditText is offset down 
and to the left.
I need to ensure that, for the user, the text does not appear to move at 
all when "switching" to the EditText.

Do I need to use padding values to align the text displays ?
If I do, is this guaranteed to work on all displays ?

Here is the relevant part of my layout :










-- 
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: Seperate display on HDMI device

2014-02-24 Thread Simon Giddings
After having looked at this, it would seem to be a bit overkill.
Is there not another, more "direct" way to output to an HDMI display ?

On Saturday, 22 February 2014 07:20:32 UTC+1, gjs wrote:
>
> Hi
>
> Try https://developers.google.com/cast/
>
> Regards
>
>

-- 
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] Seperate display on HDMI device

2014-02-21 Thread Simon Giddings
I am creating an application which needs to display on an HDMI connected 
screen, display content which is different to that displayed on the tablet.

This could be used in the context of presentations where the presenters 
notes are only displayed on the tablet and the "illustration" content on 
the HDMI output device.

Is there any resource which describes how to go about writing specifically 
to the HDMI output screen ?
Tutorials even ?

-- 
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] ActionBar strange behaviour

2013-11-22 Thread Simon Giddings


I am writing an application for Android tablets - version 4.0 (min sdk 14)

Here is the content at the start of the activity :



When I click (I am working in the emulator) on the plus button (to zoom in 
one level),  this is the result :





If I remove the TextView control at the head of the ActionBar, this is the 
resulting visual behaviour :





The number button is defined in the menu as -



The layout file is defined as

http://schemas.android.com/apk/res/android";
android:id="@+id/tv_songnumber"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_gravity="center_vertical"
android:clickable="true"
android:textSize="29dp" />

The menu is modified via the method onPrepareOptionsMenu

The content of this method is like this :

@Override
public boolean onPrepareOptionsMenu(Menu menu)
{
boolean bOk = super.onPrepareOptionsMenu(menu);
TextView tv;
int iZoomLevel = m_ZoomListHandler.GetCurrentPosition();

if(bOk)
{
menu.findItem(R.id.partition_zoomin).setEnabled(iZoomLevel < 7);
menu.findItem(R.id.partition_zoomout).setEnabled(iZoomLevel > 
0);

// set the songnumber
tv = (TextView)menu.findItem(R.id.partion_songnumber)
.getActionView();
tv.setText(String.format("%d", m_iSongNumber));
}

return true;
}
I have tried searching for why this happens, with no success.

Can anyone help me resolve this ?

-- 
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] ListPopupWindow - align to right edge of the anchor

2013-10-15 Thread Simon Giddings
I am creating a custom drop down "menu" initiated from the action bar in a 
tablet application.
When the button is pressed in the action bar, I need the ListPopupWindow to 
align it's right edge with the right edge of the action view "button".

However, I have not be able to find how to do this.
Can it be done - or will I need to create my own implementation of this ?

-- 
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] Correcting the styles of a drop down spinner in the ActionBar

2013-10-09 Thread Simon Giddings
I am using the following theme : Theme.Holo.Light.DarkActionBar
My application targets a minimum SDK of v14 and I am inserting a spinner to 
enable selection of items - ie this is NOT navigation.

I have been searching for the correct way to correct the styling of the 
spinner so that it is visible within the actionbar - at present it is dark 
on dark.

How do I assign the correct, existing, system, holo styles to the spinner 
to get it to display correctly ?
I would prefer to not have to re-create the styles and have to copy 
resources from the SDK files if possible.

-- 
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] Correcting the style of a drop down spinner in ActionBar

2013-10-09 Thread Simon Giddings
I am using the following theme : Theme.Holo.Light.DarkActionBar
My application targets a minimum SDK of v14 and I am inserting a spinner to 
enable selection of items - ie this is NOT navigation.

I have been searching for the correct way to correct the styling of the 
spinner so that it is visible within the actionbar - at present it is dark 
on dark.

How do I assign the correct, existing, system, holo styles to the spinner 
to get it to display correctly ?
I would prefer to not have to re-create the styles and have to copy 
resources from the SDK files if possible.

-- 
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] Navigation Drawer, Activities and Fragments

2013-09-28 Thread Simon Giddings
I am a bit confused here with this.

With the examples that I have seen for using the Navigation Drawer, they 
all point to using one unique Activity, with Fragments giving the actual 
content.
The advantage with this is that there is only one instance of the 
Navigation Drawer created.

However, in my application, I have distinct Activities which have distinct 
tasks (and, yes, there are indeed more than three).
Should I therefore be creating the same navigation drawer in each Activity ?
It is obvious that I would like to be able to preserve my existing 
activities and not have to re-write them as fragments.

My understanding is that fragments are not activities and activities are 
not fragments, are they ?

Have I correctly understood this ?
Can anyone give some advice 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
--- 
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] Navigation Drawer and using - over sized - icons

2013-09-28 Thread Simon Giddings
I would like to be able to use oversized icons within the Navigation Drawer 
listview items.

However, I have seen that, even if I put larger icons in the resource 
directories, they are all scaled down.
This is for working exclusively within a tablet application.

Is there a way around this automatic re-scaling ?

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


Re: [android-developers] Navite Navigation Drawer

2013-09-27 Thread Simon Giddings
Well my, previous, understanding was that the support library was to 
provide functionality found in the most recent APIs, for earlier APIs.
So, stuff in the v4.0 could be used in v2.3 via the support library.

Perhaps you could clear something up for me.
When I use just *one *item in the support library, will I get *only* that 
item included in my apps files, or will *all of the support library* be 
packaged all the same ?

On Friday, September 27, 2013 2:05:31 PM UTC+2, alice wrote:
>
> So what if it is in the support library?. it is as native as it could 
> be!
>
>
> On Thu, Sep 26, 2013 at 10:50 AM, Simon Giddings 
> 
> > wrote:
>
>> I have seen the Navigation Drawer and am interested in it for my v4.1 
>> tablet application.
>> However, I see that the documentation describes it as being within the 
>> support library.
>>
>> My understanding was that this library was mainly for apps in and before 
>> v2.3 of android.
>>
>> Is there not a "native" version of this feature available, or are we 
>> "condemned" to using the support library ?
>>  
>> -- 
>> 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/groups/opt_out.
>>
>
>

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


[android-developers] Navite Navigation Drawer

2013-09-26 Thread Simon Giddings
I have seen the Navigation Drawer and am interested in it for my v4.1 
tablet application.
However, I see that the documentation describes it as being within the 
support library.

My understanding was that this library was mainly for apps in and before 
v2.3 of android.

Is there not a "native" version of this feature available, or are we 
"condemned" to using the support library ?

-- 
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: Dispalying PDF files within a tablet application

2013-05-13 Thread Simon Giddings
Because the users will be opening PDF files and not images !

On Monday, 13 May 2013 16:31:28 UTC+2, bob wrote:
>
> Why not just use an image?
>
> Thanks.
>
>
> On Saturday, May 11, 2013 10:33:23 AM UTC-5, Simon Giddings wrote:
>>
>> I have seen that this topic has been raised a number of times over the 
>> last few years.
>> I am surprised that Google has not thought of adding a native API to 
>> "keep up" with the other side (IOS and iPad).
>>
>> I am needing to display PDF files of sheet music within my application
>> - this might be a scanned image
>> - or a real "print" to PDF format, which means mixed text and image
>>
>> Commercial libraries are way over priced for what I could ever hope for 
>> in terms of revenue as this will be distributed in France to 
>> evangelical/protestant churches.
>> So I will not be able to charge high prices for this.
>>
>> Can anyone recommend a good, robust PDF display engine which will allow 
>> me to determine how the user can navigate within the file, zoom levels, etc 
>> ?
>> Or perhaps there is a commercial engine provider who would be willing to 
>> make a commercial gesture for this case ? :-D
>>
>
On Monday, 13 May 2013 16:31:28 UTC+2, bob wrote:
>
> Why not just use an image?
>
> Thanks.
>
>
> On Saturday, May 11, 2013 10:33:23 AM UTC-5, Simon Giddings wrote:
>>
>> I have seen that this topic has been raised a number of times over the 
>> last few years.
>> I am surprised that Google has not thought of adding a native API to 
>> "keep up" with the other side (IOS and iPad).
>>
>> I am needing to display PDF files of sheet music within my application
>> - this might be a scanned image
>> - or a real "print" to PDF format, which means mixed text and image
>>
>> Commercial libraries are way over priced for what I could ever hope for 
>> in terms of revenue as this will be distributed in France to 
>> evangelical/protestant churches.
>> So I will not be able to charge high prices for this.
>>
>> Can anyone recommend a good, robust PDF display engine which will allow 
>> me to determine how the user can navigate within the file, zoom levels, etc 
>> ?
>> Or perhaps there is a commercial engine provider who would be willing to 
>> make a commercial gesture for this case ? :-D
>>
>

-- 
-- 
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] Dispalying PDF files within a tablet application

2013-05-11 Thread Simon Giddings
I have seen that this topic has been raised a number of times over the last 
few years.
I am surprised that Google has not thought of adding a native API to "keep 
up" with the other side (IOS and iPad).

I am needing to display PDF files of sheet music within my application
- this might be a scanned image
- or a real "print" to PDF format, which means mixed text and image

Commercial libraries are way over priced for what I could ever hope for in 
terms of revenue as this will be distributed in France to 
evangelical/protestant churches.
So I will not be able to charge high prices for this.

Can anyone recommend a good, robust PDF display engine which will allow me 
to determine how the user can navigate within the file, zoom levels, etc ?
Or perhaps there is a commercial engine provider who would be willing to 
make a commercial gesture for this case ? :-D

-- 
-- 
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] Seeking font tool

2013-05-02 Thread Simon Giddings
Does anyone know of a tool to correctly convert a truetype font so that it 
is compatible with Android ?
At least with Android 4.0.

-- 
-- 
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] Emulator plus HAXM blocks hibernation

2013-04-29 Thread Simon Giddings
I am developing a tablet app and have installed HAXM release 03 from intel.

When I want to put my PC into hibernate mode (Dell Vostro 1710 - Windows XP 
Pro SP3), I exit the emulator and eclipse, before going to hibernate mode.

However, the screen goes black and then nothing else occurs, leaving the 
only choice of turning off via the power button.

Has anyone else had this problem ?
Is there a workaround, fix ?

-- 
-- 
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] How to compress text data before saving in a database

2013-04-20 Thread Simon Giddings
I have a more than 800 records of data, of which each record will contain a 
variable size of text data.
It is this text data (anything between 800 bytes and 4kb) which I need to 
compress before putting it into the database.

It doesn't matter if the saving of the data is a bit long, it will be the 
reading and decompressing which needs to be fast and efficient.

Note that I am targetting tablet devices here.

Is there a recommended / best way to go about this ?

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




Re: [android-developers] Re: Optimise drawing speed

2013-04-01 Thread Simon Giddings
Thank you for the comments.
Yes you are right, I am targeting Android 4.0+.
I'll keep with my current rendering choice then.

On Monday, 1 April 2013 00:19:49 UTC+2, Romain Guy (Google) wrote:
>
> On Mar 31, 2013 12:15 PM, "Jason" > 
> wrote:
> >
> > My first reaction is that if you really want render speed then you need 
> to be leveraging the GPU which is going to be most reliable with OpenGL (as 
> I understanding it more recent versions of Android will actually hardware 
> accelerate for you, but there are many variables that affect whether this 
> works, not least of which is the Android version running on the user's 
> device).
>
> There are only two variables: are you running Android 3.0+ and are you 
> using supported operations.
>
> In this particular case I doubt using OpenGL directly is necessary. 
> Android tablets run on Android 3.0+ so you can simply rely on built-in 
> hardware acceleration. Your first step should be to test your app with 
> hardware acceleration on and see whether you are running into 
>

-- 
-- 
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] Optimise drawing speed

2013-03-31 Thread Simon Giddings
I am writing a music notation app for android tablets.
As I draw everything (ie. this is not a "simple" image (jpg, pdf, etc) 
which needs displaying), I need to ensure that the choice of drawing method 
is the fastest possible.

My options, as I see them at present, are

   1. Classic on-screen drawing.
   2. Draw on a memory based canvas and bitblt the resulting bitmap onto 
   the screen

Will either option give better rendering time results ?

I have chosen to use classic drawing methods, rather than an OpenGL type 
surface.
Is this a mistake ?

Any help will be appreciated.
Thank you

-- 
-- 
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] High Resolution Application Icon Spec

2013-02-12 Thread Simon Giddings
In the current spec, the high resolution application icon said to have to 
be a 32bit PNG.
However, in the version of photoshop I have, I can only output to a 24bit 
PNG.

Is this acceptable or will my images be rejected ?

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




Re: [android-developers] Unable to obtain Google Maps Android v1 API Key

2013-02-08 Thread Simon Giddings
Thanks for that Mark, it works great.
Sorry to not have replied before, but I didn't have a working connection.

On Thursday, 7 February 2013 17:23:07 UTC+1, Mark Murphy (a Commons Guy) 
wrote:
>
> Add -v to your list of command-line switches. 
>
> On Thu, Feb 7, 2013 at 11:13 AM, Simon Giddings 
> > 
> wrote: 
> > Yep, you are right, I am getting the SHA-1 hash. 
> > Looked at the command line options and cannot see how I can force MD5 
> > output. 
> > Can you help here ? 
> > 
> > 
> > On Thursday, 7 February 2013 17:02:50 UTC+1, Mark Murphy (a Commons Guy) 
> > wrote: 
> >> 
> >> It just worked for me. Make sure that you are using MD5 -- if you have 
> >> Java 7 installed, you might be getting the SHA-1 hash instead, for 
> >> example. 
> >> 
> >> On Thu, Feb 7, 2013 at 10:28 AM, Simon Giddings  
> >> wrote: 
> >> > I have followed the instructions to create a private key and then 
> obtain 
> >> > the 
> >> > MD5 signature. 
> >> > I paste this signature into the signup input field and click submit. 
> >> > 
> >> > I then get a page which says that the MD5 signature is incorrect ! 
> >> > Tried with and without the colons (:). 
> >> > 
> >> > Has the key generation been disabled, even though documentation 
> states 
> >> > that 
> >> > it will be open until 3 Mars ? 
> >> > 
> >> > -- 
> >> > -- 
> >> > 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/groups/opt_out. 
> >> > 
> >> > 
> >> 
> >> 
> >> 
> >> -- 
> >> Mark Murphy (a Commons Guy) 
> >> http://commonsware.com | http://github.com/commonsguy 
> >> http://commonsware.com/blog | http://twitter.com/commonsguy 
> >> 
> >> _The Busy Coder's Guide to Android Development_ Version 4.5 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-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/groups/opt_out. 
> > 
> > 
>
>
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.5 Available! 
>

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




Re: [android-developers] Unable to obtain Google Maps Android v1 API Key

2013-02-07 Thread Simon Giddings
Yep, you are right, I am getting the SHA-1 hash.
Looked at the command line options and cannot see how I can force MD5 
output.
Can you help here ?

On Thursday, 7 February 2013 17:02:50 UTC+1, Mark Murphy (a Commons Guy) 
wrote:
>
> It just worked for me. Make sure that you are using MD5 -- if you have 
> Java 7 installed, you might be getting the SHA-1 hash instead, for 
> example. 
>
> On Thu, Feb 7, 2013 at 10:28 AM, Simon Giddings 
> > 
> wrote: 
> > I have followed the instructions to create a private key and then obtain 
> the 
> > MD5 signature. 
> > I paste this signature into the signup input field and click submit. 
> > 
> > I then get a page which says that the MD5 signature is incorrect ! 
> > Tried with and without the colons (:). 
> > 
> > Has the key generation been disabled, even though documentation states 
> that 
> > it will be open until 3 Mars ? 
> > 
> > -- 
> > -- 
> > 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/groups/opt_out. 
> > 
> > 
>
>
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.5 Available! 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To 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] Unable to obtain Google Maps Android v1 API Key

2013-02-07 Thread Simon Giddings
I have followed the instructions to create a private key and then obtain 
the MD5 signature.
I paste this signature into the signup input field and click submit.

I then get a page which says that the MD5 signature is incorrect !
Tried with and without the colons (:).

Has the key generation been disabled, even though documentation states that 
it will be open until 3 Mars ?

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




Re: [android-developers] Creating data files as compiled (binary) xml

2012-12-06 Thread Simon Giddings
Hi Mark,

"Why" - to create my data files - sheet music data - and distribute them in 
a fairly protected manner.
Yes, I am indeed referring to the xml binary format used by the build 
process.

On Thursday, 6 December 2012 17:33:40 UTC+1, Mark Murphy (a Commons Guy) 
wrote:
>
> On Thu, Dec 6, 2012 at 11:27 AM, Simon Giddings 
> > 
> wrote: 
> > I am developing a tablet application where I want my data files to be 
> stored 
> > as compiled xml. 
>
> Why? 
>
> Furthermore, what do you consider "compiled xml" to be? 
>
> If you are referring to the binary XML format created by the build 
> process for XML resources, you would have to root around in the source 
> code to find both the "compiler" and their version of the 
> XmlPullParser that reads it in, and modify those to suit your needs. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Android Training in DC: http://marakana.com/training/android/ 
>

-- 
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] Creating data files as compiled (binary) xml

2012-12-06 Thread Simon Giddings
I am developing a tablet application where I want my data files to be 
stored as compiled xml.
The application will not, itself, be creating these files.
These files will be added at a later stage - the user will be able to 
purchase them separately.

So, my question is, how can I create the compiled xml in a format which I 
can then read within my application ?
Is this even possible, or will I need to create my own "compiler" ?

-- 
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: Scaling emulator size to real size from eclipse

2012-12-03 Thread Simon Giddings
Ok, found it !

I need to specify the emulator options 
(http://developer.android.com/tools/help/emulator.html) within the target 
parameters for the emulator :
Project Properties -> Run/Debug settings -> Edit -> Target -> Emulator 
Launch parameters

Just needed to search abit first of all.
Hope this will help others

On Monday, 3 December 2012 11:43:22 UTC+1, Simon Giddings wrote:
>
> I know that we can start the emulator from the AVD manager and use the 
> Scale to real size parameters.
>
> However, when the emulator is started from within eclipse via a debug 
> request, it will start a new instance of the emulator without scaling the 
> window size.
> How can I start the emulator from a debug request within eclipse and 
> include the scaling parameters?
>

-- 
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] Scaling emulator size to real size from eclipse

2012-12-03 Thread Simon Giddings
I know that we can start the emulator from the AVD manager and use the 
Scale to real size parameters.

However, when the emulator is started from within eclipse via a debug 
request, it will start a new instance of the emulator without scaling the 
window size.
How can I start the emulator from a debug request within eclipse and 
include the scaling parameters?

-- 
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] extend class and constructors

2012-11-29 Thread Simon Giddings
This may seem a bit basic, but I come from a C++ background and it is 
confusing me a little.

When I extend a base class, do I need to create a constructor for each base 
class constructor ?
What I mean is this. Given :

public class base
{
protected int m_iValue;

public base()
{
m_iValue = 0;
}

public base(int iVal)
{
m_iValue = iVal;
}
}

If I want to create a new class based on this base class, will I need to 
declare the two constructors again for them to be visible ?
The following seems to hide the second constructor of the base class.

public class Derived extends base
{
public Derived()
{
super();
}
}

What is the correct way to do this ?

-- 
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: Intel x86 image for 4.1.2

2012-11-29 Thread Simon Giddings
The only way I found to get this to work is to reboot the system.
A bit extreme, but it works.

On Thursday, 29 November 2012 11:24:53 UTC+1, Simon Giddings wrote:
>
> I have installed the intel x86 image for 4.1.2 (API 16) via the SDK 
> Manager.
> Now, when I go into the AVD Manager and select a target of "Android 4.1.2 
> - API Level 16", it still automatically selects the ARM CPU/ABI and 
> disables the dropdown list.
>
> How do I get it to recognise that the x86 system image has been installed 
> and is 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] Intel x86 image for 4.1.2

2012-11-29 Thread Simon Giddings
I have installed the intel x86 image for 4.1.2 (API 16) via the SDK Manager.
Now, when I go into the AVD Manager and select a target of "Android 4.1.2 - 
API Level 16", it still automatically selects the ARM CPU/ABI and disables 
the dropdown list.

How do I get it to recognise that the x86 system image has been installed 
and is 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

Re: [android-developers] Defining custom xml file in eclipse

2012-11-26 Thread Simon Giddings
I thought the xml editor was specific to the Android SDK

On Monday, 26 November 2012 20:33:23 UTC+1, TreKing wrote:
>
> On Mon, Nov 26, 2012 at 10:55 AM, Simon Giddings 
> 
> > wrote:
>
>> Is this possible ?
>> If so, how do I go about this ?
>>
>
> Sounds like your questions are specific to Eclipse and not Android 
> Development. Try the Eclipse docs or an Eclipse-specific group or forum.
>
>
> -
> 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] Re: Defining custom xml file in eclipse

2012-11-26 Thread Simon Giddings
I don't see how this will help.
I need to inform eclipse what the format of my custom xml is - tag names, 
attribute names, etc

On Monday, 26 November 2012 19:38:13 UTC+1, bob wrote:
>
> Maybe add something like this to your first tag:
>
>  xmlns:android="http://schemas.android.com/apk/res/android";
>
>
> On Monday, November 26, 2012 10:55:50 AM UTC-6, Simon Giddings wrote:
>>
>> I have a series of custom xml data files that I need to create.
>> I would like to tell eclipse what its format is so that when I do a 
>> CTRL+SPACE, it will give me the possible node or attribute options.
>>
>> Is this possible ?
>> If so, how do I go about this ?
>>
>

-- 
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] Defining custom xml file in eclipse

2012-11-26 Thread Simon Giddings
I have a series of custom xml data files that I need to create.
I would like to tell eclipse what its format is so that when I do a 
CTRL+SPACE, it will give me the possible node or attribute options.

Is this possible ?
If so, how do I go about this ?

-- 
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: Drawing complex shapes with hollow parts

2012-11-23 Thread Simon Giddings
In fact, after doing some further work on this, this is what I have found :

The simplest way of achieving this is to 

   1. Create the path object
   2. Set the fill type to  Path.FillType.WINDING .
   3. "draw" the outline segments using lineTo, cubicTo, etc, ensuring that 
   the outline closes itself.
   4. "draw the inner holes, each one using a different direction. ie: if 
   the outline was drawn clockwise, then the first hole must be 
   anti-clockwise, the second clockwise, etc...
   5. Draw the path on the canvas with  Canvas.drawPath(...) .
   

-- 
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] Equivelant of NavUtils when not using the support library

2012-11-12 Thread Simon Giddings
I am starting to build an application which will only be distributed on 
tablets running Honeycomb or later.
I created my project specifying this and yet it still imports the support 
library.
So, I have been "cleaning" out all references to this and have come to a 
stop.

What am I to use to replace the support library class NavUtils ?
Can anyone help me with this ?

-- 
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 not in SDK manager list

2012-11-12 Thread Simon Giddings
I am using Eclipse Indigo service release 2.
The version of the ADK is 20.0.3.v201208082019-427395.

When I open the SDK Manager, I noticed that there is no mention of anything 
from Samsung.
Looking into the Add-on sites, Samsung is not there and the User Defined 
Sites is empty.

Are we able to get SDK and device stuff from Samsung via this method any 
more ?
If so, what do I need to put into the user defined sites to get this to 
work ?

-- 
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: Drawing complex shapes with hollow parts

2012-11-12 Thread Simon Giddings
Great, thanks for this

On Monday, 12 November 2012 15:27:32 UTC+1, Piren wrote:
>
> I haven't had any issues with hardware acceleration using porter duff, at 
> least not under the circumstances i had to use it in.
>
> just try it and see how it goes.
>
> On Monday, November 12, 2012 1:06:04 PM UTC+2, Simon Giddings wrote:
>>
>> Thank you for this.
>> One thing I am not clear with is the problem with hardware acceleration.
>> Some people say that this will not work with hardware acceleration ON, 
>> whilst others say that this is precisely what is needed when it is ON.
>>
>> Is there some definitive answer for this aspect ?
>>
>> On Monday, 12 November 2012 11:58:07 UTC+1, Piren wrote:
>>>
>>>
>>> http://stackoverflow.com/questions/11337679/porterduffxfermode-clear-a-section-of-a-bitmap
>>>
>>> On Monday, November 12, 2012 12:16:17 PM UTC+2, Simon Giddings wrote:
>>>>
>>>> I am needing to draw shapes which will have hollow regions.
>>>> To simplify the idea, take an ampersand sign : &
>>>> This is just to illustrate the kind of task I need to do.
>>>>
>>>> I can create the outline by using a path.
>>>> However, I have not been able to see how to create the two "holes" such 
>>>> that when the paths are painted, they will appear as ... holes.
>>>>
>>>> Can anyone guide me with this one ?
>>>>
>>>

-- 
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: Drawing complex shapes with hollow parts

2012-11-12 Thread Simon Giddings
Thank you for this.
One thing I am not clear with is the problem with hardware acceleration.
Some people say that this will not work with hardware acceleration ON, 
whilst others say that this is precisely what is needed when it is ON.

Is there some definitive answer for this aspect ?

On Monday, 12 November 2012 11:58:07 UTC+1, Piren wrote:
>
>
> http://stackoverflow.com/questions/11337679/porterduffxfermode-clear-a-section-of-a-bitmap
>
> On Monday, November 12, 2012 12:16:17 PM UTC+2, Simon Giddings wrote:
>>
>> I am needing to draw shapes which will have hollow regions.
>> To simplify the idea, take an ampersand sign : &
>> This is just to illustrate the kind of task I need to do.
>>
>> I can create the outline by using a path.
>> However, I have not been able to see how to create the two "holes" such 
>> that when the paths are painted, they will appear as ... holes.
>>
>> Can anyone guide me with this one ?
>>
>

-- 
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] Drawing complex shapes with hollow parts

2012-11-12 Thread Simon Giddings
I am needing to draw shapes which will have hollow regions.
To simplify the idea, take an ampersand sign : &
This is just to illustrate the kind of task I need to do.

I can create the outline by using a path.
However, I have not been able to see how to create the two "holes" such 
that when the paths are painted, they will appear as ... holes.

Can anyone guide me with this one ?

-- 
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] Specifying the language of the application

2012-08-30 Thread Simon Giddings
I need to create individual language versions of my application - due to 
resource size.

How can I specify the language of the application ?

I could not see how to do this within the manifest.
Is it only possible when creating the product in Google Play ?

-- 
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] Two independant ProgressBar instances

2012-08-27 Thread Simon Giddings
Ok, here is my layout :

http://schemas.android.com/apk/res/android";
android:id="@+id/PoiActionsTab"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >





















It is the second ProgressBar which does not show at runtime.
I do not hide it or the RelativeLayout container at the onCreate stage - 
have checked.


On Monday, 27 August 2012 19:27:30 UTC+2, TreKing wrote:
>
> On Mon, Aug 27, 2012 at 11:06 AM, Simon Giddings 
> 
> > wrote:
>
>> Is there a limit to only one ProgressBar per Activity ?
>>
>
> I can't imagine there would be.
>  
>
>> I have a layout which needs two independent progress bar instances, but 
>> only one is displayed at runtime.
>>
>
> Maybe you're doing something wrong? Perhaps a better explanation of your 
> problem and some sample code of what you're doing is in order?
>
>
> -
> 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] Two independant ProgressBar instances

2012-08-27 Thread Simon Giddings
Is there a limit to only one ProgressBar per Activity ?

I have a layout which needs two independent progress bar instances, but 
only one is displayed at runtime.
Why do I need two ?
Because they represent two separate progress actions.

-- 
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] Using a symbol font

2012-08-14 Thread Simon Giddings
Thanks Mark,

I had created a very simple project to try this out.
So, it would appear that I will have to look at a different method for 
drawing symbols.

Thanks again

On Tuesday, 14 August 2012 12:09:18 UTC+2, Mark Murphy (a Commons Guy) 
wrote:
>
> On Tue, Aug 14, 2012 at 5:46 AM, Simon Giddings 
> > 
> wrote: 
> > I have seen that it is possible to use custom fonts within our Android 
> apps. 
> > I am starting to build an app for tablets and need to use a specific 
> symbol 
> > font. 
> > 
> > I place it in a "font" directory under "assets" and load it via the 
> > Typeface.createFromAsset method. 
> > I get back a Typeface object and assign it to my Paint object and then 
> paint 
> > it out onto the canvas. 
> > 
> > However, instead of getting the symbols, I get normal text. 
> > 
> > Is there a special step necessary to get symbol fonts to output 
> correctly ? 
>
> Android does not honor all custom fonts, substituting the default font 
> silently. 
>
> I'd start with a font that is known to work, such as the one in this 
> sample project: 
>
> https://github.com/commonsguy/cw-omnibus/tree/master/Fonts/FontSampler 
>
> If that fails, then there is something wrong with the application 
> logic (or that font has started failing on devices, where it has 
> worked for years). If that font succeeds and your symbol font fails... 
> you will need to find another symbol font, or perhaps try slightly 
> modifying that symbol font in some font editor in hopes that the 
> newly-saved font will work with Android. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.0 Available! 
>

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

[android-developers] Using a symbol font

2012-08-14 Thread Simon Giddings
I have seen that it is possible to use custom fonts within our Android apps.
I am starting to build an app for tablets and need to use a specific symbol 
font.

I place it in a "font" directory under "assets" and load it via the 
Typeface.*createFromAsset* method.
I get back a Typeface object and assign it to my Paint object and then 
paint it out onto the canvas.

However, instead of getting the symbols, I get normal text.

Is there a special step necessary to get symbol fonts to output correctly ?

-- 
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] Canvas or OpenGL

2012-08-12 Thread Simon Giddings
Thank you Richard,

I tried to find examples, without success.
Do you know of any ?

On Sunday, 12 August 2012 10:49:10 UTC+2, RichardC wrote:
>
> Canvas does zooming, scaling, rotation, translation etc. via stackable 
> transformations see:
> http://developer.android.com/reference/android/graphics/Canvas.html 
> and look for functions like:
>
> save
>
> restore
>
> scale
>
> translate
>
> setMatrix
>
> etc...
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>
> On Sunday, August 12, 2012 9:44:47 AM UTC+1, Simon Giddings wrote:
>>
>> Thank you to every one for their responses.
>>
>> It would seem, however, that my question was not clear enough (you are 
>> right James).
>>
>> I am going to write a music notation app.
>> So, will "simply" be writing the music score on the display - no 
>> animation needed.
>> My question was about visual scaling - reproducing a "sheet of music 
>> paper" and then permitting the user to zoom in and out.
>> Hence the reference to world coordinate and screen coordinate conversions.
>>
>> Please note - this will *not* be using pdf documents !
>>
>> Can I still achieve this with Canvas ?
>> Is there an example of the correct way of producing this kind of scaling 
>> when using Canvas ?
>> I will be targeting tablet systems with this.
>>
>>
>> On Sunday, 12 August 2012 06:15:06 UTC+2, Dianne Hackborn wrote:
>>>
>>> On Sat, Aug 11, 2012 at 2:50 PM, James Black wrote:
>>>
>>>> Do you need a fast refresh rate for example?  One music program I wrote 
>>>> had to turn notes on and off at the correct millisecond, under windows; 
>>>> that accuracy won't work on mobile devices.
>>>>
>>> You can do 60fps drawing with either OpenGL or Canvas.  That is the best 
>>> you are going to get for accuracy since that is the screen refresh rate.
>>>
>>> -- 
>>> Dianne Hackborn
>>> Android framework engineer
>>> hac...@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

Re: [android-developers] Canvas or OpenGL

2012-08-12 Thread Simon Giddings
Thank you to every one for their responses.

It would seem, however, that my question was not clear enough (you are 
right James).

I am going to write a music notation app.
So, will "simply" be writing the music score on the display - no animation 
needed.
My question was about visual scaling - reproducing a "sheet of music paper" 
and then permitting the user to zoom in and out.
Hence the reference to world coordinate and screen coordinate conversions.

Please note - this will *not* be using pdf documents !

Can I still achieve this with Canvas ?
Is there an example of the correct way of producing this kind of scaling 
when using Canvas ?
I will be targeting tablet systems with this.


On Sunday, 12 August 2012 06:15:06 UTC+2, Dianne Hackborn wrote:
>
> On Sat, Aug 11, 2012 at 2:50 PM, James Black 
> > wrote:
>
>> Do you need a fast refresh rate for example?  One music program I wrote 
>> had to turn notes on and off at the correct millisecond, under windows; 
>> that accuracy won't work on mobile devices.
>>
> You can do 60fps drawing with either OpenGL or Canvas.  That is the best 
> you are going to get for accuracy since that is the screen refresh rate.
>
> -- 
> Dianne Hackborn
> Android framework engineer
> hac...@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] Canvas or OpenGL

2012-08-11 Thread Simon Giddings
I am going to start the development of a Music document app.
In the past, when I developed under widows, I used world coordinates and 
screen coordinates to provide scaling/zooming.

I am unclear as to weather I should go to OpenGL under Android, or if I 
could still use Canvas.

Can anyone advise me 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] Creating custom icons with Photoshop - dip

2012-08-06 Thread Simon Giddings
This subject is causing me some conceptual problems.

In the official documentation, it states that 1dip represents 1 pixel in a 
160dpi screen.
Does this mean that we should be creating graphic elements at a resolution 
of 160 dpi instead of 72 dpi ?

I hope someone will be able to give an authoritative answer to this 
question.

-- 
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] DialogFragment - show soft keyboard upon creation

2012-07-16 Thread Simon Giddings
Ok, all is working now.
The problem came from wanting to only enable the "ok" button once a minimum 
number of characters had been entered.
I was doing this through setOnKeyListener - this blocked the soft keyboard 
appearing automatically (if the user touched the edittext, the soft 
keyboard showed anyway).
So, I have removed this call and now use the following with success :
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);


On Monday, 16 July 2012 19:49:18 UTC+2, MagouyaWare wrote:
>
> Do any of these attributes help?  In particular I am thinking of the 
> stateVisible or stateAlwaysVisible options:
>
> http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Mon, Jul 16, 2012 at 11:46 AM, dnkoutso wrote:
>
>> Everything around the Android keyboard feels hacky. 
>>
>> Try one of the following:
>>
>> 1) Set  in your XML in the edittext.
>> 2) do a post such as et.post(new Runnable() { et.requestFocus() }} etc.
>> 3) do a post again but your use own code in your original post.
>>
>> Good luck.
>>
>>
>> On Monday, July 16, 2012 9:26:40 AM UTC-7, Simon Giddings wrote:
>>>
>>> Yes, I use this as well, but forgot to include it in the code I posted 
>>> here.
>>>
>>> On Monday, 16 July 2012 18:06:41 UTC+2, Kostya Vasilyev wrote:
>>>>
>>>> Have you tried "et.requestFocus()" ?
>>>>
>>>> 2012/7/16 Simon Giddings 
>>>>
>>>>> I have a simple dialog built with the compatibility libraries 
>>>>> DialogFragment.
>>>>> It holds only 
>>>>>
>>>>>1. EditText 
>>>>>2. 2 buttons
>>>>>
>>>>> When the dialog is shown, the edit text control has the focus.
>>>>> At this point, I want to open the soft keyboard automatically.
>>>>>
>>>>> Here is what I am doing within the onCreateView method :
>>>>> EditText et;
>>>>> et = (EditText)v.findViewById(R.id.**txtAddress);
>>>>> Activity act = getActivity();
>>>>> if(act != null)
>>>>> {
>>>>> InputMethodManager imm = (InputMethodManager)act.**
>>>>> getSystemService(Context.**INPUT_METHOD_SERVICE);
>>>>> if(imm != null)
>>>>> imm.showSoftInput(et, InputMethodManager.SHOW_**FORCED);
>>>>> }
>>>>>
>>>>> Even though I get to the showSoftInput step with no problem, the 
>>>>> keyboard is still not displayed.
>>>>>
>>>>> So, how can I correctly get the soft keyboard to be shown ?
>>>>>
>>>>> -- 
>>>>> 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<http://groups.google.com/group/android-developers?hl=en>
>>>>
>>>>
>>>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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

Re: [android-developers] DialogFragment - show soft keyboard upon creation

2012-07-16 Thread Simon Giddings
Yes, I use this as well, but forgot to include it in the code I posted here.

On Monday, 16 July 2012 18:06:41 UTC+2, Kostya Vasilyev wrote:
>
> Have you tried "et.requestFocus()" ?
>
> 2012/7/16 Simon Giddings 
>
>> I have a simple dialog built with the compatibility libraries 
>> DialogFragment.
>> It holds only 
>>
>>1. EditText 
>>2. 2 buttons
>>
>> When the dialog is shown, the edit text control has the focus.
>> At this point, I want to open the soft keyboard automatically.
>>
>> Here is what I am doing within the onCreateView method :
>> EditText et;
>> et = (EditText)v.findViewById(R.id.txtAddress);
>> Activity act = getActivity();
>> if(act != null)
>> {
>> InputMethodManager imm = 
>> (InputMethodManager)act.getSystemService(Context.INPUT_METHOD_SERVICE);
>> if(imm != null)
>> imm.showSoftInput(et, InputMethodManager.SHOW_FORCED);
>> }
>>
>> Even though I get to the showSoftInput step with no problem, the keyboard 
>> is still not displayed.
>>
>> So, how can I correctly get the soft keyboard to be shown ?
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

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

[android-developers] DialogFragment - show soft keyboard upon creation

2012-07-16 Thread Simon Giddings
I have a simple dialog built with the compatibility libraries 
DialogFragment.
It holds only 

   1. EditText
   2. 2 buttons

When the dialog is shown, the edit text control has the focus.
At this point, I want to open the soft keyboard automatically.

Here is what I am doing within the onCreateView method :
EditText et;
et = (EditText)v.findViewById(R.id.txtAddress);
Activity act = getActivity();
if(act != null)
{
InputMethodManager imm = 
(InputMethodManager)act.getSystemService(Context.INPUT_METHOD_SERVICE);
if(imm != null)
imm.showSoftInput(et, InputMethodManager.SHOW_FORCED);
}

Even though I get to the showSoftInput step with no problem, the keyboard 
is still not displayed.

So, how can I correctly get the soft keyboard to be shown ?

-- 
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] Showing a confirm dialog from the PreferenceAcivity

2012-07-05 Thread Simon Giddings
Thank you for your reply.
However, this does not answer the main problem, which is - how to show a 
dialogfragment from a PreferenceActivity, which is not a fragment based 
activity !


On Wednesday, 4 July 2012 19:40:12 UTC+2, svins wrote:
>
> sorry, "an" 
>
> On 4 July 2012 19:39, Gergely Juhász  wrote: 
> > Here is any example about showing an alert with dialog fragment. 
> > http://developer.android.com/reference/android/app/DialogFragment.html 
> > (Alert Dialog section) 
> > 
> > On 4 July 2012 19:36, Simon Giddings  wrote: 
> >> Within my preferences I give the user control over my image cache, 
> including 
> >> the ability to empty the cache. 
> >> 
> >> However, I want the user to confirm the emptying of the cache (to avoid 
> >> mistakes). 
> >> We are supposed to use dialog fragments now instead of dialog builders 
> as 
> >> these are depreciated (as far as I understand). 
> >> 
> >> How can I then show a confirmation dialog in this case ? 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> >> Groups "Android Developers" group. 
> >> To post to this group, send email to 
> android-developers@googlegroups.com 
> >> To unsubscribe from this group, send email to 
> >> android-developers+unsubscr...@googlegroups.com 
> >> For more options, visit this group at 
> >> http://groups.google.com/group/android-developers?hl=en 
>

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

[android-developers] Showing a confirm dialog from the PreferenceAcivity

2012-07-04 Thread Simon Giddings
Within my preferences I give the user control over my image cache, 
including the ability to empty the cache.

However, I want the user to confirm the emptying of the cache (to avoid 
mistakes).
We are supposed to use dialog fragments now instead of dialog builders as 
these are depreciated (as far as I understand).

How can I then show a confirmation dialog in this case ?

-- 
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] Playing user specified YouTube Videos in MediaPlayer

2012-07-03 Thread Simon Giddings
My Android app uses data designed for my main Web Application.
Content providers are able to specify a presentation video hosted in 
YouTube for playback on the site.  This works just fine.

Does anyone know if there exists a means or an api which permits getting 
the correct URI for a given embedded code, which will enable playback in 
the MediaViewer ?

-- 
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] Where have all the tutorials gone ?

2012-06-28 Thread Simon Giddings
Ok, I found this without any problem !
However, the tutorials such as the View tutorials, Localisation, etc appear 
to have vanished.


On Thursday, 28 June 2012 17:02:34 UTC+2, Sachin K Poddar wrote:
>
>  Use this...
> http://developer.android.com/training/index.html
>  
> Sachin Poddar
>  
> On 6/28/2012 8:25 PM, Simon Giddings wrote: 
>
> Since the new version of the developers site has come online (
> developer.android.com), I am unable to find the tutorials !
>
> Does anyone know where they are ?
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en 
>
>  

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

[android-developers] Where have all the tutorials gone ?

2012-06-28 Thread Simon Giddings
Since the new version of the developers site has come online 
(developer.android.com), I am unable to find the tutorials !

Does anyone know where they are ?

-- 
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] Querying for system capabilities

2012-06-27 Thread Simon Giddings
In my activity I need to be able to query if the following services are 
available :

   - phone call
   - email
   - internet browsing

This is to ensure that I only provide these options when they exist on the 
device.
For example, phone calls are not normally available on a tablet.

Can this be done ?

-- 
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] ListView inside a tabhost not displaying content initially

2012-06-20 Thread Simon Giddings
Hi Justin,

Yes, you are right.  I went too fast in my reply.  I did indeed make the 
two calls and it did indeed work.
I was wanting to limit the number of resources needed in this activity - 
where in my use of one unique ListView.

After this short discussion, I think I will try to use a single list view 
per tab and see what the performance hit will be.


On Wednesday, 20 June 2012 18:09:56 UTC+2, MagouyaWare wrote:
>
> If I call tabhost.setCurrentTab(1) instead of tabhost.setCurrentTab(0), 
>> then the initial display is correct.
>>
>
> I think you misunderstood me... I wanted you to call both of them... 
> First, set the current tab to 1 and then to 0...  Does the listview display 
> correctly on tab 0 if you do this?  My guess is that it would.  This is 
> probably not the best way to solve the problem though, but would work be a 
> potential workaround if all else fails.
>
> To answer your question, the OnTabChangedListener code rebuilds the 
>> listview content.
>>
>
> I noticed you are setting the OnTabChangedListener after setting the 
> current tab... What happens if you try setting the change listener first?  
> You may need to verify that this method gets called when you do this... if 
> the tab host defaults the current tab to 0 and then you set it to 0 it may 
> decide it doesn't need to do anything... In which case, you would need to 
> call the method for a tab change manually yourself first.
>
> To answer @Mark Murphy (a Commons Guy), when I subsequently click through 
>> the tabs, the single listview is correctly updated and displayed.
>> It just doesn't display correctly upon initial display.
>>
>
> Just because it seems to work doesn't mean it is actually supported.  If 
> this is not the intended way to use a tabhost then it may just work as a 
> side-effect of other things, but you may see weirdness as a result of it... 
> If this isn't supposed to be supported then the devs likely have not tested 
> this scenario...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, Jun 20, 2012 at 10:00 AM, Simon Giddings wrote:
>
>> Wow, I hadn't expected replies so quickly !
>>
>> @MagouyaWare - To answer your question, the OnTabChangedListener code 
>> rebuilds the listview content.
>> I have indeed stepped through this to ensure that it does this correctly 
>> before the first display.
>>
>> If I call tabhost.setCurrentTab(1) instead of tabhost.setCurrentTab(0), 
>> then the initial display is correct.
>>
>> To answer @Mark Murphy (a Commons Guy), when I subsequently click 
>> through the tabs, the single listview is correctly updated and displayed.
>> It just doesn't display correctly upon initial display.
>>
>>
>> On Wednesday, 20 June 2012 17:47:15 UTC+2, MagouyaWare wrote:
>>
>>> Also, what does your OnTabChangedListener code do?
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware<http://sites.google.com/site/magouyaware>
>>>
>>>
>>> On Wed, Jun 20, 2012 at 9:46 AM, Justin Anderson wrote:
>>>
>>>>  Just out of curiosity, try doing this:
>>>>
>>>> *tabhost.setCurrentTab(1);
>>>> tabhost.setCurrentTab(0);
>>>> *
>>>> Does your list show up at that point?
>>>>
>>>> Thanks,
>>>> Justin Anderson
>>>> MagouyaWare Developer
>>>> http://sites.google.com/site/**magouyaware<http://sites.google.com/site/magouyaware>
>>>>
>>>>
>>>>
>>>> On Wed, Jun 20, 2012 at 9:41 AM, Simon Giddings  wrote:
>>>>
>>>>> I have a TabActivity containing a series of four tabs and a listview.
>>>>> Each of the tabs reference the same listview.
>>>>> When the activity is initially displayed, the listview is not 
>>>>> displayed.
>>>>> However, clicking on another tab will display it correctly and 
>>>>> clicking back on the first tab will also display it correctly.
>>>>> The content of the listview is changed depending on the selected tab.
>>>>>
>>>>> Here is my XML layout :
>>>>> 
>>>>> >>>> xmlns:android="http://schemas.**android.com/apk/res/android<http://schemas.android.com/apk/res/android>
>>>>> "
>>>>> android:id="@android:id/**tabhost"
>>>>> android:layout_width="

Re: [android-developers] ListView inside a tabhost not displaying content initially

2012-06-20 Thread Simon Giddings
Wow, I hadn't expected replies so quickly !

@MagouyaWare - To answer your question, the OnTabChangedListener code 
rebuilds the listview content.
I have indeed stepped through this to ensure that it does this correctly 
before the first display.

If I call tabhost.setCurrentTab(1) instead of tabhost.setCurrentTab(0), 
then the initial display is correct.

To answer @Mark Murphy (a Commons Guy), when I subsequently click through 
the tabs, the single listview is correctly updated and displayed.
It just doesn't display correctly upon initial display.


On Wednesday, 20 June 2012 17:47:15 UTC+2, MagouyaWare wrote:
>
> Also, what does your OnTabChangedListener code do?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, Jun 20, 2012 at 9:46 AM, Justin Anderson wrote:
>
>> Just out of curiosity, try doing this:
>>
>> *tabhost.setCurrentTab(1);
>> tabhost.setCurrentTab(0);
>> *
>> Does your list show up at that point?
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/magouyaware
>>
>>
>>
>> On Wed, Jun 20, 2012 at 9:41 AM, Simon Giddings  wrote:
>>
>>> I have a TabActivity containing a series of four tabs and a listview.
>>> Each of the tabs reference the same listview.
>>> When the activity is initially displayed, the listview is not displayed.
>>> However, clicking on another tab will display it correctly and clicking 
>>> back on the first tab will also display it correctly.
>>> The content of the listview is changed depending on the selected tab.
>>>
>>> Here is my XML layout :
>>> 
>>> http://schemas.android.com/apk/res/android";
>>> android:id="@android:id/tabhost"
>>> android:layout_width="match_parent"
>>> android:layout_height="match_parent" >
>>> 
>>> >> android:layout_width="fill_parent"
>>> android:layout_height="fill_parent"
>>> android:orientation="vertical" >
>>> 
>>> >> android:id="@android:id/tabs"
>>> android:layout_width="fill_parent"
>>> android:layout_height="wrap_content" />
>>> 
>>> >> android:id="@android:id/tabcontent"
>>> android:layout_width="fill_parent"
>>> android:layout_height="fill_parent" >
>>>
>>> >> android:id="@+id/listPoisFound"
>>> android:layout_width="match_parent"
>>> android:layout_height="wrap_content" >
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>>
>>> The tabs are initialised like this :
>>> TabHost tabhost = null;
>>> TabHost.TabSpec spec = null;
>>> // get the tabhost
>>> tabhost = getTabHost();
>>> 
>>> // create the individual tabs
>>> spec = tabhost.newTabSpec("first");
>>> spec.setIndicator("First");
>>> spec.setContent(R.id.list);
>>> tabhost.addTab(spec);
>>> 
>>> spec = tabhost.newTabSpec("second");
>>> spec.setIndicator("Second");
>>> spec.setContent(R.id.list);
>>> tabhost.addTab(spec);
>>> 
>>> spec = tabhost.newTabSpec("third");
>>> spec.setIndicator("Third");
>>> spec.setContent(R.id.list);
>>> tabhost.addTab(spec);
>>> 
>>> spec = tabhost.newTabSpec("fourth");
>>> spec.setIndicator("Fourth");
>>> spec.setContent(R.id.list);
>>> tabhost.addTab(spec);
>>> 
>>> tabhost.setCurrentTab(0);
>>> 
>>> tabhost.setOnTabChangedListener(this);
>>>
>>> Has anyone come across this problem ?
>>> What is the solution ?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>

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

[android-developers] ListView inside a tabhost not displaying content initially

2012-06-20 Thread Simon Giddings
I have a TabActivity containing a series of four tabs and a listview.
Each of the tabs reference the same listview.
When the activity is initially displayed, the listview is not displayed.
However, clicking on another tab will display it correctly and clicking 
back on the first tab will also display it correctly.
The content of the listview is changed depending on the selected tab.

Here is my XML layout :

http://schemas.android.com/apk/res/android";
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent" >















The tabs are initialised like this :
TabHost tabhost = null;
TabHost.TabSpec spec = null;
// get the tabhost
tabhost = getTabHost();

// create the individual tabs
spec = tabhost.newTabSpec("first");
spec.setIndicator("First");
spec.setContent(R.id.list);
tabhost.addTab(spec);

spec = tabhost.newTabSpec("second");
spec.setIndicator("Second");
spec.setContent(R.id.list);
tabhost.addTab(spec);

spec = tabhost.newTabSpec("third");
spec.setIndicator("Third");
spec.setContent(R.id.list);
tabhost.addTab(spec);

spec = tabhost.newTabSpec("fourth");
spec.setIndicator("Fourth");
spec.setContent(R.id.list);
tabhost.addTab(spec);

tabhost.setCurrentTab(0);

tabhost.setOnTabChangedListener(this);

Has anyone come across this problem ?
What is the solution ?

-- 
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: Maps API : drawing driving itinerary

2012-05-18 Thread Simon Giddings
Ok, here is the result so far.
1. Small optimisation - using a path object
2. Timing the smaller loop and the paint of the path 

// get the projection to work with
Projection pj = view.getProjection();

// get the first position
geopoint = m_ItinLine.item(0);
pj.toPixels(geopoint, pt);

Path path = new Path();
path.moveTo(pt.x, pt.y);

// now walk through the array list
for(int i = 1; i < m_ItinLine.count(); i++)
{
geopoint = m_ItinLine.item(i);
pj.toPixels(geopoint, pt);
path.lineTo(pt.x, pt.y);
}
cv.drawPath(path, m_paintline);


To answer TreKing's questions 
Here I loop through 11235 GeoPoint objects to create the path - which takes 
17.065 seconds
The call to drawPath takes 0.273 seconds.

The calls to m_ItemLine.item are to a custom array class that I put 
together which does nothing fancy other than create a GeoPoint[] array.


On Friday, 18 May 2012 08:53:47 UTC+2, TreKing wrote:
>
> On Fri, May 18, 2012 at 1:40 AM, Simon Giddings wrote:
>
>> To TreKing : I quite clearly explained that the drawing area was where I 
>> needed to optimise. You can see that I trace the time taken here and this 
>> is where I can say that, on the emulator, it takes 18 seconds.
>>
>
> Your draw method is fairly big. There are a lot of steps there, including 
> a loop where you iterate through a bunch of points (the number of which you 
> didn't specify, which might be your issue). You time nearly the entire 
> method, but more than likely there is one or two lines in there that are 
> eating up the bulk of that time.
>
> My suggestion to you was to profile your code so you can narrow down more 
> precisely which part(s) of that block of code is where most of your time is 
> being spent. If you can come back and say "this line in particular is 
> killing me", or "l'm looping through 6,000 points each frame", then it will 
> be easier to get help with optimizing.
>
>
> -
> 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] Re: Maps API : drawing driving itinerary

2012-05-17 Thread Simon Giddings
Thanks for the responses.

To TreKing : I quite clearly explained that the drawing area was where I 
needed to optimise. You can see that I trace the time taken here and this 
is where I can say that, on the emulator, it takes 18 seconds.

to lbendlin : Thank you for the advice, I will do some further tests to see 
if this will affect the processing time.

On Friday, 18 May 2012 02:16:47 UTC+2, lbendlin wrote:
>
> No need to worry about the screen pixels relative to your waypoints. The 
> overlay manager handles that for you, and only renders the part that is on 
> screen. Load all the points.
>
> On Thursday, May 17, 2012 12:19:33 PM UTC-4, Simon Giddings wrote:
>>
>> I am developing a maps application which will display a user defined 
>> driving itinerary.
>> I obtain the driving directions from the Directions Web Service and parse 
>> the json response in a separate thread.
>>
>> I then hand the resulting itinerary object to my custom overlay for 
>> display.
>> Before appending the overlay to the maps overlay list, I decode the 
>> polyline strings to obtain the coordinates.
>>
>> My drawing code obtains the projection object and draws out the line - 
>> this is taking 18 seconds ! ! !
>> Here is my code :
>>
>> @Override
>> public void draw(Canvas cv, MapView view, boolean shadow)
>> {
>> GeoCoordsE6 point = null;  // utility class holding a geopoint 
>> and a point class with a method to handle projection manipulation
>> int iScreenWidth = view.getWidth();
>> int iScreenHeight = view.getHeight();
>> Paint paintLine = null;new Paint();
>> 
>> if(shadow)
>> {
>> super.draw(cv, view, shadow);
>> return;
>> }
>> 
>> long lStartMs = android.os.SystemClock.uptimeMillis();
>> 
>> paintLine = new Paint();
>> paintLine.setColor(m_iLineClr);
>> paintLine.setAntiAlias(true);
>> paintLine.setStyle(Paint.Style.FILL_AND_STROKE);
>> paintLine.setStrokeJoin(Paint.Join.ROUND);
>> paintLine.setStrokeCap(Paint.Cap.ROUND);
>> paintLine.setStrokeWidth(4);
>> 
>> // get the projection to work with
>> Projection pj = view.getProjection();
>> 
>> // get the first lat/lng position
>> point = m_ItinLine.item(0);
>> // convert the coorinates to screen pixels
>> point.ResolvePosition(pj);
>> // store the start position
>> m_ptStart.x = point.m_pt.x;
>> m_ptStart.y = point.m_pt.y;
>> 
>> // now walk through the array list
>> for(int i = 1; i < m_ItinLine.count(); i++)
>> {
>> point = m_ItinLine.item(i);
>> point.ResolvePosition(pj);
>> m_ptEnd.x = point.m_pt.x;
>> m_ptEnd.y = point.m_pt.y;
>> 
>> if(m_ptStart.x < 0 && m_ptEnd.x < 0 ||// to the left 
>> m_ptStart.y < 0 && m_ptEnd.y < 0 ||// above the 
>> top
>> m_ptStart.x > iScreenWidth && m_ptEnd.x > 
>> iScreenWidth ||// to the right
>> m_ptStart.y > iScreenHeight && m_ptEnd.y > 
>> iScreenHeight)// below the bottom
>> {
>> // ignore the drawing
>> }
>> else if(m_ptStart.x == m_ptEnd.x && m_ptStart.y == m_ptEnd.y)
>> continue;
>> else
>> {
>> cv.drawLine(m_ptStart.x, m_ptStart.y, m_ptEnd.x, 
>> m_ptEnd.y, paintLine);
>> }
>> 
>> m_ptStart.x = m_ptEnd.x;
>> m_ptStart.y = m_ptEnd.y;
>> }
>> 
>> long lEndMs = android.os.SystemClock.uptimeMillis();
>> Log.d("ItineraryOverlay", "Drawing took " + (lEndMs - lStartMs) + 
>> "ms");
>> 
>> super.draw(cv, view, shadow);
>> }
>>
>> Knowing that a number of people have done similar tasks, can anyone 
>> advise me as to how to improve the performance ?
>> Should I be building a path object and fill it with ALL of the points ?
>>
>>
>>

-- 
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] Maps API : drawing driving itinerary

2012-05-17 Thread Simon Giddings
I am developing a maps application which will display a user defined 
driving itinerary.
I obtain the driving directions from the Directions Web Service and parse 
the json response in a separate thread.

I then hand the resulting itinerary object to my custom overlay for display.
Before appending the overlay to the maps overlay list, I decode the 
polyline strings to obtain the coordinates.

My drawing code obtains the projection object and draws out the line - this 
is taking 18 seconds ! ! !
Here is my code :

@Override
public void draw(Canvas cv, MapView view, boolean shadow)
{
GeoCoordsE6 point = null;  // utility class holding a geopoint and 
a point class with a method to handle projection manipulation
int iScreenWidth = view.getWidth();
int iScreenHeight = view.getHeight();
Paint paintLine = null;new Paint();

if(shadow)
{
super.draw(cv, view, shadow);
return;
}

long lStartMs = android.os.SystemClock.uptimeMillis();

paintLine = new Paint();
paintLine.setColor(m_iLineClr);
paintLine.setAntiAlias(true);
paintLine.setStyle(Paint.Style.FILL_AND_STROKE);
paintLine.setStrokeJoin(Paint.Join.ROUND);
paintLine.setStrokeCap(Paint.Cap.ROUND);
paintLine.setStrokeWidth(4);

// get the projection to work with
Projection pj = view.getProjection();

// get the first lat/lng position
point = m_ItinLine.item(0);
// convert the coorinates to screen pixels
point.ResolvePosition(pj);
// store the start position
m_ptStart.x = point.m_pt.x;
m_ptStart.y = point.m_pt.y;

// now walk through the array list
for(int i = 1; i < m_ItinLine.count(); i++)
{
point = m_ItinLine.item(i);
point.ResolvePosition(pj);
m_ptEnd.x = point.m_pt.x;
m_ptEnd.y = point.m_pt.y;

if(m_ptStart.x < 0 && m_ptEnd.x < 0 ||// to the left 
m_ptStart.y < 0 && m_ptEnd.y < 0 ||// above the top
m_ptStart.x > iScreenWidth && m_ptEnd.x > iScreenWidth 
||// to the right
m_ptStart.y > iScreenHeight && m_ptEnd.y > 
iScreenHeight)// below the bottom
{
// ignore the drawing
}
else if(m_ptStart.x == m_ptEnd.x && m_ptStart.y == m_ptEnd.y)
continue;
else
{
cv.drawLine(m_ptStart.x, m_ptStart.y, m_ptEnd.x, m_ptEnd.y, 
paintLine);
}

m_ptStart.x = m_ptEnd.x;
m_ptStart.y = m_ptEnd.y;
}

long lEndMs = android.os.SystemClock.uptimeMillis();
Log.d("ItineraryOverlay", "Drawing took " + (lEndMs - lStartMs) + 
"ms");

super.draw(cv, view, shadow);
}

Knowing that a number of people have done similar tasks, can anyone advise 
me as to how to improve the performance ?
Should I be building a path object and fill it with ALL of the points ?


-- 
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] Map API : getMaxZoomLevel and satellite mode

2012-05-14 Thread Simon Giddings
Obviously, but this would be a kludge - no guarantee that it is correct.

On Monday, 14 May 2012 10:38:21 UTC+2, the_edge123 wrote:
>
> On 14/05/12 10:19, Simon Giddings wrote: 
> > I have already done this to confirm my suspicion. 
> > Subsequent calls to getMaxZoomLevel will return 22 as opposed to 21, the 
> > maximum zoom level. 
> >   
> Can't you force the value to 21 if it's 22 ? 
>

-- 
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] Map API : getMaxZoomLevel and satellite mode

2012-05-14 Thread Simon Giddings
I have already done this to confirm my suspicion.
Subsequent calls to getMaxZoomLevel will return 22 as opposed to 21, the 
maximum zoom level.

After having done abit more research, I have found that there is a logged 
issue : Issue 2761: Satellite view max zoom level one notch above 
possible<http://code.google.com/p/android/issues/detail?id=2761>

Since this was started in 2009, I would have thought that there should be a 
workaround at least !

On Monday, 14 May 2012 10:12:11 UTC+2, the_edge123 wrote:
>
> On 14/05/12 08:35, Simon Giddings wrote: 
> > However, when going to satellite mode, the maximum zoom level is 
> returning 
> > a value too high. 
> > 
> > I can say this because when I zoom in to the maximum zoom level, the 
> > emulator displays a black background with the roads overlayed onto it. 
> > If I zoom out one or two levels, I get the satellite map. 
> You should display its value (via Toast or Log) to be sure... 
>
>

-- 
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] Map API : getMaxZoomLevel and satellite mode

2012-05-13 Thread Simon Giddings
I am in the process of developing a map based application and have put 
inplace my own zoom controls.

As a consequence, I query the maximum zoom level when the map mode is 
changed.
However, when going to satellite mode, the maximum zoom level is returning 
a value too high.

I can say this because when I zoom in to the maximum zoom level, the 
emulator displays a black background with the roads overlayed onto it.
If I zoom out one or two levels, I get the satellite map.

Is this a known problem ?
Does it only apply to the emulator ?

-- 
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] Maps API - internal persistence of data

2012-05-12 Thread Simon Giddings
Hi Mark,

Thank you for your rapid reply (notably for a Saturday).

You are right - I spoke too soon.  I was creating the marker myself (*now 
that's embarrassing*).
It would appear that the last location, zoom level and map type is 
preserved.

It would still be good to be able to grab this, I feel.

On Saturday, 12 May 2012 18:18:12 UTC+2, Mark Murphy (a Commons Guy) wrote:
>
> On Sat, May 12, 2012 at 11:53 AM, Simon Giddings 
>  wrote: 
> > I am building a maps api application and have noticed that the map 
> position 
> > and zoom levels are restored upon subsequent application launches. 
> > 
> > Is it possible to access this persistence store so as to be able to 
> control 
> > and detect what data is going to be restored. 
>
> Not that I am aware of. 
>
> > In addition, it would appear that it will restore the last position 
> using a 
> > default marker - which in my case is not necessarily what is needed. 
>
> I cannot reproduce that behavior. I see no markers if I have not added 
> them myself via an overlay. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://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] Maps API - internal persistence of data

2012-05-12 Thread Simon Giddings
I am building a maps api application and have noticed that the map position 
and zoom levels are restored upon subsequent application launches.

Is it possible to access this persistence store so as to be able to control 
and detect what data is going to be restored.
This would be notably useful to not have to reinvent the same process.

In addition, it would appear that it will restore the last position using a 
default marker - which in my case is not necessarily what is needed.

I would prefer being able to do this through correct api calls as opposed 
to "hacking" 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] Re: Music notation application

2012-05-08 Thread Simon Giddings
Thank you for taking the time to reply.
Can you point me in the direction for what this "procedure based rendering" 
is about ?

On Tuesday, 8 May 2012 17:38:30 UTC+2, JackN wrote:
>
> you might want to consider procedure based rendering. Should scale well 
> (and easy).
>  
> I wish you luck and I would get you app when it is done.
>  
>
> On Tuesday, May 8, 2012 6:43:08 AM UTC-7, Simon Giddings wrote:
>
>> I am researching the writing of a "simple" music notation program which 
>> will permit simple actions such as
>>
>>- Display 
>>- Transposition 
>>- Annotation 
>>- etc
>>
>> My first hurdle is how to display the music. 
>>
>> The majority of desktop apps use music fonts, which makes zooming and 
>> resizing quite "simple". However, it would appear that I would need to be 
>> able to access the individual glyphs to do this - which is not possible in 
>> android as far as I understand.
>>
>> Should I stick with a music font and try to find a way to get the 
>> information needed ?
>>
>> Should I abandon this and be looking at using svg files or transparent 
>> PNGs ?
>>
>> Can anyone advise here, please ?
>>
>

-- 
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] Music notation application

2012-05-08 Thread Simon Giddings
I am researching the writing of a "simple" music notation program which 
will permit simple actions such as

   - Display
   - Transposition
   - Annotation
   - etc

My first hurdle is how to display the music.

The majority of desktop apps use music fonts, which makes zooming and 
resizing quite "simple". However, it would appear that I would need to be 
able to access the individual glyphs to do this - which is not possible in 
android as far as I understand.

Should I stick with a music font and try to find a way to get the 
information needed ?

Should I abandon this and be looking at using svg files or transparent PNGs 
?

Can anyone advise here, please ?

-- 
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: Native Maps Api - zoom to geocode returned viewport

2012-04-30 Thread Simon Giddings
So the answer is to use the MapController.zoomToSpan(...) method.
Further information can be found here : 
Getting map zoom level for given bounds on Android like on JS Google Maps 
API: 
map.getBoundsZoomLevel(bounds)<http://stackoverflow.com/questions/4979165/getting-map-zoom-level-for-given-bounds-on-android-like-on-js-google-maps-api-m>

On Monday, 30 April 2012 09:46:08 UTC+2, Simon Giddings wrote:
>
> This is a question I asked on Stackoverflow for which I got no answer.
>
> When I make a query to the Google Maps Api Geocode web service, the answer 
> comes back with a number of elements :
>
>- Coordinates lat / lng
>- Viewport NE and SW
>-  others 
>
> The viewport is that which "contains the recommended viewport for 
> displaying the returned result, specified as two latitude,longitude values 
> defining the southwest and northeast corner of the viewport bounding box. 
> Generally the viewport is used to frame a result when displaying it to a 
> user."
> Example given in the documentation :
>
> "viewport" : {
>"northeast" : {
>   "lat" : 37.42426708029149,
>   "lng" : -122.0840722197085
>},
>"southwest" : {
>   "lat" : 37.42156911970850,
>   "lng" : -122.0867701802915
>}
>
>
>
> I have not been able to figure out how to adjust the zoom level to best 
> match this viewport.
> Can anyone advise me on this ?
> Perhaps someone has already done this and would be willing to share ?
>

-- 
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] Native Maps Api - zoom to geocode returned viewport

2012-04-30 Thread Simon Giddings
This is a question I asked on Stackoverflow for which I got no answer.

When I make a query to the Google Maps Api Geocode web service, the answer 
comes back with a number of elements :

   - Coordinates lat / lng
   - Viewport NE and SW
   -  others 

The viewport is that which "contains the recommended viewport for 
displaying the returned result, specified as two latitude,longitude values 
defining the southwest and northeast corner of the viewport bounding box. 
Generally the viewport is used to frame a result when displaying it to a 
user."
Example given in the documentation :

"viewport" : {
   "northeast" : {
  "lat" : 37.42426708029149,
  "lng" : -122.0840722197085
   },
   "southwest" : {
  "lat" : 37.42156911970850,
  "lng" : -122.0867701802915
   }



I have not been able to figure out how to adjust the zoom level to best 
match this viewport.
Can anyone advise me on this ?
Perhaps someone has already done this and would be willing to share ?

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