Re: [android-developers] Digest for android-developers@googlegroups.com - 20 Messages in 8 Topics
-- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can this variable become null?
Not at random ... only when needed. On Sunday, March 17, 2013 6:33:01 PM UTC+2, G. Blake Meike wrote: On Sunday, March 17, 2013 9:09:54 AM UTC-7, Piren wrote: If your application has a singleton that takes 200MB of memory and takes a minute to load (dont ask why :-) ), but is only needed if you use a specific part of the app, why load it on the app load? Can you suggest a better time? Why is loading it at some random time, better? -blake -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can this variable become null?
Generalizing is bad, which is why i didnt agree with the Singletons are bad, m'kay mentality here :) But yeah, i agree with all your points. In some cases lazy loading makes sense, in some it doesn't. Though i'm not sure how concurrency is an issue, Pill Pugh's implementation is probably the easiest implementation there is, not sure why some people here recommended the error-prone instance == null methods. On Sunday, March 17, 2013 9:08:34 PM UTC+2, Lew wrote: Lew wrote: The biggest problem I have with singletons is that everyone for some god-awful reason insists on lazily instantiating them. Why? Lazy instantiation is lazy. What's wrong with non-lazy instantiation? Then you can use a 'final' reference to the singleton instance that exists without effort or overhead. -- Lew Piren wrote: If your application has a singleton that takes 200MB of memory and takes a minute to load (dont ask why :-) ), but is only needed if you use a specific part of the app, why load it on the app load? I couldn't agree more. But that is far more likely to be a local variable to that specific part of the app than a singleton. Unless, of course, you are absolutely certain to hit that specific part of the app, and app-load is a time when people expect delay, and the time they hit that specific part of the app is not such a time, in which case you are far better off taking the performance hit at app load and not during the specific part of the app. Then I disagree. However, if it truly is a singleton, or whatever, then yeah, sure, lazy load, if the circumstances are right, like not in that counter-scenario I just outlined, but then you have extra work to do it right, at least of concurrency is involved. But that isn't a general policy of insisting on using a singleton and insisting on using lazy load, which is that against which I rail against. Never generalize. -- Lew -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Text dissapears when view is rotated in getChildStaticTransformation (4.x / maybe also honeycomb)
Romain Guy romain...@android.com wrote: Does it happen on all 4.x versions? (4.0, 4.1 and 4.2?) If so, please file a bug at b.android.com. On Sun, Mar 17, 2013 at 4:38 PM, user123 ivanschu...@gmail.com wrote: I'm rotating a custom view, which contains a textview, using getChildStaticTransformation: @Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); camera.save(); final Matrix imageMatrix = t.getMatrix(); float transX = (textView.getWidth() / 2.0f); float transY = (textView.getHeight() / 2.0f); camera.rotateY(rot); camera.getMatrix(imageMatrix); imageMatrix.preTranslate(-transX, -transY); imageMatrix.postTranslate(transX, transY); camera.restore(); //... } This works very well on all 2.x devices I have tested, but in 4.x devices, on angle != 0, the text dissapears. Rotation works well, but the text dissapears. It appears again if rotation is 0. What can I do to solve this? Thanks in advance! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Romain Guy Android framework engineer romain...@android.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/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] Why I receive a wrong valuew from InputMethodManager.isFullScreenMode()?
InputMethodManager contains a function called isFullscreenMode() that is supposed to return a boolean that indicated whether the soft keyboard is in extract mode (full screen) or not. In my application I switch from portrait to landscape mode and bring up the keyboard: mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); The keyboard shows up in fullscreen, but imm.isFullscreenMode() returns false. How is that 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] Re: Replace Old DB file
Hello, Even i am facing similar kind of problem. Basically my old file consists of 1 table and new file consists of 4 tables. I just want to replace old file by new file so that i can insert/update/delete records on device. If you found out the solution please let me know as soon as possible. On Monday, November 9, 2009 9:14:57 AM UTC+5:30, TJ wrote: Hi, I am having a hard time in DDMS Push a file onto device I have an old database file that I like to replace with a new file that I created using sql studio. If anybody have any idea on how to do this please let me know, thanks tj -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 can i play the video from SD card in webview using Iframe, android?
I am using webview to play youtube videos . This is working fine. But i wanted to try this. How can i play the videos from SD card in Webview using Iframe in android. I have googled alot about this. Anyone can suggest me about this? Any suggestions / ideas would be highly appreciated. Thanks ! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] Text dissapears when view is rotated in getChildStaticTransformation (4.x / maybe also honeycomb)
I just have 2 devices, Galaxy Nexus and Nexus 7, both with 4.2. Can't test on more. If nobody else has feedback on this, I would submit the bug anyways (?). Am Montag, 18. März 2013 06:56:50 UTC+1 schrieb Romain Guy (Google): Does it happen on all 4.x versions? (4.0, 4.1 and 4.2?) If so, please file a bug at b.android.com. On Sun, Mar 17, 2013 at 4:38 PM, user123 ivans...@gmail.com javascript: wrote: I'm rotating a custom view, which contains a textview, using getChildStaticTransformation: @Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); camera.save(); final Matrix imageMatrix = t.getMatrix(); float transX = (textView.getWidth() / 2.0f); float transY = (textView.getHeight() / 2.0f); camera.rotateY(rot); camera.getMatrix(imageMatrix); imageMatrix.preTranslate(-transX, -transY); imageMatrix.postTranslate(transX, transY); camera.restore(); //... } This works very well on all 2.x devices I have tested, but in 4.x devices, on angle != 0, the text dissapears. Rotation works well, but the text dissapears. It appears again if rotation is 0. What can I do to solve this? Thanks in advance! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Romain Guy Android framework engineer roma...@android.com javascript: -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Improve data retriveing time from server.
Hi friends, i am developing CRM application in android,but when retriveing data from server it is take much time for displaying data on device.How can i improve thid problum. *For Example.* In Server has 100 records,when i am retriveinng these records i need to display with in the fraction of time. please help me how can i do it. Thankyou in advance. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Text dissapears when view is rotated in getChildStaticTransformation (4.x / maybe also honeycomb)
It seems to be 4.2 only. I tested in the emulator 4.0, 4.1 and 4.2 and happened only on 4.2. As mentioned, concerning devices, I have only 4.2, where it happens. I'm using Google maps api (the emulators have to be configured to use this instead of plain 4.x), but I think it's not relevant for this. Am Montag, 18. März 2013 12:20:12 UTC+1 schrieb user123: I just have 2 devices, Galaxy Nexus and Nexus 7, both with 4.2. Can't test on more. If nobody else has feedback on this, I would submit the bug anyways (?). Am Montag, 18. März 2013 06:56:50 UTC+1 schrieb Romain Guy (Google): Does it happen on all 4.x versions? (4.0, 4.1 and 4.2?) If so, please file a bug at b.android.com. On Sun, Mar 17, 2013 at 4:38 PM, user123 ivans...@gmail.com wrote: I'm rotating a custom view, which contains a textview, using getChildStaticTransformation: @Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); camera.save(); final Matrix imageMatrix = t.getMatrix(); float transX = (textView.getWidth() / 2.0f); float transY = (textView.getHeight() / 2.0f); camera.rotateY(rot); camera.getMatrix(imageMatrix); imageMatrix.preTranslate(-transX, -transY); imageMatrix.postTranslate(transX, transY); camera.restore(); //... } This works very well on all 2.x devices I have tested, but in 4.x devices, on angle != 0, the text dissapears. Rotation works well, but the text dissapears. It appears again if rotation is 0. What can I do to solve this? Thanks in advance! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-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. -- Romain Guy Android framework engineer roma...@android.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Replace Old DB file
If I have understood your problem correctly this link will help you. http://stackoverflow.com/questions/7268908/access-the-phone-internal-storage-to-push-in-sqlite-database-file Thanks Regards, Nirav Parmar On Mon, Mar 18, 2013 at 3:20 PM, rachana govilkar rachana.govil...@gmail.com wrote: Hello, Even i am facing similar kind of problem. Basically my old file consists of 1 table and new file consists of 4 tables. I just want to replace old file by new file so that i can insert/update/delete records on device. If you found out the solution please let me know as soon as possible. On Monday, November 9, 2009 9:14:57 AM UTC+5:30, TJ wrote: Hi, I am having a hard time in DDMS Push a file onto device I have an old database file that I like to replace with a new file that I created using sql studio. If anybody have any idea on how to do this please let me know, thanks tj -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Improve data retriveing time from server.
There's not really any way to speed up the transfer. If there is some application specific compression you can do, you might try that, but otherwise it's basically impossible. Kris On Mon, Mar 18, 2013 at 7:26 AM, sree android android.sreeni...@gmail.com wrote: Hi friends, i am developing CRM application in android,but when retriveing data from server it is take much time for displaying data on device.How can i improve thid problum. For Example. In Server has 100 records,when i am retriveinng these records i need to display with in the fraction of time. please help me how can i do it. Thankyou in advance. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Slow tiles dissapearing animation
I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slow tiles dissapearing animation
I did a tiny optimization, I prefill a list with the children, such that I just do childrenList.get(index); instead of int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); But, as expected, this didn't have a noticeable improvement. Am Montag, 18. März 2013 14:53:18 UTC+1 schrieb user123: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slow tiles dissapearing animation
Ah, the number of cells is not high, I'm testing between 8x8 and 12x12 Am Montag, 18. März 2013 14:53:18 UTC+1 schrieb user123: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Developer payouts on the 15th
Well, the payment showed up in my bank account today (*March 18*), which is one business day after the ides of March. This was also the case with my last payment from Google - showed up one day after the payout in Google's records. They may have to pay about ten thousand developers, so I don't think that's very bad. Also, I would imagine the amount of money most of us earn thru this mechanism is so insignificant that it doesn't impact our finances much having to wait a business day. On Friday, March 15, 2013 4:16:29 PM UTC-5, niko20 wrote: Midnight on the 14th IS the 15th, my current employer works just this way. I get paid on Fridays. But the transfer starts Thursday at Midnight. On Friday, March 15, 2013 4:13:43 PM UTC-5, bob wrote: On Friday, March 15, 2013 4:04:02 PM UTC-5, niko20 wrote: I don't understand how Google always says payouts will be a certain date, but you end up waiting 2 to 3 days longer. For example, if they say payout is going to now be on the 15th, I would expect a payout to be applied at Midnight on the 14th. If they say payout is going to now be on the 15th, I would expect it to be on the 15th. This is exactly what my full time workplace does. What always happens is they don't pay until probably the actual day *of* the 15th , maybe not until midnight, and usually this means you don't even get the money until after a weekend or so because the bank is still processing it. I don't get why this is such a mystery for them to make work on a timely manner. -niko20 -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Grid view with proportional images?
I 4 - colums grid where the items are an image on top and bellow a textview. The image fills all the available width - no padding or anything. My images will all have exactly the same size. Now I want that the height of the view adjusts to the width - to keep the images proportional. AFAIK this is not possible with Android's scaling types. So I put this code after I load the bitmap (it's feched from the web): imageView.post(new Runnable() { @Override public void run() { double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight()); int width = imageView.getWidth(); int newH = (int)(width * factor); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH); imageView.setLayoutParams(params); //convertViewFinal.invalidate(); //doesn't help //convertViewFinal.requestLayout(); //doesn't help } }); It works for most of the images, but on some, it doesn't show any image (the imageview looks like GONE), and in some cases this also breaks the grid layout. Why is it? I know that the bitmaps are fine, because, in my testing application, I loop through the same bitmaps many times - they appear after x items in the grid again, and they are fine. And each time I load the grid, different items have the problem. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slow tiles dissapearing animation
Maybe use OpenGL? On Monday, March 18, 2013 8:53:18 AM UTC-5, user123 wrote: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: How can i play the video from SD card in webview using Iframe, android?
Why must you use a WebView? Why not just use a *VideoView* where this can be done without much hassle? Thanks. On Monday, March 18, 2013 5:39:46 AM UTC-5, Meena Rengarajan wrote: I am using webview to play youtube videos . This is working fine. But i wanted to try this. How can i play the videos from SD card in Webview using Iframe in android. I have googled alot about this. Anyone can suggest me about this? Any suggestions / ideas would be highly appreciated. Thanks ! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To 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: Grid view with proportional images?
Shouldn't you convert the getWidth() and getHeight() to *double*s before your division? Thanks. On Monday, March 18, 2013 9:41:26 AM UTC-5, user123 wrote: I 4 - colums grid where the items are an image on top and bellow a textview. The image fills all the available width - no padding or anything. My images will all have exactly the same size. Now I want that the height of the view adjusts to the width - to keep the images proportional. AFAIK this is not possible with Android's scaling types. So I put this code after I load the bitmap (it's feched from the web): imageView.post(new Runnable() { @Override public void run() { double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight()); int width = imageView.getWidth(); int newH = (int)(width * factor); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH); imageView.setLayoutParams(params); //convertViewFinal.invalidate(); //doesn't help //convertViewFinal.requestLayout(); //doesn't help } }); It works for most of the images, but on some, it doesn't show any image (the imageview looks like GONE), and in some cases this also breaks the grid layout. Why is it? I know that the bitmaps are fine, because, in my testing application, I loop through the same bitmaps many times - they appear after x items in the grid again, and they are fine. And each time I load the grid, different items have the problem. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: connecting to mysql database
Why not download a telnet app and try to telnet to 10.0.2.2 on port 80? Thanks. On Sunday, November 20, 2011 12:40:50 PM UTC-6, mark kelly wrote: Hi Im trying to connect to a mysql database which is on localhost. i get the error: Error in http connection org.apache.http.conn.HttpHostConnectException: Connection to http://10.0.2.2 refused The code is: package com.test.poll; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.Toast; public class Poll extends Activity { InputStream is; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String result = ; //the year data to send ArrayListNameValuePair nameValuePairs = new ArrayListNameValuePair(); nameValuePairs.add(new BasicNameValuePair(year,1990)); //http post try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(http://10.0.2.2/ android/getAllPeopleBornAfter.php); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); Log.e(log_tag, connection success ); Toast.makeText(getApplicationContext(), pass, Toast.LENGTH_SHORT).show(); }catch(Exception e){ Log.e(log_tag, Error in http connection +e.toString()); Toast.makeText(getApplicationContext(), failed+e.toString(), Toast.LENGTH_SHORT).show(); } //convert response to string try{ BufferedReader reader = new BufferedReader(new InputStreamReader(is,iso-8859-1),8); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + \n); Toast.makeText(getApplicationContext(), pass, Toast.LENGTH_SHORT).show(); } is.close(); result=sb.toString(); }catch(Exception e){ Log.e(log_tag, Error converting result +e.toString()); Toast.makeText(getApplicationContext(), failed+e.toString(), Toast.LENGTH_SHORT).show(); } //parse json data try{ JSONArray jArray = new JSONArray(result); for(int i=0;ijArray.length();i++){ JSONObject json_data = jArray.getJSONObject(i); Log.i(log_tag,id: +json_data.getInt(id)+ , name: +json_data.getString(name) + , sex: +json_data.getInt(sex)+ , birthyear: +json_data.getInt(birthyear) ); Toast.makeText(getApplicationContext(), pass, Toast.LENGTH_SHORT).show(); } }catch(JSONException e){ Log.e(log_tag, Error parsing data +e.toString()); Toast.makeText(getApplicationContext(), failed+e.toString(), Toast.LENGTH_SHORT).show(); } } } I have a php script to connect to the database but the app isn't getting that far. Is the url string right? I have seen to use 10.0.2.2 instead of localhostbut its not working for 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 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: Why I receive a wrong valuew from InputMethodManager.isFullScreenMode()?
Maybe put a breakpoint here in InputMethodManager? * /** @hide */* *public void setFullscreenMode(boolean fullScreen) {* *mFullscreenMode = fullScreen;* *}* Then you can at least see if that gets called. On Monday, March 18, 2013 3:48:47 AM UTC-5, AndroidCompile wrote: InputMethodManager contains a function called isFullscreenMode() that is supposed to return a boolean that indicated whether the soft keyboard is in extract mode (full screen) or not. In my application I switch from portrait to landscape mode and bring up the keyboard: mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); The keyboard shows up in fullscreen, but imm.isFullscreenMode() returns false. How is that 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] Overlap PagerTabStrip
Hi All, I have custom view_pager. And i am using pagertabstrip to show view title. but the view and pager title strip are overlapping with each other when i am swiping to change view. Am i missing anything? Please comment on below code. media.galleryAir.ViewPager_TransitionEffects android:id=@id/viewPager android:layout_width=fill_parent android:layout_height=0.0dip android:layout_weight=9.0 android.support.v4.view.PagerTabStrip android:id=@id/tabstrip android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=top android:background=@android:color/darker_gray android:paddingBottom=4.0dip android:paddingTop=4.0dip / /media.galleryAir.ViewPager_TransitionEffects Thanks And Regards Fahad Mullaji -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] RuntimeException: Canvas: trying to use a recycled bitmap
Hi! I'm having a weird problem with one of my apps. I'll try later to extract some code and make a sample project to share if it's useful but by now I'm just asking to see if anyone found this one or can give me a hint on how to tackle it. I have two activities. Activity A extends SherlockActivity from ActionBarSherlock and haves a GridView on it. The grid items have an ImageButton. When you press on the ImageButton, it calls an instance of Activity B. Activity B extends SherlockFragmentActivity (ActionBarSherlock again), with a ViewPager on it. The fragments have a very complex layout. My Activity B has a menu with only one item. The item is set-up on onOptionsItemSelected so it simply calls onBackPressed(). That one calls super.onBackPressed() right away. I've only overridden it for debugging purposes. I tested it on some Jelly Bean devices and on a couple Gingerbread ones (I'm using some co-workers phones as test devices :)). On Jelly Bean it's ok. But in Gingerbread I've met a weird behaviour. When I'm on B, and press the back button on the device, it closes B and goes normally to A. But, if I press the option on the menu, I've got a force close message and I've got the following log: java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@2b021388 at android.graphics.Canvas.throwIfRecycled(Canvas.java:955) at android.graphics.Canvas.drawBitmap(Canvas.java:1044) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:325) at android.widget.ImageView.onDraw(ImageView.java:881) at android.view.View.draw(View.java:6986) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.widget.FrameLayout.draw(FrameLayout.java:361) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.widget.FrameLayout.draw(FrameLayout.java:361) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.support.v4.view.ViewPager.draw(ViewPager.java:1923) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.widget.FrameLayout.draw(FrameLayout.java:361) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1882) at android.view.ViewRoot.draw(ViewRoot.java:1544) at android.view.ViewRoot.performTraversals(ViewRoot.java:1280) at android.view.ViewRoot.handleMessage(ViewRoot.java:1882) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3701) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) at dalvik.system.NativeStart.main(Native Method) The stack seems to relate to my Activity B structure. My app loads puts large images on screen, so I have a couple recycle() calls on the fragments that take part of Activity B, but they're all inside !bitmap.isRecycled() conditions, and they're all around the first steps on the activity and fragments life cycle. Anyway, there is no recycle() call in my whole project that it's not followed by some assignation, either with null or with some generated bitmap. When I debugged the exception didn't fire there. It just appears to be nowhere, jumping outright from the last line on my onPause() on Activity B to the runtime exception. To add some debug chance, I've set a handler with setDefaultUncaughtExceptionHandler to check what the behaviour would be after the Exception is thrown, and what I see is: * In a Samsung device with a Mod Gingerbreas, first the option on the menu on Activity B disappearing, then the Activity B dissapearing into to background, a black screen and just a couple seconds later I get an ANR. * In an unrooted Sony device , I've got to the
[android-developers] Re: Grid view with proportional images?
Yes, sorry, it was in the original code, and I removed it before pasting here (thought it could be unnecessary) the line is double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight() * 1d); Am Montag, 18. März 2013 18:08:56 UTC+1 schrieb bob: Shouldn't you convert the getWidth() and getHeight() to *double*s before your division? Thanks. On Monday, March 18, 2013 9:41:26 AM UTC-5, user123 wrote: I 4 - colums grid where the items are an image on top and bellow a textview. The image fills all the available width - no padding or anything. My images will all have exactly the same size. Now I want that the height of the view adjusts to the width - to keep the images proportional. AFAIK this is not possible with Android's scaling types. So I put this code after I load the bitmap (it's feched from the web): imageView.post(new Runnable() { @Override public void run() { double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight()); int width = imageView.getWidth(); int newH = (int)(width * factor); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH); imageView.setLayoutParams(params); //convertViewFinal.invalidate(); //doesn't help //convertViewFinal.requestLayout(); //doesn't help } }); It works for most of the images, but on some, it doesn't show any image (the imageview looks like GONE), and in some cases this also breaks the grid layout. Why is it? I know that the bitmaps are fine, because, in my testing application, I loop through the same bitmaps many times - they appear after x items in the grid again, and they are fine. And each time I load the grid, different items have the problem. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slow tiles dissapearing animation
For a simple animation like this? That's a total overkill... Am Montag, 18. März 2013 17:12:52 UTC+1 schrieb bob: Maybe use OpenGL? On Monday, March 18, 2013 8:53:18 AM UTC-5, user123 wrote: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slow tiles dissapearing animation
Well, the simple is my opinion, of course, fading out 50-100 cells quickly, doesn't feels like OpenGL to me. Besides I have a sliding menu on the side (like Facebook app), and my experiences with OpenGL, is that it will not slide with the rest of the content. Which makes sense according to some docs I read that the OpenGL view is a hole in the screen. Am Montag, 18. März 2013 18:55:28 UTC+1 schrieb user123: For a simple animation like this? That's a total overkill... Am Montag, 18. März 2013 17:12:52 UTC+1 schrieb bob: Maybe use OpenGL? On Monday, March 18, 2013 8:53:18 AM UTC-5, user123 wrote: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] OpenGL Tracer not working with a Nexus 7?
Hello, I have a Nexus 7 running 4.2.2. I'm trying to trace an OpenGL ES 2.0 application, but I can never seem to get OpenGL ES Tracer to work. I'm following the instructions here: http://developer.android.com/tools/help/gltracer.html The tracer seems to load fine, and when I put in the package and activity class, the right application is launched and the activity starts, and Tracer says that it's tracing. However, the size always stays at 0MB and the trace file remains at 0 bytes. Occasionally I'll see a socket write error right away, but usually I won't. If I then click Enable next to Collect Framebuffer contents on glDraw*(), then I always see a Connection reset by peer: socket write error error message. I'd really like to get this to work. I played around with different settings in the Developer options to no avail. I even tried on OS X in case it was a Windows issue, and I had the same problems there. Thanks! https://lh6.googleusercontent.com/-Cjjc0k7qa2g/UUdW6TKRDcI/AAM/s1q3j4RZat8/s1600/socket-write-error.png https://lh6.googleusercontent.com/-va1y14LW0y8/UUdXENDe2PI/AAc/SzoBs9P33cs/s1600/socket-write-error-2.png -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Grid view with proportional images?
I think this only works if your images are in a LinearLayout.: *LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH);* Maybe change LinearLayout to *GridView*? On Monday, March 18, 2013 12:51:58 PM UTC-5, user123 wrote: Yes, sorry, it was in the original code, and I removed it before pasting here (thought it could be unnecessary) the line is double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight() * 1d); Am Montag, 18. März 2013 18:08:56 UTC+1 schrieb bob: Shouldn't you convert the getWidth() and getHeight() to *double*s before your division? Thanks. On Monday, March 18, 2013 9:41:26 AM UTC-5, user123 wrote: I 4 - colums grid where the items are an image on top and bellow a textview. The image fills all the available width - no padding or anything. My images will all have exactly the same size. Now I want that the height of the view adjusts to the width - to keep the images proportional. AFAIK this is not possible with Android's scaling types. So I put this code after I load the bitmap (it's feched from the web): imageView.post(new Runnable() { @Override public void run() { double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight()); int width = imageView.getWidth(); int newH = (int)(width * factor); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH); imageView.setLayoutParams(params); //convertViewFinal.invalidate(); //doesn't help //convertViewFinal.requestLayout(); //doesn't help } }); It works for most of the images, but on some, it doesn't show any image (the imageview looks like GONE), and in some cases this also breaks the grid layout. Why is it? I know that the bitmaps are fine, because, in my testing application, I loop through the same bitmaps many times - they appear after x items in the grid again, and they are fine. And each time I load the grid, different items have the problem. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: RuntimeException: Canvas: trying to use a recycled bitmap
Why don't you take out the recycle() calls altogether and see if it works? Even if you assign after recycling, the following could happen: *bitmap.recycle();* * * * thread switch * * * *other thread tries to use bitmap* On Monday, March 18, 2013 12:50:37 PM UTC-5, Marina Cuello wrote: Hi! I'm having a weird problem with one of my apps. I'll try later to extract some code and make a sample project to share if it's useful but by now I'm just asking to see if anyone found this one or can give me a hint on how to tackle it. I have two activities. Activity A extends SherlockActivity from ActionBarSherlock and haves a GridView on it. The grid items have an ImageButton. When you press on the ImageButton, it calls an instance of Activity B. Activity B extends SherlockFragmentActivity (ActionBarSherlock again), with a ViewPager on it. The fragments have a very complex layout. My Activity B has a menu with only one item. The item is set-up on onOptionsItemSelected so it simply calls onBackPressed(). That one calls super.onBackPressed() right away. I've only overridden it for debugging purposes. I tested it on some Jelly Bean devices and on a couple Gingerbread ones (I'm using some co-workers phones as test devices :)). On Jelly Bean it's ok. But in Gingerbread I've met a weird behaviour. When I'm on B, and press the back button on the device, it closes B and goes normally to A. But, if I press the option on the menu, I've got a force close message and I've got the following log: java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@2b021388 at android.graphics.Canvas.throwIfRecycled(Canvas.java:955) at android.graphics.Canvas.drawBitmap(Canvas.java:1044) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:325) at android.widget.ImageView.onDraw(ImageView.java:881) at android.view.View.draw(View.java:6986) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.widget.FrameLayout.draw(FrameLayout.java:361) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.widget.FrameLayout.draw(FrameLayout.java:361) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.support.v4.view.ViewPager.draw(ViewPager.java:1923) at android.view.ViewGroup.drawChild(ViewGroup.java:1739) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.ViewGroup.drawChild(ViewGroup.java:1737) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1466) at android.view.View.draw(View.java:6989) at android.widget.FrameLayout.draw(FrameLayout.java:361) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1882) at android.view.ViewRoot.draw(ViewRoot.java:1544) at android.view.ViewRoot.performTraversals(ViewRoot.java:1280) at android.view.ViewRoot.handleMessage(ViewRoot.java:1882) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3701) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) at dalvik.system.NativeStart.main(Native Method) The stack seems to relate to my Activity B structure. My app loads puts large images on screen, so I have a couple recycle() calls on the fragments that take part of Activity B, but they're all inside !bitmap.isRecycled() conditions, and they're all around the first steps on the activity and fragments life cycle. Anyway, there is no recycle() call in my whole project that it's not followed by some assignation, either with null or with some generated bitmap. When I debugged the exception didn't fire there. It just appears to be nowhere, jumping outright from the last line on my onPause() on Activity B to the runtime exception. To add some debug
[android-developers] Re: Slow tiles dissapearing animation
Maybe try this? In your Android manifest file, add the following attribute to the application tag to enable hardware acceleration for your entire application: application *android:hardwareAccelerated=true* ... *http://developer.android.com/guide/topics/graphics/hardware-accel.html* On Monday, March 18, 2013 1:03:31 PM UTC-5, user123 wrote: Well, the simple is my opinion, of course, fading out 50-100 cells quickly, doesn't feels like OpenGL to me. Besides I have a sliding menu on the side (like Facebook app), and my experiences with OpenGL, is that it will not slide with the rest of the content. Which makes sense according to some docs I read that the OpenGL view is a hole in the screen. Am Montag, 18. März 2013 18:55:28 UTC+1 schrieb user123: For a simple animation like this? That's a total overkill... Am Montag, 18. März 2013 17:12:52 UTC+1 schrieb bob: Maybe use OpenGL? On Monday, March 18, 2013 8:53:18 AM UTC-5, user123 wrote: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Developer payouts on the 15th
On Monday, March 18, 2013 7:17:26 AM UTC-7, bob wrote: Also, I would imagine the amount of money most of us earn thru this mechanism is so insignificant that it doesn't impact our finances much having to wait a business day. That part is sad if true ;(. But I would agree that if the amount of money is insignificant, that that is a more important problem to work on. ;) The part that continually confounds my accountant is what the heck takes so long to get out the financial reports. Why is it not an automated process? October's report was available around Nov 24th. Now that Google has given themselves 15 days to make the deposit, are they going to give themselves 40 days to make the report? This is a real impact. The IRS will send you nasty letters and fines if they think you are not sending them the right amount each month. Nathan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Grid view with proportional images?
They are in a linear layout, each cell has a (linear) layout... This also would cause a class cast exception. Am Montag, 18. März 2013 20:15:17 UTC+1 schrieb bob: I think this only works if your images are in a LinearLayout.: *LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH);* Maybe change LinearLayout to *GridView*? On Monday, March 18, 2013 12:51:58 PM UTC-5, user123 wrote: Yes, sorry, it was in the original code, and I removed it before pasting here (thought it could be unnecessary) the line is double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight() * 1d); Am Montag, 18. März 2013 18:08:56 UTC+1 schrieb bob: Shouldn't you convert the getWidth() and getHeight() to *double*s before your division? Thanks. On Monday, March 18, 2013 9:41:26 AM UTC-5, user123 wrote: I 4 - colums grid where the items are an image on top and bellow a textview. The image fills all the available width - no padding or anything. My images will all have exactly the same size. Now I want that the height of the view adjusts to the width - to keep the images proportional. AFAIK this is not possible with Android's scaling types. So I put this code after I load the bitmap (it's feched from the web): imageView.post(new Runnable() { @Override public void run() { double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight()); int width = imageView.getWidth(); int newH = (int)(width * factor); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH); imageView.setLayoutParams(params); //convertViewFinal.invalidate(); //doesn't help //convertViewFinal.requestLayout(); //doesn't help } }); It works for most of the images, but on some, it doesn't show any image (the imageview looks like GONE), and in some cases this also breaks the grid layout. Why is it? I know that the bitmaps are fine, because, in my testing application, I loop through the same bitmaps many times - they appear after x items in the grid again, and they are fine. And each time I load the grid, different items have the problem. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Grid view with proportional images?
I've never used GridView, but that sounds fishy using a LinearLayout for each cell. Why not just use wrap_content, wrap_content for the ImageViews and scale all bitmaps using this: public static Bitmap *createScaledBitmap* (Bitmap src, int dstWidth, int dstHeight, boolean filter) Added in API level 1 Creates a new bitmap, scaled from an existing bitmap, when possible. If the specified width and height are the same as the current width and height of the source btimap, the source bitmap is returned and now new bitmap is created. Parameters src The source bitmap. dstWidth The new bitmap's desired width. dstHeight The new bitmap's desired height. filter true if the source should be filtered. Returns The new scaled bitmap or the source bitmap if no scaling is required. On Monday, March 18, 2013 3:55:37 PM UTC-5, user123 wrote: They are in a linear layout, each cell has a (linear) layout... This also would cause a class cast exception. Am Montag, 18. März 2013 20:15:17 UTC+1 schrieb bob: I think this only works if your images are in a LinearLayout.: *LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH);* Maybe change LinearLayout to *GridView*? On Monday, March 18, 2013 12:51:58 PM UTC-5, user123 wrote: Yes, sorry, it was in the original code, and I removed it before pasting here (thought it could be unnecessary) the line is double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight() * 1d); Am Montag, 18. März 2013 18:08:56 UTC+1 schrieb bob: Shouldn't you convert the getWidth() and getHeight() to *double*s before your division? Thanks. On Monday, March 18, 2013 9:41:26 AM UTC-5, user123 wrote: I 4 - colums grid where the items are an image on top and bellow a textview. The image fills all the available width - no padding or anything. My images will all have exactly the same size. Now I want that the height of the view adjusts to the width - to keep the images proportional. AFAIK this is not possible with Android's scaling types. So I put this code after I load the bitmap (it's feched from the web): imageView.post(new Runnable() { @Override public void run() { double factor = loadedBitmap.getWidth() / (loadedBitmap.getHeight()); int width = imageView.getWidth(); int newH = (int)(width * factor); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(width, newH); imageView.setLayoutParams(params); //convertViewFinal.invalidate(); //doesn't help //convertViewFinal.requestLayout(); //doesn't help } }); It works for most of the images, but on some, it doesn't show any image (the imageview looks like GONE), and in some cases this also breaks the grid layout. Why is it? I know that the bitmaps are fine, because, in my testing application, I loop through the same bitmaps many times - they appear after x items in the grid again, and they are fine. And each time I load the grid, different items have the problem. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Android PDK
I've been able to find the Android PDK on http://www.kandroid.org/online-pdk/guide/index.html but would like to know where I can find it directly from Google? I've searched around and was able to find news articles talking about the PDK but apparently kandroid is the only place that actually hosts it. Cheers, -Ryan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Slow tiles dissapearing animation
Doesn't help... I think it's even worser now. Am Montag, 18. März 2013 20:28:21 UTC+1 schrieb bob: Maybe try this? In your Android manifest file, add the following attribute to the application tag to enable hardware acceleration for your entire application: application *android:hardwareAccelerated=true* ... *http://developer.android.com/guide/topics/graphics/hardware-accel.html* On Monday, March 18, 2013 1:03:31 PM UTC-5, user123 wrote: Well, the simple is my opinion, of course, fading out 50-100 cells quickly, doesn't feels like OpenGL to me. Besides I have a sliding menu on the side (like Facebook app), and my experiences with OpenGL, is that it will not slide with the rest of the content. Which makes sense according to some docs I read that the OpenGL view is a hole in the screen. Am Montag, 18. März 2013 18:55:28 UTC+1 schrieb user123: For a simple animation like this? That's a total overkill... Am Montag, 18. März 2013 17:12:52 UTC+1 schrieb bob: Maybe use OpenGL? On Monday, March 18, 2013 8:53:18 AM UTC-5, user123 wrote: I'm trying to make one of these animations where an image fades in with tiles. (Note: I need this to work from Api 8) To do that, I created a black grid and put it on top of the image and using a handler, make each cell dissapear. It works but the animation takes a bit more than 1 second, even when I post to the handler without any delay. This looks laggy and strange. The effect has to be very quick. I tried many things - using programmatically generated linearlayout with rows instead of grid, using fade out animation, using no animation at all, toggling visibility with View.GONE, or View.INVISIBLE, or just setting the background color to 0x. Nothing helps, I can't make the animation quicker. I tested in 2.3 smartphone, in 4.2 smartphone and 4.2 tablet, all look the same. Well, in the 4.2 devices, the animation sometimes doesn't show at all - like it was executed already. But when it's visible, it's slow. Any advice on this? Or do I have to use a completly different approach? Is there a library to do this kind of effects, maybe? Here is my relevant code: ListInteger done = new ArrayListInteger(); private Handler handler = new Handler(); private Runnable fadeInRunnable = new Runnable() { @Override public void run() { if (!done.isEmpty()) { //int index = (int)(Math.random() * done.size()); int index = 0; int itemIndex = done.get(index); int rowIndex = (int)Math.floor(itemIndex / ROWS); ViewGroup row = (ViewGroup)imageMask.getChildAt(rowIndex); View child = row.getChildAt(itemIndex - (rowIndex * ROWS)); // child.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_out_short)); //child.startAnimation(anim); child.setBackgroundColor(0x); //child.setVisibility(View.INVISIBLE); done.remove(index); handler.post(this); //handler.postDelayed(this, 1); } } }; Thanks in advance, Ivan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Text dissapears when view is rotated in getChildStaticTransformation (4.x / maybe also honeycomb)
Now I also noticed that it happens only with android:hardwareAccelerated=false. When true, the text is displayed. But I need to set it to false, because otherwise the views don't rotate correctly... (it's a well known issue e.g. with this http://code.google.com/p/android-coverflow/coverflow implementation). Am Montag, 18. März 2013 12:52:28 UTC+1 schrieb user123: It seems to be 4.2 only. I tested in the emulator 4.0, 4.1 and 4.2 and happened only on 4.2. As mentioned, concerning devices, I have only 4.2, where it happens. I'm using Google maps api (the emulators have to be configured to use this instead of plain 4.x), but I think it's not relevant for this. Am Montag, 18. März 2013 12:20:12 UTC+1 schrieb user123: I just have 2 devices, Galaxy Nexus and Nexus 7, both with 4.2. Can't test on more. If nobody else has feedback on this, I would submit the bug anyways (?). Am Montag, 18. März 2013 06:56:50 UTC+1 schrieb Romain Guy (Google): Does it happen on all 4.x versions? (4.0, 4.1 and 4.2?) If so, please file a bug at b.android.com. On Sun, Mar 17, 2013 at 4:38 PM, user123 ivans...@gmail.com wrote: I'm rotating a custom view, which contains a textview, using getChildStaticTransformation: @Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); camera.save(); final Matrix imageMatrix = t.getMatrix(); float transX = (textView.getWidth() / 2.0f); float transY = (textView.getHeight() / 2.0f); camera.rotateY(rot); camera.getMatrix(imageMatrix); imageMatrix.preTranslate(-transX, -transY); imageMatrix.postTranslate(transX, transY); camera.restore(); //... } This works very well on all 2.x devices I have tested, but in 4.x devices, on angle != 0, the text dissapears. Rotation works well, but the text dissapears. It appears again if rotation is 0. What can I do to solve this? Thanks in advance! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-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. -- Romain Guy Android framework engineer roma...@android.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Text dissapears when view is rotated in getChildStaticTransformation (4.x / maybe also honeycomb)
If you're doing a 3D rotation the problem might be due to a combination of angle of rotation and size of the rotated elements. The element you are rotating might end up being clipped by the camera and disappear. To work around this we expose an API in Camera that lets you specify the distance of the camera to the scene. On Mon, Mar 18, 2013 at 3:02 PM, user123 ivanschu...@gmail.com wrote: Now I also noticed that it happens only with android:hardwareAccelerated=false. When true, the text is displayed. But I need to set it to false, because otherwise the views don't rotate correctly... (it's a well known issue e.g. with this http://code.google.com/p/android-coverflow/coverflow implementation). Am Montag, 18. März 2013 12:52:28 UTC+1 schrieb user123: It seems to be 4.2 only. I tested in the emulator 4.0, 4.1 and 4.2 and happened only on 4.2. As mentioned, concerning devices, I have only 4.2, where it happens. I'm using Google maps api (the emulators have to be configured to use this instead of plain 4.x), but I think it's not relevant for this. Am Montag, 18. März 2013 12:20:12 UTC+1 schrieb user123: I just have 2 devices, Galaxy Nexus and Nexus 7, both with 4.2. Can't test on more. If nobody else has feedback on this, I would submit the bug anyways (?). Am Montag, 18. März 2013 06:56:50 UTC+1 schrieb Romain Guy (Google): Does it happen on all 4.x versions? (4.0, 4.1 and 4.2?) If so, please file a bug at b.android.com. On Sun, Mar 17, 2013 at 4:38 PM, user123 ivans...@gmail.com wrote: I'm rotating a custom view, which contains a textview, using getChildStaticTransformation: @Override protected boolean getChildStaticTransformation(**View child, Transformation t) { t.clear(); t.setTransformationType(**Transformation.TYPE_MATRIX); camera.save(); final Matrix imageMatrix = t.getMatrix(); float transX = (textView.getWidth() / 2.0f); float transY = (textView.getHeight() / 2.0f); camera.rotateY(rot); camera.getMatrix(imageMatrix); imageMatrix.preTranslate(-**transX, -transY); imageMatrix.postTranslate(**transX, transY); camera.restore(); //... } This works very well on all 2.x devices I have tested, but in 4.x devices, on angle != 0, the text dissapears. Rotation works well, but the text dissapears. It appears again if rotation is 0. What can I do to solve this? Thanks in advance! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-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=enhttp://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_outhttps://groups.google.com/groups/opt_out . -- Romain Guy Android framework engineer roma...@android.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Romain Guy Android framework engineer romain...@android.com -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Android PDK
I can find: https://android.googlesource.com/platform/development/+/ics-mr1-release/pdk/ but it's gone from: https://android.googlesource.com/platform/development/+/jb-mr0-release On Monday, March 18, 2013 9:46:39 PM UTC, Ryan Loebs wrote: I've been able to find the Android PDK on http://www.kandroid.org/online-pdk/guide/index.html but would like to know where I can find it directly from Google? I've searched around and was able to find news articles talking about the PDK but apparently kandroid is the only place that actually hosts it. Cheers, -Ryan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] POSSIBLE? Organize Home - App Icons w/o New Launcher...
Is it possible to have a service which runs in the bkg of the existing native launcher (eg. Touchwiz on my Samsung Galaxy Note 2) and add additional functionality to allow better organization of the users on-screen icons? For example the user can now highlight multiple icons across multiple screens and then rearrange them onto another screen(s). Or does this REQUIRE a brand new Launcher App? Thanks for reading. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: POSSIBLE? Organize Home - App Icons w/o New Launcher...
*QUESTION Where does a rooted Android device store the positioning information for all icons for its Home and App screen? Does it log it in the Sqlite database? * -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] How I can load doc/xlsx/pdf files into WebView?
Hi, thanks for the response. Please don't assume as its not me. Even I also notice the same question posted by someone. I saved my file into sdcard and would like to know if I can use that path to display it in web view. I achieved the same by using below code for PDF and would like to know if something same can be done for doc,xlsx ... Etc WebView webview = (WebView) findViewById(R.id.webview); webview.getSettings().setJavaScriptEnabled(true); webview.setContentDescription(application/pdf); webview.loadUrl(path); Thanks Archana On Thursday, March 14, 2013, Piren wrote: see the reply you got on stackoverflow, since it already told you exactly what you can do (i'm assuming it's you since the wording is the same) http://stackoverflow.com/questions/15279577/docx-pdf-etc-and-webview On Thursday, March 14, 2013 12:04:42 PM UTC+2, Archana wrote: How I can load doc/xlsx/pdf files into WebView? I am getting data as base64 format. Please suggest me how to display 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.comjavascript:_e({}, 'cvml', 'android-developers@googlegroups.com'); To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'android-developers%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.comjavascript:_e({}, 'cvml', 'android-developers%2bunsubscr...@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] Re: image issue while view it as base64 in android mobile2.3
Store the image as base64 in sqlite browser but we are not able to see the 5 or 6 image. In samasung galaxy y we only see 2 image which we store.In Lemon mobile we only see 2 or 4 images. In micromax only to see 5 or 6 image after that all image we took is seen as black screen we don't know why it happening.. On Thursday, March 14, 2013 9:47:24 AM UTC+5:30, senthil kumar wrote: Hi, Using phone and javascript in our application. we want to see the image as base64 from the sqlite db. In some mobile all the image(i.e 4 or 5) are viewed but in some mobile some of the image(even 1 is not displayed) are not viewed we do not know why it happening... is it due to memory? Please explain , if any know about this issue... -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Eclipse or Intellij.. what's the verdict?
On Wed, Mar 13, 2013 at 02:32:57PM -0700, bob wrote: I tried intelliJ on Mac yesterday, and it *was* a hassle telling it where the JDK and Android SDK were. I'm not even sure how I got past that part. A lot of fiddling and googling were involved. I just downloaded it and got started with it---it seemed to find the JDK was on its own, so I let it go with that. As for the SDK, I just selected ~/Android/android-sdk-macosx and it figured it out. Guess I got lucky (that, or it's not going to work right). What I haven't figured out is how to A) get it to recognize the NDK B) get it to use ~/Android/workspace/OpenCV-2.4.1 If anyone can either help me with these or point me towards the appropriate FM so I can RTFM, I'd appreciate it. I did find some forum pages saying it's not supported, but they were all over a year old, so Anyhow, it is working now, and the fonts are pretty nice on Mac. I'd say I prefer them over Eclipse. I saw a video on the UI designer, and it looks pretty nice Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running Mac OS X Lion spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W In light of DHS's recommendation to defend yourself against armed intruders with scissors, I'm giving my deer rifle a new nickname: Scissors. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Insert Video into mobile application
How can we insert video in android application and there will be a button icon by pressing it we may turn on and turn off the music. what is the procedure of inserting embedded video in android applications. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Eclipse or Intellij.. what's the verdict?
So, the NDK stuff is pretty simply if your project is created in an NDK Friendly way. That is, you have a folder called jni and in that folder you have an Android.mk and an Application.mk file. Basically the process documented here ( http://developer.android.com/tools/sdk/ndk/index.html#GetStarted). If that's the case then the NDK integration is pretty easy, although it doesn't have much to do with Intellij as such. You have two options: 1. Create an ANT script that simply calls the ndk-build executable. For example: project name=ndk default=ndk-build property file=../local.properties / target name=ndk-build exec executable=${ndk.dir}/ndk-build failonerror=true/ /target target name=ndk-clean exec executable=${ndk.dir}/ndk-build failonerror=true arg value=clean/ /exec /target /project (ndk.dir is just the path where the NDK is installed) 2. Configure an External Tool in intellij. Here's an example: http://cl.ly/image/3n020g1S1v1H In either case you can configure them to run after or before a project build or before running the project. As for the OpenCV question (assuming you're referring to the fact that this is C++) then this is where intellij falls down a little. I have a similar issue with Box2D and my solution is to run a separate eclipse for this, but the eclipse is a pure CDT flavor. If you ONLY run CDT (and download the CDT version of eclipse rather than stuffing the CDT plugin into an other version) then it all runs pretty smoothly and actually doesn't seem to use much memory. One of the wonderful things about Intellij is also that it automatically picks up changes on the file system (something eclipse has never done). So if I change a .cpp file and rebuild within CDT but the time a flick back to intellij it's already updated itself and I'm good to go. I'll admit it's not ideal having two separate IDE's, but in many ways it makes more sense. Not to mention that it (so far) has lead to far fewer headaches. On Mon, Mar 18, 2013 at 9:23 PM, Jim Graham spooky1...@gmail.com wrote: On Wed, Mar 13, 2013 at 02:32:57PM -0700, bob wrote: I tried intelliJ on Mac yesterday, and it *was* a hassle telling it where the JDK and Android SDK were. I'm not even sure how I got past that part. A lot of fiddling and googling were involved. I just downloaded it and got started with it---it seemed to find the JDK was on its own, so I let it go with that. As for the SDK, I just selected ~/Android/android-sdk-macosx and it figured it out. Guess I got lucky (that, or it's not going to work right). What I haven't figured out is how to A) get it to recognize the NDK B) get it to use ~/Android/workspace/OpenCV-2.4.1 If anyone can either help me with these or point me towards the appropriate FM so I can RTFM, I'd appreciate it. I did find some forum pages saying it's not supported, but they were all over a year old, so Anyhow, it is working now, and the fonts are pretty nice on Mac. I'd say I prefer them over Eclipse. I saw a video on the UI designer, and it looks pretty nice Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)MiSTie #49997 Running Mac OS X Lion spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W In light of DHS's recommendation to defend yourself against armed intruders with scissors, I'm giving my deer rifle a new nickname: Scissors. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/03O6rEVdXCY/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Ozzy's Odyssey! A new game for Android https://market.android.com/details?id=com.carboncrystal.odyssey http://www.carboncrystal.com/ http://www.carboncrystal.com/droid-odyssey/ -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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
[android-developers] Re: Android PDK
Ah, nice find. I wonder if they canned the idea or if it's become a private offering for OEM's? On Monday, March 18, 2013 7:42:11 PM UTC-7, RichardC wrote: I can find: https://android.googlesource.com/platform/development/+/ics-mr1-release/pdk/ but it's gone from: https://android.googlesource.com/platform/development/+/jb-mr0-release On Monday, March 18, 2013 9:46:39 PM UTC, Ryan Loebs wrote: I've been able to find the Android PDK on http://www.kandroid.org/online-pdk/guide/index.html but would like to know where I can find it directly from Google? I've searched around and was able to find news articles talking about the PDK but apparently kandroid is the only place that actually hosts it. Cheers, -Ryan -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] events triggered when attaching/detaching a gamepad
Hello group, I am adding gamepad support for one of our games and I intend to have a graceful fallback from gamepad controls to the tilt/touch ones when the gamepad is removed. However I don't seem to be a able to find an event triggered when a gamepad controller is attached/removed. The logcat has some feedback at operating system level but I don't know how to get notified inside the game activity. I am using a java activity on top of an NDK library and all input is processed in the java activity. Any tips will be greatly appreciated. Thanks, Andrei H. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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.