Re: [android-developers] Disable Triple Buffering In 4.1?

2013-02-04 Thread muleskinner
Well (and this is a bit of a hangover from porting JavaME code) I frequently have areas of the display (e.g. a HUD) that I don't bother updating unless there has been a change. With the original switch from JavaME to Android this caused issues in that only one buffer was updated so the screen

[android-developers] Re: SlidingDrawer widget hidden by GLSurfaceView while sliding

2013-02-04 Thread indra
Hi Paul, Any success on this? I am facing same issue. 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

Re: [android-developers] finger paint

2013-02-04 Thread Dilip Kumar Chaudhary
can you please help me with some example On Fri, Feb 1, 2013 at 1:56 PM, TreKing treking...@gmail.com wrote: On Fri, Feb 1, 2013 at 2:02 AM, Dilip Kumar Chaudhary androiddili...@gmail.com wrote: what should I do to solve this problem. Use Google to find a line intersection algorithm.

Re: [android-developers] finger paint

2013-02-04 Thread skink
Dilip Kumar Chaudhary wrote: can you please help me with some example sure: http://www.google.com/m?q=line+intersection+algorithm pskink -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Dynamic Application Theme

2013-02-04 Thread Pent
No, I finish() the startup activity in onCreate() in which case it is never made visible.  This is documented somewhere. Sure, but I couldn't manage to set the theme for the next activity that way. No idea why it works for you. Current (working) solution is to set the startup activity with the

[android-developers] Android apps developing practice

2013-02-04 Thread arunkumar . k
hi, i m interest to develop android appsif anyone wants app inform me -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email

Re: [android-developers] finger paint

2013-02-04 Thread Dilip Kumar Chaudhary
I'm asking help with some example sir On Mon, Feb 4, 2013 at 2:20 PM, skink psk...@gmail.com wrote: Dilip Kumar Chaudhary wrote: can you please help me with some example sure: http://www.google.com/m?q=line+intersection+algorithm pskink -- -- You received this message because

[android-developers] Textures being lost due to context being destroyed. Is this still an issue?

2013-02-04 Thread reaktor24
Is this still an issue with Android. It seemed to be back in the 1.5 - 2.3 days according to the beginners android games programming book I am currently learning from. However I tried with a game I am writing on my modern Xperia S and the problem doesn't happen. All textures are still intact

[android-developers] Launching Activity from Web - Advanced Question/

2013-02-04 Thread Mark Cz
Hi All, I know how to launch activity from web, many has been written regarding the subject, http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser The problem is I have got the href for launching the application on my personal page, but the user

Re: [android-developers] finger paint

2013-02-04 Thread skink
Dilip Kumar Chaudhary wrote: I'm asking help with some example sir did you bother to read the very first link? or you want me to read it, copy and paste the working code here? pskink -- -- You received this message because you are subscribed to the Google Groups Android Developers group.

Re: [android-developers] finger paint

2013-02-04 Thread Dilip Kumar Chaudhary
ok let me read once again Thanks On Mon, Feb 4, 2013 at 5:21 PM, skink psk...@gmail.com wrote: Dilip Kumar Chaudhary wrote: I'm asking help with some example sir did you bother to read the very first link? or you want me to read it, copy and paste the working code here? pskink --

[android-developers] Re: Unpublishing an APK

2013-02-04 Thread Kostya Vasilyev
But you can Both the new and the old publishing UIs have an expert (detailed?) mode with a list of uploaded .apk's and there are buttons to deactivate / active them as needed. As for enabling some code only for release builds (or the opposite) -- Android build tools generate a

[android-developers] Re: Alpha ordering ListPreference values to suit current locale

2013-02-04 Thread lbendlin
As I said, I would create a SQLite table with locale, language code and language title. Then you can do a database query that filters by the current locale and retrieves language code and title sorted by the title. On Sunday, February 3, 2013 5:46:45 PM UTC-5, William Ferguson wrote: OK, I

[android-developers] Re: Alpha ordering ListPreference values to suit current locale

2013-02-04 Thread William Ferguson
But that gains nothing over adding them as static lists inside the resource files. It's not like I'm going to changing the names of countries on a daily basis. In either case I will need to construct the ordered lists for each Locale. But if I put them in a DB then I've lost visibility over

[android-developers] Re: Alpha ordering ListPreference values to suit current locale

2013-02-04 Thread Kostya Vasilyev
Editing the values / entries lists for each locale is going be error prone... I'd consider a Preference subclass that works like ListPreference but sorts the values and entries arrays, keeping in sync, before presenting the entries list to the user. You might want to refer to the source code

[android-developers] Re: Alpha ordering ListPreference values to suit current locale

2013-02-04 Thread William Ferguson
Yeah, that makes sense. Thanks Kostya. On Monday, February 4, 2013 11:15:58 PM UTC+10, Kostya Vasilyev wrote: Editing the values / entries lists for each locale is going be error prone... I'd consider a Preference subclass that works like ListPreference but sorts the values and entries

[android-developers] Re: finger paint

2013-02-04 Thread bob
If this is a fingerpaint app, why would you want it to generate an error when lines intersect? On Friday, February 1, 2013 2:02:47 AM UTC-6, Dilip Kumar Chaudhary wrote: I'm drawing line and want that when lines match together then generate error.I have done some coding and this code is

[android-developers] Re: No subscriptions in Billing V3 API - permanent?

2013-02-04 Thread Sarbyn
I am in the same situation of Nathan. I need to develop billing in my application using a subscription model. How long we could wait for a v3 version of billing libraries with subscription enabled? Il giorno mercoledì 30 gennaio 2013 20:51:19 UTC+1, Nathan ha scritto: Is this a permanent or

[android-developers] Re: Textures being lost due to context being destroyed. Is this still an issue?

2013-02-04 Thread bob
I think it is still an issue. I think if you look at the BasicGLSurfaceView sample, you will see it reloads the textures after a pause and resume. On Monday, February 4, 2013 5:18:16 AM UTC-6, reaktor24 wrote: Is this still an issue with Android. It seemed to be back in the 1.5 - 2.3

[android-developers] Re: Android apps developing practice

2013-02-04 Thread bob
I would like an app that makes it easy to browse Google Groups. Thanks. On Monday, February 4, 2013 4:50:28 AM UTC-6, arunk...@npcompete.net wrote: hi, i m interest to develop android appsif anyone wants app inform me -- -- You received this message because you are subscribed to

Re: [android-developers] Disable Triple Buffering In 4.1?

2013-02-04 Thread bob
I would just redraw the whole screen every time. I doubt you are saving much processing power by not updating your HUD fully. On Monday, February 4, 2013 2:25:21 AM UTC-6, muleskinner wrote: Well (and this is a bit of a hangover from porting JavaME code) I frequently have areas of the

Re: [android-developers] Re: Android apps developing practice

2013-02-04 Thread Yaron Reinharts
https://groups.google.com/forum/m/#!overview https://groups.google.com/forum/m/#%21overview Hope this help /Yaron On 02/04/2013 05:11 PM, bob wrote: I would like an app that makes it easy to browse Google Groups. Thanks. On Monday, February 4, 2013 4:50:28 AM UTC-6,

[android-developers] my app won't die

2013-02-04 Thread bob
Sometimes I look at the Devices window in Eclipse. Then I select my app. And, I press the stop sign button to kill it. Then, for some reason, it starts up again on its own a second later. Anyone know exactly what causes this strange restarting? -- -- You received this message because

[android-developers] Re: Launching Activity from Web - Advanced Question/

2013-02-04 Thread Nobu Games
First of all: AJAX won't help you there because it cannot be used to open links. It can only be used to load resources from your own website. What you can do is inserting a hidden iframe object. When the user clicks the link to open that app then let some JavaScript code set the src attribute

[android-developers] Sending messages to Activity UI thread

2013-02-04 Thread dashman
I'd like to send messages to the main UI thread every second. This is what I did. When I need to start to send messages - I create a Thread from the Activity instance. this is what the thread run() method looks like: public void run() { try {

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread skink
dashman wrote: I'd like to send messages to the main UI thread every second. This is what I did. When I need to start to send messages - I create a Thread from the Activity instance. this is what the thread run() method looks like: public void run() { try

[android-developers] Re: startActivity

2013-02-04 Thread Streets Of Boston
If you want to start one activity (screen) and report a result back to the calling activity (screen) you need the handle of the calling activity. No way around it. If you are not worried about reporting a result back, you can get hold of the Application Context

Re: [android-developers] Re: asynctask vs. FragmentRetainInstance.java in API demo

2013-02-04 Thread Streets Of Boston
.. it is unnecessary for a worker fragment to start a asynctask ... I don't understand the statement above. A Fragment without a UI is not a worker thread. It is just a Fragment without a UI. You can use it to tie data/tasks in the Fragment to the lifecycle of an activity that is hosting the

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread Streets Of Boston
This is one way of doing it (as long as simHandler was created on UI thread). However, this is too much work. Just call simHandler.postDelayed on the simHandler itself; no need to create a separate thread: See documentation here:

Re: [android-developers] Disable Triple Buffering In 4.1?

2013-02-04 Thread Romain Guy
If you are drawing your app using standard Views and Canvas, this is not required. If you are using SurfaceView.lockCanvas(), make sure to check the returned Rect. It tells you what part of the the Canvas you *have* to redraw (this will take into account previous frames.) If you always draw what

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread dashman
ok - i was able to get rid of the thread. in the handler - i conditionally call this.sendMessageDelayed( android.os.Message.obtain( this, 0, sim ), 1000 ); next issue. i've got the handler defined in the activity class as final android.os.Handler simHandler = new android.os.Handler() {

Re: [android-developers] finger paint

2013-02-04 Thread Nobu Games
You will need to keep track of the drawn path segments in some data structure. When you add a new path segment you need to perform an intersection test between the new segment and the old ones. There are two problems with that: 1. The path data structure grows bigger and bigger the more you

[android-developers] Issues getting Galaxy Nexus (4.2.1) Camera Megapixels with this function

2013-02-04 Thread saex
Hi I'm getting the camera megapixels with this function: private String getCameraMegapixels(Camera cam){ Camera.Size size; size = cam.getParameters().getPictureSize(); DecimalFormat localDecimalFormat = new DecimalFormat(#.#); return

[android-developers] Re: Issues getting Galaxy Nexus (4.2.1) Camera Megapixels with this function

2013-02-04 Thread Nobu Games
If I'm not totally mistaken Camera.getParameters stores the currently set camera parameters. What if the camera resolution has been set to the lowest available? I think you need to scan through the result of

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread skink
dashman wrote: ok - i was able to get rid of the thread. in the handler - i conditionally call this.sendMessageDelayed( android.os.Message.obtain( this, 0, sim ), 1000 ); next issue. i've got the handler defined in the activity class as final android.os.Handler simHandler = new

[android-developers] Re: Issues getting Galaxy Nexus (4.2.1) Camera Megapixels with this function

2013-02-04 Thread saex
the camera is set to maximum res, and also, both cameras gives me 0.1 megapixels, front and back, so i'm sure the solution is not this El lunes, 4 de febrero de 2013 18:53:32 UTC+1, Nobu Games escribió: If I'm not totally mistaken Camera.getParameters stores the currently set camera

[android-developers] Re: Textures being lost due to context being destroyed. Is this still an issue?

2013-02-04 Thread a1
It was never an issue, GLSurfaceView was a bit eager to destroy context on pause, since 3.0 you can use setPreserveEGLContextOnPause or if you need to support older version you could just backport GLSurfaceView from 4.0 or use one of many existing implementation (eg. the one from replica

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
OK, Sorry guys, now i understand you I tryed using your answers to get the solution but it doesn't works by now, i don't know what i'm doing wrong This is the code now (this code is on the handler that is being called each second from a thread). el is the expandableListView and mAdapter is the

[android-developers] Re: startActivity

2013-02-04 Thread bob
Oh, I see… So, startActivity really comes from the Context class? I was looking at the docs for Activity, and didn't realize it was an * override*. On Monday, February 4, 2013 11:07:08 AM UTC-6, Streets Of Boston wrote: If you want to start one activity (screen) and report a result

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread Streets Of Boston
Yes, you can. Use a WeakReference to your activity. static class MyHandler extends Handler { private WeakReferenceMyActivity activityRef; public MyHandler(MyActivity activity) { activityRef = new WeakReferenceMyActivity(activity); } /** * @return The activity for which this MyHandler was

Re: [android-developers] Re: Android apps developing practice

2013-02-04 Thread Jim Graham
On Mon, Feb 04, 2013 at 07:11:30AM -0800, bob wrote: I would like an app that makes it easy to browse Google Groups. Your favorite e-mail client, perhaps? :-) I use procmail to re-direct all e-mail lists into their own files in a directory under my ~ ($HOME) directory (~/incoming.mail), e.g.,

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread skink
Streets Of Boston wrote: Yes, you can. Use a WeakReference to your activity. static class MyHandler extends Handler { private WeakReferenceMyActivity activityRef; public MyHandler(MyActivity activity) { activityRef = new WeakReferenceMyActivity(activity); } /** * @return The activity

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread skink
saex wrote: OK, Sorry guys, now i understand you I tryed using your answers to get the solution but it doesn't works by now, i don't know what i'm doing wrong This is the code now (this code is on the handler that is being called each second from a thread). el is the expandableListView

[android-developers] Re: startActivity

2013-02-04 Thread Streets Of Boston
Yep, it's an override :) Note that you can't do a 'startActivity*ForResult*' on a regular Context. For that, you need an Activity. On Monday, February 4, 2013 1:49:03 PM UTC-5, bob wrote: Oh, I see… So, startActivity really comes from the Context class? I was looking at the docs for

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread Streets Of Boston
Yep, but you risk a memory leak of your activity, because the Handler (being tied to the UI thread which will stick around for a long time) is not tied to the life-cycle of your Activity. On Monday, February 4, 2013 2:09:35 PM UTC-5, skink wrote: Streets Of Boston wrote: Yes, you can.

[android-developers] Re: Sending messages to Activity UI thread

2013-02-04 Thread skink
On 4 Lut, 20:19, Streets Of Boston flyingdutc...@gmail.com wrote: Yep, but you risk a memory leak of your activity, because the Handler (being tied to the UI thread which will stick around for a long time) is not tied to the life-cycle of your Activity. yep, so the check for memory leaks in

Re: [android-developers] Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
public class CustomExpandableListAdapter extends BaseExpandableListAdapter { AbsListView.LayoutParams lp = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); SpannableString spanString=null; String[] groups;

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread skink
On 4 Lut, 21:07, saex elpablos...@gmail.com wrote: public class CustomExpandableListAdapter extends BaseExpandableListAdapter package org.abc.def; import java.util.Random; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.Handler;

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
Thanks but i dont understand your code I dont know why you are updating with a for. I only want to update a child, and in my activity i know wich child i want to update, is the child 0 of the group 1. Please, can tell me what is wrong in my code? i just can't understand how to adapt your

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread skink
saex wrote: Thanks but i dont understand your code I dont know why you are updating with a for. I only want to update a child, and in my activity i know wich child i want to update, is the child 0 of the group 1. Please, can tell me what is wrong in my code? i just can't understand how

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
I tryed to adapt your code by adding this into the handler of my activity: int first = el.getFirstVisiblePosition(); int last = el.getLastVisiblePosition(); int cnt = last - first + 1; String tag = Integer.toString(1);

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
Oh!! finally i achieved it! nice! thanks a lot! btw it's not fair to iterate until you reach the correct children, it is l inear cost. Does not exist a fastest way to reach the view that you need to update? thanks El lunes, 4 de febrero de 2013 22:24:35 UTC+1, skink escribió: saex

[android-developers] Re: my app won't die

2013-02-04 Thread lbendlin
Does your app include a foreground service? On Monday, February 4, 2013 10:57:51 AM UTC-5, bob wrote: Sometimes I look at the Devices window in Eclipse. Then I select my app. And, I press the stop sign button to kill it. Then, for some reason, it starts up again on its own a second

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread skink
saex wrote: Oh!! finally i achieved it! nice! thanks a lot! btw it's not fair to iterate until you reach the correct children, it is l inear cost. Does not exist a fastest way to reach the view that you need to update? I don't think its slow: there are max 10 or something visible

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
well, i finally did it with TextView v = (TextView)el.findViewById(idx); and setId instead of setTag i think this is fastest than the for, what do you think? El lunes, 4 de febrero de 2013 22:52:57 UTC+1, skink escribió: saex wrote: Oh!! finally i achieved it! nice! thanks a lot!

[android-developers] Widget like SlidingDrawer

2013-02-04 Thread Nathan
I'm looking for a widget like the now deprecated SlidingDrawer, with one difference. I don't need it to be either open or shut. It's acceptable for users to have it all open, half open, or 30% open, or x% open. I didn't want to reinvent the wheel if there is already a better widget, or

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread saex
And what about this? (from first to last) for (int i = first; i = last; i++) { TextView v = (TextView)el.getChildAt(i); it can give an exception? or it's the better way? thanks El lunes, 4 de febrero de 2013 23:09:49 UTC+1, saex escribió: well, i finally did it with TextView v =

[android-developers] Re: my app won't die

2013-02-04 Thread bob
No. Basically, the activity I am killing is a Blue Screen of Death Activity that I made to show an error. When I kill it, I think the original activity that generated the error gets restarted. Then, it generates the error again. I guess there is something wrong with my design? How

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread Lew
saex wrote: well, i [sic] finally did it with TextView v = (TextView)el.findViewById(idx); and setId instead of setTag i think this is fastest than the for, what do you think? Under the hood,m doesn't 'findViewById()' do a linear search? Why are you worried about speed here?skink

Re: [android-developers] Re: Unpublishing an APK

2013-02-04 Thread TreKing
On Mon, Feb 4, 2013 at 4:08 AM, Kostya Vasilyev kmans...@gmail.com wrote: But you can Both the new and the old publishing UIs have an expert (detailed?) mode with a list of uploaded .apk's and there are buttons to deactivate / active them as needed. That's what I'm talking about -

[android-developers] Regarding bluetooth printing

2013-02-04 Thread sourabh sahu
Dear All, I am looking for solution for my app to have feature of bluetooth printing, Please suggest some codes and example for this. Thanks, Sourabh -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Efficient way to update one of the childs of a ExpandableListView group?

2013-02-04 Thread skink
saex wrote: well, i finally did it with TextView v = (TextView)el.findViewById(idx); and setId instead of setTag i think this is fastest than the for, what do you think? now that you are properly using convertView in your adapter, try to call good old notifyDataSetChanged instead of