[android-developers] Re: Is runOnUiThread() ever 'safe' to call? If not why is it not deprecated?

2015-07-16 Thread Sam Duke
nt rssi, >> byte[] scanRecord) { >> runOnUiThread(new Runnable() { >>@Override >>public void run() { >>mLeDeviceListAdapter.addDevice(device); >>mLeDeviceListAdapter.notifyDataSetChanged(); >

[android-developers] How to prevent app restart when using launcher after store?

2015-07-16 Thread Sam Duke
My Android application is being restarted when using the launcher to launch it after I have used the app store to launch it (and visa versa). Is there any way to prevent this? By restarted I mean that the activity stack is lost. This is important as our users are setting up and returning to

[android-developers] Re: Is runOnUiThread() ever 'safe' to call? If not why is it not deprecated?

2015-06-10 Thread Sam Duke
reasonable convenience to do so. It's just too bad that runOnUiThread this > is a method on Activity because that could be misleading to the caller. > > Doug > > > On Tuesday, June 9, 2015 at 11:39:13 AM UTC-7, Sam Duke wrote: >> >> Due to the nature of config chang

[android-developers] Is runOnUiThread() ever 'safe' to call? If not why is it not deprecated?

2015-06-09 Thread Sam Duke
Due to the nature of config changes, the runnable submitted to runOnUiThread may be executed after an activity has been destroyed (i.e. on a stale activity). Therefore this API can cause all sorts of subtle bugs with config changes and events never reaching the UI. I can't think of a single cas

[android-developers] How can I change the colour of a button in material design?

2015-01-09 Thread Sam Duke
I have found the "colorButtonNormal" property for themes. But how can I make two different buttons have different colours? Like this: http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7S1lXOTYzMUx4SnM/components_buttons_main7.png I've tried almost everyt

[android-developers] Clarification: Is the DATA column of the mediastore for file paths?

2014-11-13 Thread Sam Duke
The docs say this column is "The data stream for the file" Just about every StackOverflow answer on the topic seems to use this column for file paths. Could someone please clarify it's intention? If it is not for file paths, how may I move from a file path for an image to an Image ID in the da

[android-developers] Android studio Gitignore clarification

2014-08-12 Thread Sam Duke
There are multiple conflicting opinions about what the gitignore for an Android Studio based project should be (including what to do for modules). We have quite a lot of issues with .iml files containing a minor changes and having to be committed regularly. Example: Notice the "(3)". Thi

[android-developers] Re: Camera preview "center crop" without SurfaceTexture

2014-06-04 Thread Sam Duke
Note to others: the solution was to use a textureview (android 14+) On Friday, 25 April 2014 17:57:11 UTC+1, Sam Duke wrote: > > Im trying to show a camera preview to the user of arbitrary size. What I'd > like to do is pick an appropriate camera size based on the size of the &

[android-developers] Camera preview "center crop" without SurfaceTexture

2014-04-25 Thread Sam Duke
Im trying to show a camera preview to the user of arbitrary size. What I'd like to do is pick an appropriate camera size based on the size of the preview, then effectively do a center-crop of the camera output into this (ie maintain aspect-ratio of the camera preview). As far as i can tell, the

[android-developers] Re: Scaling ImageView "rightCrop"

2012-07-20 Thread Sam Duke
+1 for this On Monday, 31 January 2011 17:04:33 UTC, lou wrote: > > Hi ! > I'm trying to insert an image in my application. > This image don't cover all the screen, so I have to scale it. > My problem : > I want the picture to cover the all screen, stay scaled and be cropped > at the right of

[android-developers] Why is the SMS content provider still no included in the SDK?

2012-01-16 Thread Sam Duke
This has been an undocumented/unsupported feature for many years now. With popular applications such as Handcent presumably making use of it, when are Google going to officially support it!? -- You received this message because you are subscribed to the Google Groups "Android Developers" group