Re: [android-developers] Market Intent Suggestion
Thanks Vintu -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Thu, Mar 4, 2010 at 3:37 PM, Adrian Vintu wrote: > Use market://details?id= > > BR, > Adrian Vintu > > http://adrianvintu.com > > > On Thu, Mar 4, 2010 at 8:15 AM, Atif Gulzar wrote: > >> When we search for an application by its fully qualified Java package name >> using >> >> http://market.android.com/search?q=pname: or >> market://search?q=pname: >> >> It displays a single result in a list. >> >> Since it a single result it should display the detailed application view >> instead of showing it in a list view. >> >> >> Just a suggestion >> >> >> >> >> >> -- >> Best Regards, >> Atif Gulzar >> >> I Unicode, ɹɐzlnƃ ɟıʇɐ >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > <http://adrianvintu.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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] image overlay
You may use ViewFlipper and then can use setDisplayedChild function to show the view you desired. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Mar 3, 2010 at 11:06 PM, Dan wrote: > Is there a way to have an image overlaid over another image. For > example, I have an instance where I have an imageview and I would like > another imageview to take up the same space and appear over the first > image. I don't know if there is a way of doing this. I tried putting > the second imageview within the first imageview, but that's apparently > not allowed in the layout xml files. So is there perhaps a way of > doing it with a different layout, such as absolute or frame? Thanks > for any help > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Market Intent Suggestion
When we search for an application by its fully qualified Java package name using http://market.android.com/search?q=pname: or market://search?q=pname: It displays a single result in a list. Since it a single result it should display the detailed application view instead of showing it in a list view. Just a suggestion -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] TTS
TTS is supported since 1.6. Is it possible to set the minimum supported version as 1.5 Where my application will not speak in 1.5 and will speak in 1.6 -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] is it possible to get user name against the default Gmail account.
Hi, Is it possible to get the user name against the default Gmail account on device? For example when we comment on some application in Market, it automatically deduct the user name form device. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] User name against the default email account of Device?
Hi, How can I get the user name against the default gmail account on device. For example when you comment on some application in market it automatically shows the name of commenter. Is there any way to get that name. Actually, I want to present this name while submitting the high score in my game, ofcourse user can edit it before submitting the score. Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Disable RadioGroup ?
Thanks, Yes I can treat individual buttons. But just wondering why I can't operate on RadioGroup. Is it some bug or I am missing something. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Fri, Feb 19, 2010 at 11:42 PM, DonFrench wrote: > Or you could make them invisible but that isn't the same thing as just > disabling them of course. > > On Feb 19, 4:39 am, Mark Murphy wrote: > > Atif Gulzar wrote: > > > Hi > > > > > How can I disable RadioGroup, means all the radio buttons should e > > > disabled. I already tried setEnabled (false) and setClickable(false) > but > > > this did not help. > > > > Iterate over the RadioButtons and disable them, I imagine. > > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > _Android Programming Tutorials_ Version 1.0 In Print! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Disable RadioGroup ?
Hi How can I disable RadioGroup, means all the radio buttons should e disabled. I already tried setEnabled (false) and setClickable(false) but this did not help. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] read only time
Hi, I would like to implement a functionality in my game to give some daily goodies. But user can easily abuse it by changing the date of the device again and again. I know this can be easily implemented through some server. Is there any way to handle it locally without the involvement of server or network connectivity? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: density setting for aspect ration long screens
Thanks Bob, I will defiantly review my layout strategy. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Jan 26, 2010 at 9:41 PM, Bob Kerns wrote: > Atif, the various layout classes are *intended* to be a generic > solution, making minor adjustments for minor changes. > > Using different resource folders is intended for making major > readjustments to layout. If you design a good layout with the layout > classes, you may not need them at all! > > Generally, separate resource folders are useful for when a particular > layout strategy simply breaks down when pushed too far. For example, > rotating to landscape may make the screen simply too short for one > strategy, but if you move a couple of things to the side, you're OK. > > If you need to distinguish between 480x800 and 480x854 -- and > especially if it's 480x854 that has the problem -- then I would > strongly suggest that you take a close look at your layout strategies. > LinearLayout with some expandable padding elements, TableLayout, or > the use of a 9-patch instead of a fixed background graphic. > > Android offers a lot of facilities for handling of layout differences. > I don't think they're always as easy to use and predictable as they > ought to be, but they're pretty rich and functional, none-the-less. > > So if they aren't doing the job, and you're having to rely on > differentiating your layouts at the level of 480x800 vs 480x854, then > to get any help, you're going to need to precisely identify what > problem the layouts aren't handling for you automatically, and why. > > My guess, however, would be that you're either: > 1) Trying to put too much stuff onto each screen. This makes your > layouts very "brittle", and usually makes the result seem very > cluttered for the user, as well. There can be times when this is > appropriate -- for example, when the goal is a single-screen status > monitoring display. But generally, the strategy here should be to move > to less-cluttered, more tightly focused screens. > > 2) Trying to keep too tight a control on the layouts, rather than > defining a logical layout strategy, and allowing the system to make > the layout choices for you, within defined ranges. That does take both > a lot of understanding, and a lot of testing to identify the usable > limits of each layout strategy. But the result is that you won't have > to specify a new layout to handle some new device that adds another 54 > pixels along one edge. > > On Jan 26, 5:10 am, Atif Gulzar wrote: > > Thanks Dianne Hackborn, > > > > But then how one can set its single layout to work on all aspect rations. > To > > solve the problem for long screens; I created a new folder layout-long > and > > adjusted my lauouts. Wel it solved the problem for 480x800 but not for > > 480x854. Any generic solution ?? > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > On Mon, Jan 25, 2010 at 11:06 PM, Dianne Hackborn >wrote: > > > > > > > > > Density and aspect ratio are completely unrelated. Density is the size > of > > > the pixels, and we currently only support square pixels (which is what > all > > > current devices have as far as I know). The aspect ratio is determined > by > > > the number of pixels in th x and y dimensions, regardless of their > density. > > > > > On Mon, Jan 25, 2010 at 7:04 AM, Atif Gulzar >wrote: > > > > >> We can set the pixel values in custom views by multiplying them with > > > > >> this.getResources().getDisplayMetrics().density; > > > > >> This is ok when the screen aspect ratio is normal means not long > > > > >> But how can we set the pixels along Y-axis when the aspect ration is > long. > > > > >> -- > > >> Best Regards, > > >> Atif Gulzar > > > > >> I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > >> -- > > >> 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 cr...@googlegroups.com> > > >> For more options, visit this group at > > >>http://groups.google.com/group/android-developers?hl=en > > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > hack...@
Re: [android-developers] density setting for aspect ration long screens
Thanks Dianne Hackborn, But then how one can set its single layout to work on all aspect rations. To solve the problem for long screens; I created a new folder layout-long and adjusted my lauouts. Wel it solved the problem for 480x800 but not for 480x854. Any generic solution ?? -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Jan 25, 2010 at 11:06 PM, Dianne Hackborn wrote: > Density and aspect ratio are completely unrelated. Density is the size of > the pixels, and we currently only support square pixels (which is what all > current devices have as far as I know). The aspect ratio is determined by > the number of pixels in th x and y dimensions, regardless of their density. > > On Mon, Jan 25, 2010 at 7:04 AM, Atif Gulzar wrote: > >> We can set the pixel values in custom views by multiplying them with >> >> this.getResources().getDisplayMetrics().density; >> >> This is ok when the screen aspect ratio is normal means not long >> >> But how can we set the pixels along Y-axis when the aspect ration is long. >> >> >> -- >> Best Regards, >> Atif Gulzar >> >> I Unicode, ɹɐzlnƃ ɟıʇɐ >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] density setting for aspect ration long screens
We can set the pixel values in custom views by multiplying them with this.getResources().getDisplayMetrics().density; This is ok when the screen aspect ratio is normal means not long But how can we set the pixels along Y-axis when the aspect ration is long. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] cocos2d for Android Update
This is really an incredible effort. Is there any application on android market that is using this engine? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Jan 25, 2010 at 1:44 PM, Philip wrote: > The new update fixes a slew of issues: parallax is working, > rendering issues on G1 phones, and handles menus and sprites > correctly. The touch event handler has been updated to use a singleton > class with delegates. Thanks to Andrey who pointed out a couple of > issues with rendering on his phone and sent me a fix for it. Most > transitions are also working. Menus are also working except for a > problem with MenuToggle that should be fixed in the next release. > > The next step is to have particle system working (fire is starting to > work in the demo.) Someone also offered to work on adding Box2D/ > chipmunk to the lot. . > > Thanks to everyone who sent me mail with some suggestions and > contributions. I really appreciate all the help I can get to make this > project usable and useful. > > Thanks! > > Philip > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ContextMenu on TableLayout: how to get selected item position?
I had the similar issue and solved it with a work around. In your table row add a TextView and makes its visibility GONE and set its text as 0,1,2,4... for respective rows. Add a single listener for each row. When some row is clicked the listener will give you a clicked view. From this view get the text view from this text view the index. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Sat, Jan 23, 2010 at 5:19 AM, Thierry Legras wrote: > Hi, > > ContextMenu seems quite handy as long as we are using an AdapterView as we > can easily get selected item position in onContextItemSelected from > AdapterContextMenuInfo.position > > Any idea how we can achieve something similar in a TableLayout? > In my TableLayout, i have some TableRow and i would like to get the row > index in the onContextItemSelected callback like i would do with a simple > ListView. > > I guess i will have to register the contextmenu for each row? but how can > tie the row index with the menu? i see no way to do it with > registerForContextMenu. > > Thks, > Thierry. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ViewFlipper switching views on screen orientation change
whenever the orientation is changed the current activity is destroyed and new one is created and onCreate fuction is called again (unless you handled it). Means your activity is refreshed. Before orientation change happened onRetainNonConfigurationInstan > > ce() is called. You can save you activity state in this function. > > And then in onCreate you can get it by calling > > Object data = getLastNonConfigurationInstance(); > > > Hope it helps. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Jan 25, 2010 at 10:29 AM, Atif Gulzar wrote: > whenever the orientation is changed the onCreate fuction is called again > (unless you handled it). Means your activity is refreshed. > > before orientation change happened onRetainNonConfigurationInstance() is > called. You can save you activity state in this function. > > And then in onCreate you can get it by calling > > Object data = getLastNonConfigurationInstance(); > > > Hope it helps. > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > > On Mon, Jan 25, 2010 at 9:23 AM, Marc wrote: > >> I have a 3 nested ViewFlippers which seem to be working ok except that >> when I change the screen orientation the view flip back to the first >> one of my views, giving the user the impression it went back a few >> steps. >> >> I am a bit stumped as to what to do and was hoping someone had some >> experience with this. 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ViewFlipper switching views on screen orientation change
whenever the orientation is changed the onCreate fuction is called again (unless you handled it). Means your activity is refreshed. before orientation change happened onRetainNonConfigurationInstance() is called. You can save you activity state in this function. And then in onCreate you can get it by calling Object data = getLastNonConfigurationInstance(); Hope it helps. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Jan 25, 2010 at 9:23 AM, Marc wrote: > I have a 3 nested ViewFlippers which seem to be working ok except that > when I change the screen orientation the view flip back to the first > one of my views, giving the user the impression it went back a few > steps. > > I am a bit stumped as to what to do and was hoping someone had some > experience with this. 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Best Server for Android MultiPlayer Games?
thanks Robert, But I am not an expert of server things, that is why I am looking for some already built server. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Jan 19, 2010 at 11:37 AM, Robert Green wrote: > I used Ruby on Rails with JSON as the high-level protocol for Wixel > and it worked very well. I just wrote a gateway service and used AIDL > to define the interfaces. Took me about a month to do from start to > finish. > > On Jan 18, 11:52 pm, Atif Gulzar wrote: > > Hi All, > > > > I am developing a multiplayer card game. And currently looking for best > > server. I have R&D on three servers RED5, SmartFox and Elctro Server. > > > > RED5 is open source but you have to right midle tier for android to > > communicate with server. > > SmartFox has inherent Android support. > > > > Would you please share your expert thoughts or point me some other > servers. > > Thanks > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Best Server for Android MultiPlayer Games?
Hi All, I am developing a multiplayer card game. And currently looking for best server. I have R&D on three servers RED5, SmartFox and Elctro Server. RED5 is open source but you have to right midle tier for android to communicate with server. SmartFox has inherent Android support. Would you please share your expert thoughts or point me some other servers. Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] prominent android developers
Hi All, I have compiled a small list of prominent android developers how frequently post on Google Android groups (android-developers.googlegroups.com & android-beginners.googlegroups.com). There is a flood of emails (>200 per day) on Google Android groups and it is not possible to follow all. But I filter the below emails to extract (<20 per day) valuable information. Would you please add into this list. hack...@android.com romain...@google.com romain...@android.com mmur...@commonsware.com marc...@android.com roman.baumgaert...@t-mobile.com yusuf.s...@t-mobile.com x...@android.com r...@android.com -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Flash and future of Android game development?
Hi All, With the promising news of Flash support for Android what will the future of Android Game development? -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] retain application/Activity state correct approach?
hi, I just read from internet to maintain the state of my application by overriding the onKeyDown function as given below. And set the launch mode of my activity as singleInstance. And it is working perfectly. Just want to know if it is correct approach. And how it is different from onSaveInstanceState. Thanks @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) return this.moveTaskToBack(true); return super.onKeyDown(keyCode, event); }; -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] retain application/Activity state correct approach?
hi, I just read from internet to maintain the state of my application by overriding the onKeyDown function as given below. And set the launch mode of my activity as singleInstance. And it is working perfectly. Just want to know if it is correct approach. And how it is different from onSaveInstanceState. Thanks public boolean onKeyDown(int keyCode, KeyEvent event) { return this.moveTaskToBack(true); //return super.onKeyDown(keyCode, event); }; -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] view inside a customView
Is it possible to use standard views inside your custom defined views. e.g. use ImageView in my class that is extended form View ? Or is it possible to use one custom view inside another custom view? Actually I have animations defined in xml view which I want to apply on some of the images. But predefined animations can only be applied to views. The scenario is, I want to animate (rotating, glowing, etc ) some of the chips on a board. User can also drag these chips through touch events. And I do not want to refresh my complete board just to rotate few chips on it. All my animations are defined in xml files. Looking for some pointers. Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Screen Size
you need to go through this article. http://d.android.com/guide/practices/screens_support.html -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Dec 8, 2009 at 10:12 AM, Sasikumar.S wrote: > Hi hongi, > > Thanks for ur reply. > > I'm asking whether the android phone screen size are same or different?.. > > > On Tue, Dec 8, 2009 at 10:37 AM, hongki park > wrote: > >> what is a exact meaning of "Size" ?? >> >> 2009/12/8 Mark Murphy >> >> > All the Android Models are same size or different size?.. >>> >>> There are QVGA, WQVGA400, WVGA432, HVGA, WVGA, and WVGA854 resolutions >>> defined for Android. Hardware exists for most of those. >>> >>> -- >>> Mark Murphy (a Commons Guy) >>> http://commonsware.com >>> Android App Developer Books: http://commonsware.com/books.html >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to android-developers@googlegroups.com >>> To unsubscribe from this group, send email to >>> android-developers+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >>> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Thanks & Regards > Sasikumar.S > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AsyncTaskPool | Tutorial
>>Also, since Donut, the limit of enqueued tasks in AsyncTask is 128, not 20. So AsyncTask has a maximum of 10 threads running concurrently so what is the solution for Android 1.5 -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Nov 11, 2009 at 9:25 PM, Romain Guy wrote: > Please consider the implications of this: does it even make sense to > have 20+ threads (on a single CPU device) updating the UI at once? > That is NOT the purpose of AsyncTask. Also, since Donut, the limit of > enqueued tasks in AsyncTask is 128, not 20. So AsyncTask has a maximum > of 10 threads running concurrently and can hold up to 128 tasks > waiting for a thread to be freed in the pool. So basically AsyncTask > does exactly what you are trying to do here. > > On Wed, Nov 11, 2009 at 1:02 AM, Atif Gulzar > wrote: > > Android has a limit to rum at MAX 20 concurrent AsyncTask. To handle this > > limit I created a AsyncTaskPool.java utility. Its not a pool in true > sense > > but a kind of scheduler. I am posting it here for your comments and it > may > > help others. > > > > import java.util.ArrayList; > > > > import android.os.AsyncTask; > > > > public class AsyncTaskPool > > { > > > > private int poolSize; > > private ArrayList currentTasks = new > ArrayList(); > > private ArrayList pendingTasks = new ArrayList(); > > > > /** > > * @param poolSize > > *: it should be less than 20. As Android only supports > max. > > 20 concurrent Asynch tasks. > > */ > > public AsyncTaskPool(int poolSize) > > { > > this.poolSize = poolSize; > > } > > > > public int getPoolSize() > > { > > return poolSize; > > } > > > > > > public boolean addTask(AsyncTask asyncTask, Object... params) > > { > > > > if (currentTasks.size() < poolSize) > > { > > currentTasks.add(asyncTask); > > if (params != null) > > asyncTask.execute(params); > > else > > asyncTask.execute(); > > } > > else > > { > > Object[] task = new Object[2]; > > task[0] = asyncTask; > > task[1] = params; > > > > pendingTasks.add(task); > > } > > > > return true; > > } > > > > public boolean removeTask(AsyncTask task) > > { > > if(currentTasks.contains(task)) > > { > > currentTasks.remove(task); > > return true; > > } > > return false; > > } > > > > //Add this method in the onPostExecute method of AsyncTask > > public boolean removeAndExecuteNext(AsyncTask atask) > > { > > removeTask(atask); > > if (pendingTasks.size()>0 && currentTasks.size() > { > > Object [] task = (Object []) pendingTasks.get(0); > > pendingTasks.remove(task); > > > > addTask((AsyncTask)task[0], (Object[])task[1]); > > > > } > > > > return false; > > } > > > > } > > > > > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > -- > > 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 > > > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] AsyncTaskPool | Tutorial
Android has a limit to rum at MAX 20 concurrent AsyncTask. To handle this limit I created a AsyncTaskPool.java utility. Its not a pool in true sense but a kind of scheduler. I am posting it here for your comments and it may help others. import java.util.ArrayList; import android.os.AsyncTask; public class AsyncTaskPool { private int poolSize; private ArrayList currentTasks = new ArrayList(); private ArrayList pendingTasks = new ArrayList(); /** * @param poolSize *: it should be less than 20. As Android only supports max. 20 concurrent Asynch tasks. */ public AsyncTaskPool(int poolSize) { this.poolSize = poolSize; } public int getPoolSize() { return poolSize; } public boolean addTask(AsyncTask asyncTask, Object... params) { if (currentTasks.size() < poolSize) { currentTasks.add(asyncTask); if (params != null) asyncTask.execute(params); else asyncTask.execute(); } else { Object[] task = new Object[2]; task[0] = asyncTask; task[1] = params; pendingTasks.add(task); } return true; } public boolean removeTask(AsyncTask task) { if(currentTasks.contains(task)) { currentTasks.remove(task); return true; } return false; } //Add this method in the onPostExecute method of AsyncTask public boolean removeAndExecuteNext(AsyncTask atask) { removeTask(atask); if (pendingTasks.size()>0 && currentTasks.size()http://groups.google.com/group/android-developers?hl=en AsyncTaskPool.java Description: Binary data
[android-developers] Re: Drawable.createFromStream() and OutOfMemoryError exception
Bump Hi, Would you please help me how to handle the memory leak on Drawable.createFromStream()? I am receiving a base64 image from a webservice. And I decode it using Apache lib. After that I convert it to drawable through Drawable.createFromStream(). But when the image size is bit larger (~>350kb) it starts throwing OutOfMemoryError exception. Ok, I can handle this by catching this exception. But eventually after catching 2 or 3 such exceptions the heap is full and it start throwing exceptions for other methods and for small images as well. The relevant code snip is given below. byte[] arr = null; InputStream imageStream = null; try { arr = Base64.decodeBase64(result. > > getScreenShot().getBytes()); > > imageStream = new BufferedInputStream(new > ByteArrayInputStream(arr)); > TJCAppDetail.this.screenShotDrawable = > Drawable.createFromStream(imageStream, "src"); > screenShot.setImageDrawable(screenShotDrawable); > } > catch (OutOfMemoryError outOfMemoryError) > { > arr = null; > imageStream = null; > if (screenShotDrawable != null) > { > screenShotDrawable.setCallback(null); > if (((BitmapDrawable) screenShotDrawable).getBitmap() != null) > ((BitmapDrawable) > screenShotDrawable).getBitmap().recycle(); > } > > Log.e("TJC_EXCEPTION", outOfMemoryError.getMessage()); > } > > On Tue, Nov 10, 2009 at 7:11 PM, Atif Gulzar wrote: > seems this is a reported bug? > http://code.google.com/p/android/issues/detail?id=294 > > > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > On Tue, Nov 10, 2009 at 5:51 PM, Atif Gulzar wrote: > >> Hi, >> >> Would you please help me how to handle the memory leak on >> Drawable.createFromStream()? >> >> I am receiving a base64 image from a webservice. And I decode it using >> Apache lib. After that I convert it to drawable through >> Drawable.createFromStream(). But when the image size is bit larger (~>350kb) >> it starts throwing OutOfMemoryError exception. Ok, I can handle this by >> catching this exception. But eventually after catching 2 or 3 such >> exceptions the heap is full and it start throwing exceptions for other >> methods and for small images as well. >> >> The relevant code snip is given below. >> >> >> byte[] arr = null; >> InputStream imageStream = null; >> try >> { >> arr = Base64.decodeBase64(result.getScreenShot().getBytes()); >> >> imageStream = new BufferedInputStream(new >> ByteArrayInputStream(arr)); >> TJCAppDetail.this.screenShotDrawable = >> Drawable.createFromStream(imageStream, "src"); >> screenShot.setImageDrawable(screenShotDrawable); >> } >> catch (OutOfMemoryError outOfMemoryError) >> { >> arr = null; >> imageStream = null; >> if (screenShotDrawable != null) >> { >> screenShotDrawable.setCallback(null); >> if (((BitmapDrawable) screenShotDrawable).getBitmap() != null) >> ((BitmapDrawable) >> screenShotDrawable).getBitmap().recycle(); >> } >> >> Log.e("TJC_EXCEPTION", outOfMemoryError.getMessage()); >> } >> >> >> >> -- >> Best Regards, >> Atif Gulzar >> >> I Unicode, ɹɐzlnƃ ɟıʇɐ >> >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Drawable.createFromStream() and OutOfMemoryError exception
seems this is a reported bug? http://code.google.com/p/android/issues/detail?id=294 -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Nov 10, 2009 at 5:51 PM, Atif Gulzar wrote: > Hi, > > Would you please help me how to handle the memory leak on > Drawable.createFromStream()? > > I am receiving a base64 image from a webservice. And I decode it using > Apache lib. After that I convert it to drawable through > Drawable.createFromStream(). But when the image size is bit larger (~>350kb) > it starts throwing OutOfMemoryError exception. Ok, I can handle this by > catching this exception. But eventually after catching 2 or 3 such > exceptions the heap is full and it start throwing exceptions for other > methods and for small images as well. > > The relevant code snip is given below. > > > byte[] arr = null; > InputStream imageStream = null; > try > { > arr = Base64.decodeBase64(result.getScreenShot().getBytes()); > > imageStream = new BufferedInputStream(new > ByteArrayInputStream(arr)); > TJCAppDetail.this.screenShotDrawable = > Drawable.createFromStream(imageStream, "src"); > screenShot.setImageDrawable(screenShotDrawable); > } > catch (OutOfMemoryError outOfMemoryError) > { > arr = null; > imageStream = null; > if (screenShotDrawable != null) > { > screenShotDrawable.setCallback(null); > if (((BitmapDrawable) screenShotDrawable).getBitmap() != null) > ((BitmapDrawable) > screenShotDrawable).getBitmap().recycle(); > } > > Log.e("TJC_EXCEPTION", outOfMemoryError.getMessage()); > } > > > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Drawable.createFromStream() and OutOfMemoryError exception
Hi, Would you please help me how to handle the memory leak on Drawable.createFromStream()? I am receiving a base64 image from a webservice. And I decode it using Apache lib. After that I convert it to drawable through Drawable.createFromStream(). But when the image size is bit larger (~>350kb) it starts throwing OutOfMemoryError exception. Ok, I can handle this by catching this exception. But eventually after catching 2 or 3 such exceptions the heap is full and it start throwing exceptions for other methods and for small images as well. The relevant code snip is given below. byte[] arr = null; InputStream imageStream = null; try { arr = Base64.decodeBase64(result.getScreenShot().getBytes()); imageStream = new BufferedInputStream(new ByteArrayInputStream(arr)); TJCAppDetail.this.screenShotDrawable = Drawable.createFromStream(imageStream, "src"); screenShot.setImageDrawable(screenShotDrawable); } catch (OutOfMemoryError outOfMemoryError) { arr = null; imageStream = null; if (screenShotDrawable != null) { screenShotDrawable.setCallback(null); if (((BitmapDrawable) screenShotDrawable).getBitmap() != null) ((BitmapDrawable) screenShotDrawable).getBitmap().recycle(); } Log.e("TJC_EXCEPTION", outOfMemoryError.getMessage()); } -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] suppress/mute all notifications
is it possible to suppress all notification messages e.g. incoming call or sms notification? Thanks Actually, I am developing a game and I want to given an option to user to mute all notifications (some thing like do not disturb :)) while playing game. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Oct 6, 2009 at 8:16 PM, Atif Gulzar wrote: > > is it possible to suppress all notification messages e.g. incoming call or > sms notification? Thanks > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Keeping MediaController from timing out after a certain amount of time
you may also use .show(timeout) function. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Oct 7, 2009 at 5:23 AM, Marco Nelissen wrote: > > VideoView itself will hide/show the MediaController as it sees fit, so > your call to show() will only be in effect until VideoView decides to > hide (or show with a timeout) it again. > Also, you are calling MediaController.show() before the > MediaController is even attached to the VideoView. > > > On Tue, Oct 6, 2009 at 2:53 PM, Danny wrote: > > > > I have the following code: > > > > songView = (VideoView)this.findViewById(R.id.VideoView02); > > MediaController mc = new MediaController(this); > > mc.show(0); > > mc.requestFocus(); > > songView.setMediaController(mc); > > songView.requestFocus(); > > > > > > > http://developer.android.com/reference/android/widget/MediaController.html#show%28int%29 > > > > According to the doc , it says > > public void show (int timeout) > > The timeout in milliseconds. Use 0 to show the controller until hide() > > is called. > > > > I can not get the mediacontroller to show permanently or any other > > time. Anyone successfully get this to work? 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 -~--~~~~--~~--~--~---
[android-developers] suppress all notifications
is it possible to suppress all notification messages e.g. incoming call or sms notification? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is this possible: Capturing Audio while video is being played?
Hi all, Can I capture the audio through microphone while video is being played? 2ndly can I capture the touch events on video? (by developing my own video player) Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Please Help Urgent: Get active context dynamically of an application
> > I posted this questions twice. I will really appreciate your help. Am I > asking very basic or vice versa? Or it is not possible in Android. Please > help. > > > > On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar wrote: > >> Hi, >> >> How can get the active context of an application? >> >> The scenario is, I have an AsyncTask inside an activity_A. And on >> successful completion (means in onPostExecute) of this AsyncTask I want to >> show a dialog >> >> (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) >> >> >> >> But in the meanwhile(before completing this AsyncTask) if the application >> is moved to another activity_B. The above dialog context will not be the >> current Context so it will through an Exception. >> >> > >> So is it possible to get the active Context dianamically? Thanks >> >> >> >> -- >> Best Regards, >> Atif Gulzar >> >> I Unicode, ɹɐzlnƃ ɟıʇɐ >> >> > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Get active context dynamically of an application
bump. Thanks :) -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar wrote: > Hi, > > How can get the active context of an application? > > The scenario is, I have an AsyncTask inside an activity_A. And on > successful completion (means in onPostExecute) of this AsyncTask I want to > show a dialog > > (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) > > > > But in the meanwhile(before completing this AsyncTask) if the application > is moved to another activity_B. The above dialog context will not be the > current Context so it will through an Exception. > > > So is it possible to get the active Context dianamically? Thanks > > > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Emulator and android Market
I am following this thread http://groups.google.com/group/android-developers/browse_thread/thread/7d26272f9064095f/75da068852f85b72#75da068852f85b72 lets see if it possible or not. Seems possible though. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Sep 14, 2009 at 3:28 PM, zhao lifeng wrote: > > You can't ! > On Mon, Sep 14, 2009 at 3:13 PM, Atif Gulzar > wrote: > > Can I access Android Market through emulator? Thanks > > > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > > > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emulator and android Market
Can I access Android Market through emulator? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Get active context dynamically of an application
Hi, How can get the active context of an application? The scenario is, I have an AsyncTask inside an activity_A. And on successful completion (means in onPostExecute) of this AsyncTask I want to show a dialog (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);) But in the meanwhile(before completing this AsyncTask) if the application is moved to another activity_B. The above dialog context will not be the current Context so it will through an Exception. So is it possible to get the active Context dianamically? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Singleton Objects and Android
Hi all, I have some singleton objects in my android project. But these singleton object are not initialized to null once I close my application on emulator and run it again. But if I close the emulator and run my application again these singleton objects are initialize to null. Please help. Thanks the structure of my singleton objects is something like this public final class TJCConfig { private static TJCConfig config = null; //this is the line creating problem private TJCConfig() { // some initializationn here } public static TJCConfig getTJCConfigInstance() { if( config == null ) config = new TJCConfig(); return config; } ... } -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Activity | Theme_Dialog
bump -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Sep 1, 2009 at 1:04 PM, Atif Gulzar wrote: > Hi all, > > When I apply setTheme(android.R.style.Theme_Dialog); to my activity. The > width of the activity is wrapped to its content and some time it is very > skinny. Is it possible to force its width to the screen width? Thanks. > > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Views below ScrollView
ok I find the solution. Set Bottom layout margin of ScrollView to 50dp and the view that you want to stick on screen sets its Up layout margin to -50dp -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Sep 1, 2009 at 1:08 PM, Atif Gulzar wrote: > Hi all, > > How can I add some buttons below ScrollView that always stay on screen. > > > -- > Best Regards, > Atif Gulzar > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Views below ScrollView
Hi all, How can I add some buttons below ScrollView that always stay on screen. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Activity | Theme_Dialog
Hi all, When I apply setTheme(android.R.style.Theme_Dialog); to my activity. The width of the activity is wrapped to its content and some time it is very skinny. Is it possible to force its width to the screen width? Thanks. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem Using Jar File
Thanks Mark, It works, I will look into it how to optimize it. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Fri, Aug 28, 2009 at 1:52 PM, Mark Murphy wrote: > > > But my jar file is referring number of layouts (about 10) and these > > layouts contains number of ids (about 100). It is difficult to pass so > > many ids as parameters. > > You can try Resources#getIdentifier(). If you get this working, please > cache your results, as these lookups are apparently expensive ("Note: use > of this function is discouraged. It is much more efficient to retrieve > resources by identifier than by name."). > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > Android App Developer Books: http://commonsware.com/books.html > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem Using Jar File
Hi Mark, Thanks for your reply.Right now we are not using the R file of that project whose jar file is created.Jar file does not contains R files of that project.So R.layout and R.id's are created in the client project where i am using jar file. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Fri, Aug 28, 2009 at 12:10 AM, Mark Murphy wrote: > > > i am facing a problem in using jar file.I have created a jar > > file and i am trying to use it in another project.I also copy the xml > > files from res/layout folder of that project whose jar file is created > > to the res/layout folder of the project in which i am using jar file.I > > have also listed all the activites of jar in manifest file of that > > project. But when i call an activity that is inside jar file it loads > > the wrong xml file.I mean if inside an activity i have setContentview > > (R.layout.test1) but it loads another file instead of test1. > > > > Any Help?? > > You cannot reference resources by R.layout, R.id, and such from within a > JAR such as what you have packaged. You need to adjust your API so the > application reusing your JAR can pass those values in as parameters. > > What happens is that even though you copied over the resources, the > resource IDs (the numbers that R.layout.foo and R.id.bar map to) will be > different in the new project. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > Android App Developer Books: http://commonsware.com/books.html > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can I know if some email client is configured?
How can I know if some email client is configured on device. Actually I want to compose an email_message. But if no email account is configured Android treat it as simple message. But I want to prompt user that no email client is configured, please configure one. That is why I need to know how to check if some email client is configured. Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to check if some email client is configured ?
hi, How to check if some email client is configured ? and if configured how to get the default email client. THanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Get default email account and compose a message?
I am looking for some anchors how to get default Email account and compose a new message. I will appreciate any help. Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] is it possible to start an activity from non Activity class
An activity can be called from existing activity through *startActivity(intent); * Is t possible to call an activity from non Activity class ? and how? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AsyncTask and Exception handling
then how can I handle exceptions. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Aug 18, 2009 at 7:56 PM, Andrei wrote: > > You can not do any UI activity from background thread > See here examples > http://android-developers.blogspot.com/2009/05/painless-threading.html > > On Aug 18, 9:45 am, Atif Gulzar wrote: > > Hi all, > > > > AsyncTask blocks exceptions? > > > > Please see the below code. My "getOffersStatus" function catches certain > > exceptions and show them in a AlertDialog. But instead of getting my > custom > > exceptions message I get default error dialog "The application ... has > > stopped unexpectdly. Please try again". > > > > Any thoughts ? > > > > protected ArrayList doInBackground(Void... nothing) > > { > > return tj.getOffersStatus(config, "test1234"); > > > > } > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AsyncTask and Exception handling
Hi all, AsyncTask blocks exceptions? Please see the below code. My "getOffersStatus" function catches certain exceptions and show them in a AlertDialog. But instead of getting my custom exceptions message I get default error dialog "The application ... has stopped unexpectdly. Please try again". Any thoughts ? protected ArrayList doInBackground(Void... nothing) { return tj.getOffersStatus(config, "test1234"); } -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] default measuring units px or dp
in xml file we can define measuring units along with the values. If I want to set some property through code it only takes "int" value. What is the default unit for this int? px(pixels) or dp(density indipendent pixels) ? -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is it possible to change text color of all child TextViews
Is it possible to change text color of all child TextViews? Actually I want to change text color of all columns(TextViews) of a TableRow when it is clicked. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to show dialog with only the progress image
create a simple layout xml which has progressbar in it and set the contetview of dialog to this layout. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Thu, Aug 13, 2009 at 2:07 PM, Sundar wrote: > > Hi, > > how to show dialog with only the progress image without the rectangle, > background color and text. > I want only the spinning image in the dialog. > > Thanks in advance. > > V.Sundar > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: R.arawable visuals
Thanks Jack -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 8:23 PM, Jack Ha wrote: > > Try this link: > >http://kapsencode.com/android_drawable/ > > If you extract android.jar, you will also find them under the "res/ > drawable" directory. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > > On Aug 12, 5:17 am, Atif Gulzar wrote: > > There are many drawables defined under R.drawable " > http://developer.android.com/reference/android/R.drawable.html";. Just > > curious if their visuals are available somewhere? > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] R.arawable visuals
There are many drawables defined under R.drawable " http://developer.android.com/reference/android/R.drawable.html";. Just curious if their visuals are available somewhere? -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work
have you tried TabActivity http://developer.android.com/reference/android/app/TabActivity.html -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 6:02 PM, Sena wrote: > > So the content of a tab is fixed once that tab has been initialised? > That seems like a severe limit. Or am I missing something, should I be > trying to achieve the same net result (to the user) some other way? > > Thanks > S > > On Aug 12, 12:16 pm, Mark Murphy wrote: > > Sena wrote: > > > I have several tabs in my application. Each of which contains an > > > activity. One of these is a ListActivity and I would like to open up > > > another activity (in the same tab) when the user clicks on a ListItem. > > > > I am not convinced that this is possible. > > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > Warescription: Three Android Books, Plus Updates, $35/Year > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Image with a Button, or text with ImageButton
you can use a default button. Just use Drawable bottom | top | right | left for image. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 5:53 PM, gosh wrote: > > Hi there, > > A 'Button' view comes up with text, while the 'ImageButton' widget > comes up with an image but no text, is there a way to relatively > easily (e.g. method calls, say), either: > > 1. Add text to ImageButton (like those buttons that appear in menu > item/via the physical menu button)? > > or > > 2. Add an icon/image to a Button? > > without resorting to constructing a new button class? > > I.e. I could put text within the image, but then I can't use > Localization properly/effectively. > > Any suggests, much appreciated here. > Steve > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Equi Size button in linearLayout
Thanks mark, it works -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 3:46 PM, Mark Murphy wrote: > > Atif Gulzar wrote: > > unfortunately it will not make button equi size. As > > android:layout_weight only distribute empty space. > > So, set android:layout_width="0px" for both. Then, the entire width is > empty space, and two equal android:layout_weight="1" values will result > in two buttons of equal size. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > _Beginning Android_ from Apress Now Available! > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Equi Size button in linearLayout
unfortunately it will not make button equi size. As android:layout_weight only distribute empty space. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 1:52 PM, Jeff Sharkey wrote: > > Since the buttons are inside a LinearLayout, assign > android:layout_weight="1" to each of the children. Or, any fraction > thereof, as long as the weights are identical. > > j > > On Tue, Aug 11, 2009 at 11:44 PM, Atif wrote: > > > > I want to place three button on the bottom of screen. I place these > > button in a linear layout and sets its gravity bottom. > > > > Currently these button wrap according to their labels so have > > different widths. But I want these button equi size. Means all three > > button should have same width (without using fixed widths). > > > > Is it possible? > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > > > > > > > > -- > Jeff Sharkey > jshar...@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 -~--~~~~--~~--~--~---
[android-developers] Re: button press on custom drawable
Thanks Jiri, That is exactly what I was looking for. Thanks again. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 12:52 PM, Jiri wrote: > > Maybe this will help you: > > > http://www.anddev.org/tinytutcustom_button_backgrounds-better_imagebutton-t4298.html > > regards, > > Jiri > > Atif wrote: > > The default button turns yellow|orange when it is pressed. > > > > I just replaced the background through Drawable given below. But now > > it stop changing the color on press. Sure I have to provide another > > drawable (lets call it pressedButton) for that. But how and on which > > even I should apply this pressedButton Drawable. Thanks > > > > > > > > > > http://schemas.android.com/apk/res/android"; > > android:shape="rectangle"> > >> android:centerColor="#" > > android:endColor="#FF505050" /> > >> android:bottom="5dp" /> > > > > > > > > > > -- > > Best Regards, > > Atif Gulzar > > > > I Unicode, ɹɐzlnƃ ɟıʇɐ > > > > > > > > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: add an activity pragmatically in Menifest.xml
is not it an extra task for client to list all activities provided by my Lib? -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Wed, Aug 12, 2009 at 10:41 AM, Dianne Hackborn wrote: > Yes, all activities, services, receivers, and providers must be declared in > the manifest. > > On Tue, Aug 11, 2009 at 9:05 PM, Atif wrote: > >> >> suppose my library has some activities. Do I need to register these >> activities in client menifest file? Thanks >> >> On Aug 10, 6:10 pm, Andrei Bucur wrote: >> > This is how I make libraries for Android in Eclipse: >> > 1. I make a new Java project >> > 2. In the project properties, at Java Build Path -> Libraries, I replace >> the >> > the JDK library with the android.jar, found in the Android SDK. >> > From what I tested, this solution seems to work. >> > >> > On Mon, Aug 10, 2009 at 2:54 PM, Atif wrote: >> > >> > > Hi, >> > >> > > I want to run an activity without adding it in Menifest.xml file. Is >> > > it possible? and how? >> > >> > > Actually I am developing a component (Library) that other users can >> > > plugged with their programs. >> > >> > > Best regards, >> > > Atif >> >> > > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: disable scrolling touch events in ScrollView, just want to to scroll programmatically
do not use scrollView at all and use LinearLauout and use combination of touch events and scrollBy(int, int), scrollTo(int, int). By this way you can also achieve horizontal scrolling. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Aug 10, 2009 at 2:50 PM, rukiman wrote: > > Just wondering if there is an easier way to simply stop ScrollView > from being scrolled via touch inputs? I will programmatically get the > ScrollView to scroll to top or bottom. > > As a last resort, I guess I will have to inherit from ScrollView and > capture all the ontouch events. But wondering if there is an easier > way before I take this approach? > > Thanks. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AsyncTask reuse
there is a difference in "can be used only once" and "single running instance is allowed" The correct is only single running instance is allowed. Once can get the status through getStatus and can take action accordingly e.g. cancel if (YourasynchSubClass.getStatus() == AsyncTask.Status.RUNNING) YourasynchSubClass.cancel(true); YourasynchSubClass.execute(parms); -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Fri, Aug 7, 2009 at 6:14 AM, Dianne Hackborn wrote: > If they have state associated with them, it can avoid a lot of errors to > not re-use a stale object. > > On Thu, Aug 6, 2009 at 4:27 PM, Jason Proctor < > jason.android.li...@gmail.com> wrote: > >> >> i must admit i don't quite understand these implementation decisions. >> one-use classes don't make much sense to me. why not make something >> reusable if you can? >> >> >> >> >An AsyncTask instance can be used only once indeed. And they're not >> >meant to be created/started dozens of times per second so the GC will >> >be just fine. >> > >> >On Thu, Aug 6, 2009 at 4:00 PM, Jason >> >Proctor wrote: >> >> >> >> is it true that AsyncTasks can only be executed once? IMHO they >> >> should be reusable, one-use classes just give the GC more of a job. >> >> >> >> -- >> >> jason.software.particle >> >> >> > > > >> >> >> >> >> -- >> jason.software.particle >> >> >> > > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Dialog
I will recommend you to read http://android-developers.blogspot.com/2009/05/painless-threading.html and http://developer.android.com/reference/android/os/AsyncTask.html -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Tue, Aug 4, 2009 at 3:56 PM, Saurav Mukherjee < to.saurav.mukher...@gmail.com> wrote: > make use of message for updating the progress dialogbox from the http > thread. i think it'll b better if u use progress dialog with > setIndeterminate(true). this wud make it simpler and u dont have to keep > note of the progress... > > hope this helps. > > cheers! > > > On Tue, Aug 4, 2009 at 2:58 PM, Rahul wrote: > >> >> hi >> i want to Download image from Server using Http Connection and at same >> time i want to show ProgressDialod till is not Downloaded >> i dont undestand how to do this >> plz help me >> thank you >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---