[android-developers] How to handle widget's Long Click event on home screen?
Dear All, Does anyone know how to handle widget's Long Click event on home screen? I want to implement: long click one widget on home screen then one menu will be popup. Thanks, Jimmy --~--~-~--~~~---~--~~ 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 handle widget's Long Click event on home screen?
You cannot do this. Long press on Home is reserved to drag and drop. On Sun, Aug 9, 2009 at 11:15 PM, Jimmy Huanghuan...@gmail.com wrote: Dear All, Does anyone know how to handle widget's Long Click event on home screen? I want to implement: long click one widget on home screen then one menu will be popup. Thanks, Jimmy -- 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 -~--~~~~--~~--~--~---
[android-developers] Re: about the hardware acceleration of Skia drawing
No, we are not working on this at the moment. That said, we did an experiment about a year ago and you can probably find the results of that experiment in the source code of the platform. On Sun, Aug 9, 2009 at 10:57 PM, Zhiguo Gezhiguo.ge.w...@gmail.com wrote: Hi, Dianne Thanks for your reply. I heard that google is working on 2D Skia acceleration based on OpenGL. Is it true? On Tue, Aug 4, 2009 at 3:56 PM, Dianne Hackborn hack...@android.com wrote: No, Skia is not accelerated. On Mon, Aug 3, 2009 at 11:17 PM, Zhiguo Ge zhiguo.ge.w...@gmail.com wrote: Hi, I would like to know whether Android currently supports the hardware accelleration for SKia 2D drawing. Thanks! -- 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. -- 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 -~--~~~~--~~--~--~---
[android-developers] Re: Will a notification still work if the device once shut down.
An Android device that is turned off, can't be started by an alarm. (Unlike e.g. SE and Nokia phones). Set the alarm clock on your Android phone, then turn it off. It will be kept off. On 6 Aug, 10:42, guishenl...@gmail.com guishenl...@gmail.com wrote: Hi all, I have an application with notification. I want to keep the notification working even if the device once shut down just like an alarm. Could anyone give me some sample code to help me? Thank you 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] Re: How to handle widget's Long Click event on home screen?
Thanks for your quick reply. But if I develop one myself's Home, then I can define the Long press event on myself widget on Home? Thanks, Jimmy On Aug 10, 3:01 pm, Romain Guy romain...@google.com wrote: You cannot do this. Long press on Home is reserved to drag and drop. On Sun, Aug 9, 2009 at 11:15 PM, Jimmy Huanghuan...@gmail.com wrote: Dear All, Does anyone know how to handle widget's Long Click event on home screen? I want to implement: long click one widget on home screen then one menu will be popup. Thanks, Jimmy -- 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 -~--~~~~--~~--~--~---
[android-developers] Re: How to find my apps´ locati on
Sorry, I mean, I want to integrate a menu(in an app) where I can tap to related apps.Then the app should open the Andoid-Market. But unfortunately I don't know how to do that. On Aug 9, 4:15 pm, Jack Ha jack...@t-mobile.com wrote: Not sure what you mean here by finding thelocationof your otherapps. Can you please elaborate on that? -- 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 9, 3:42 am, Nox v.beh...@googlemail.com wrote: Hi everybody, I´ve developed an app and I want to display my otherappsI´ve already published but I don´t know theirlocation. Do you know how tofindthem??? Thanks in advace Viktor --~--~-~--~~~---~--~~ 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: Why does my PhoneStateListener go quiet?
Thanks for you input Chris. I have managed to get around the issue by using SCREEN_DIM_WAKE_LOCK, the PhoneStateListener still receives updates when held in that state. As my app is for engineering purposes and will not be for the general Market, i have decided to make it a platform application so i am no longer bound by the SDK API's. I would have preferred to stick to the SDK, but it is in need of some work. According to issue 700 (i think) google is planning on making that API better. Liam On Aug 7, 12:32 pm, chrisnew ch...@floor51.com wrote: On Jul 29, 2:59 pm, Ne0 liamjamesalf...@googlemail.com wrote: I am using ACCESS_COARSE_LOCATION in my manifest. On 29 July, 14:49, Ne0 liamjamesalf...@googlemail.com wrote: Hi, Been having some issues with my PhoneStateListener, what i would like it to do is to always listen to CellLocationUpdates even when the phone sleeps. I am currently trying to do this with the following code. public class MyService extends Service { ... public void onCreate() { // Start listening to the phone mMyPhoneListener = new MyPhoneStateListener(this); mTelephonyManager = (TelephonyManager)getSystemService (TELEPHONY_SERVICE); mTelephonyManager.listen(mMGPhoneListener, PhoneStateListener.LISTEN_CELL_LOCATION) mPm = (PowerManager) getSystemService(Context.POWER_SERVICE); mWl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MYS); mWl.acquire(); Log.d(MGS, ServiceOnCreate); } public void onDestroy() { // Stop listen to the location updates mTelephonyManager.listen(mMGPhoneListener, PhoneStateListener.LISTEN_NONE); // Release wake lock mWl.release(); Log.d(MGS, ServiceOnDestroy); } } public class MyPhoneStateListener extends PhoneStateListener { public voidonCellLocationChanged(CellLocation location) { // DOING SOME LOGGING } } Even though i am using a PARTIAL_WAKE_LOCK the CellLocationUpdates stop when the phone sleeps, i am almost certain that my service is not getting destroyed as i have debug in place onDestroy to show this happening on logcat. I have also noticed this on logcat, D/MGS ( 6153): ServiceOnCreate (my debug of the service starting) and D/SurfaceFlinger( 59): About to give-up screen, flinger = 0x1841e8 D/dalvikvm( 143): GC freed 54 objects / 2328 bytes in 146ms D/dalvikvm( 6153): GC freed 2115 objects / 126456 bytes in 140ms Is this android freeing up the memory from my service? looks like the same PID? Can anyone shed some light on why i am not receiving any updates after the screen/phone sleeps? Thanks Liam. Hi Liam, I've tried the following: - create a Service which creates a PhoneStateListener based class - setup a Handler in the Service to run every minute and reset the TelephonyManager.listen call with LISTEN_CELL_LOCATION and LISTEN_SIGNAL_STRENGTH - make the Handler in the Service run PowerManager.WakeLock.acquire every minute with SCREEN_DIM_WAKE_LOCK - create a class that is called by RECEIVE_BOOT_COMPLETED to run the service on phone boot with the idea that maybe services started on boot are treated differently I've found that the PhoneStateListener class begins returning -1 for cell and signal when it is forcefully sent a listen request every minute which I think illustrates why the cell listener goes quiet - ie. the Android framework is no longer receiving the cell/signal data from the modem. I think that a possible solution is to call PowerManager.WakeLock.acquire with SCREEN_DIM_WAKE_LOCK after the phone is sent to idle state though I need to leave it running for a while to see how it behaves. Obviously this has a significant battery impact so it would be much better if the framework is modified. Perhaps the framework is meant to stop receiving cell/signal updates from the modem when the phone is idle to save power though a forceful wakeup must clearly be sent when a call/message comes in at which point I guess the cell/ signal data is made available again to correctly set the signal indicator on the UI. I have seen an enableLocationUpdates method in the TelephonyManager.java code in the source download and maybe it is this which is being called by the framework when the phone is sent to idle to disable the cell/signal updates. I will try and see if calling this after the phone is sent to idle makes a difference (if I can compile against the internal version and the symbol is available on device). chris --~--~-~--~~~---~--~~ 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
[android-developers] Is there any alternative of ImageIO class in Android?
Hi, I want to port Java Application to Android. The application is based on JOGL. For implementing Texture part I need to find out an alternative to ImageIO class. I have read about Bitmap class. Moreover, can someone let me know how to load texture from Inputstream which is not in the resource folder. I mean to say that the image will be fetched from a URL. Hope to get a reply soon. Thanks Regards Sunil --~--~-~--~~~---~--~~ 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: Is there any alternative of ImageIO class in Android?
Look at BitmapFactory. On Mon, Aug 10, 2009 at 1:06 AM, javame_androidsu...@saltriver.com wrote: Hi, I want to port Java Application to Android. The application is based on JOGL. For implementing Texture part I need to find out an alternative to ImageIO class. I have read about Bitmap class. Moreover, can someone let me know how to load texture from Inputstream which is not in the resource folder. I mean to say that the image will be fetched from a URL. Hope to get a reply soon. Thanks Regards Sunil -- 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 -~--~~~~--~~--~--~---
[android-developers] Re: Is there any alternative of ImageIO class in Android?
make use of the BitmapFactory class's static methods. On Mon, Aug 10, 2009 at 1:36 PM, javame_android su...@saltriver.com wrote: Hi, I want to port Java Application to Android. The application is based on JOGL. For implementing Texture part I need to find out an alternative to ImageIO class. I have read about Bitmap class. Moreover, can someone let me know how to load texture from Inputstream which is not in the resource folder. I mean to say that the image will be fetched from a URL. Hope to get a reply soon. Thanks Regards Sunil -- Regards, Sujay Samuel Goldwynhttp://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html - I'm willing to admit that I may not always be right, but I am never wrong. --~--~-~--~~~---~--~~ 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: ADC2
Wait for instructions to appear on http://code.google.com/android/adc/ *bump* Still waiting for instructions... --~--~-~--~~~---~--~~ 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] question about tabhost
hi all, I have a questions for setting tab widget, if I set three tab initial, then how can I remove one of three tab? because form the reference, http://www.104.com.tw/area/army/search.cfm#go there only have the clearalltabs() method. 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: question about tabhost
and the other question is when I want to add tab, the code is: eg: mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator (one).setContent(R.id.mTextView); if now I want to add two component in a tab content such as TextView and Button widget, then how can I do that? thanks!! On 8月10日, 下午4時21分, tstanly tsai.sta...@gmail.com wrote: hi all, I have a questions for setting tab widget, if I set three tab initial, then how can I remove one of three tab? because form the reference,http://www.104.com.tw/area/army/search.cfm#go there only have the clearalltabs() method. 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] questions about tabHost
hi all, I have two questions for setting tab widget, if I set three tab initial, then how can I remove one of three tab? because form the reference, http://developer.android.com/reference/android/widget/TabHost.html#setCurrentTabByTag(java.lang.String) there only have the clearalltabs() method. and the other question is when I want to add tab, the code is: eg: mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator (one).setContent(R.id.mTextView); if now I want to add two component in a tab content such as TextView and Button widget, then how can I do that? 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: AppWigets into Applications
Hi, thanks for the answers but I still have doubts because I don't want to choose de widget from a list, instead of this, I want to insert a specifically widtget, so, is it necessary to use the android.appwidget.action.APPWIDGET_PICK intent in this case? Thanks On 7 ago, 10:02, Jeff Sharkey jshar...@android.com wrote: After you allocate the appWidgetId, you need to launch the android.appwidget.action.APPWIDGET_PICK intent, which will show a dialog that lets the user pick which widget to bind. Here's an example of how Launcher does this: http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;... You don't need to request any permissions to bind widgets. In fact, only the platform can bind them, since binding is the primary security mechanism for widgets. If apps could bind widgets programmatically, one could imagine a bad app that would bind to your Calendar widget without your knowledge and slowly scrape updates about your personal events over time, etc. Once the user has successfully finished the binding process, your onActivityResult() is called, and shortly thereafter you should start receiving RemoteViews updates from that widget the callbacks you registered through AppWidgetHost.startListening(). j On Thu, Aug 6, 2009 at 4:45 AM, karansmwankh...@gmail.com wrote: hi, You need to bind your widgets id first, and for doing that you need to do two things 1) you will need a permission for binding 2) you will need to share your process id. Let me know if you still face the problem, On Aug 6, 4:35 pm, mtd martit...@hotmail.com wrote: Hi, I am trying to create an application that contains AppWidgets, but only get to show the original layout of the same, unable to interact with them. The main steps that I followed are: AppWidgetManager mAppWidgetManager = AppWidgetManager.getInstance (this); AppWidgetHost mAppWidgetHost = new AppWidgetHost(this, hostId); appWidgetId = mAppWidgetHost.allocateAppWidgetId(); // i is an integer used to specify the widget I want to insert AppWidgetHostView appWidgetHostView = mAppWidgetHost.createView(this, appWidgetId, appWidgetProviderInfo.get(i)); appWidgetHostView.setAppWidget(appWidgetId, (AppWidgetProviderInfo) appWidgetProviderInfo.get(i)); And then insert the appWidgetHostView into my application layout.Has anyone managed to enter AppWidgets into their applications and can tell me what I'm doing wrong? Thank you very much -- Jeff Sharkey jshar...@android.com- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 scrolling touch events in ScrollView, just want to to scroll programmatically
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] how can I move an Item to the center of the screen?
hi guys; In a ListView, if we click one item that is at the button of the screen, can we move it to the center of the screen automatically when this click action happens? BR -- ian.luo --~--~-~--~~~---~--~~ 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)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View.html#scrollBy%28int,%20int%29, scrollTo(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View.html#scrollTo%28int,%20int%29. 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 ruksh...@optushome.com.au 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: listview (text+icon) inside a class Atcivity and not ListActivity
Hi Mark Even if it's the same like what you said, I guess I have to make my own getView(int position, View convertView, ViewGroup parent) http://developer.android.com/intl/fr/guide/samples/ApiDemos/src/com/example/android/apis/view/List14.html Do you think its just possible to change severale thinks on the List14.java or I Have to create my new own getView(...). I explain you what I want. I have some string and I want to introduce it into a ArrayAdapter. And I want to introduce also some different icon with that string like I want. Could you help me to know is it possible ?? my following starting (just string) code: ** setContentView(R.layout.content_tab_voicemail); ListView list=(ListView) findViewById (R.id.ListVoicemail); ArrayListString mStrings = new ArrayListString(); ArrayAdapterString mAdapter = new ArrayAdapterString (this,android.R.layout.simple_list_item_1, mStrings); // Récupérer les infos pour chaque message ex: Date for(int i=0 ; i oClient.getnbMess() ; i++) { mAdapter.add(oClient.getMsg(i).getDate()); } list.setAdapter(mAdapter); ** This code just add string into mAdapter Thanks Dany On Aug 7, 3:55 pm, Mark Murphy mmur...@commonsware.com wrote: Dany BREARD wrote: I want to know if its possible to make a listview (text+icon) on a class extends Activity and not on a class extends ListActivity. Yes. You will need to call findViewById() to get your ListView, rather than call getListView(). Similarly, there will be minor changes if you want to be notified when the user clicks or selects an item in the list. Otherwise, it should be the same. -- 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] Close Application
Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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
LinearLayout will not work for me as what I want to put in the ScrollView is much larger than the screen. So I think it is easier to use ScrollView as it knows to not render the widgets until it scrolls onto view? Unless can you get that behaviour using a LinearLayout? On Aug 10, 7:32 pm, Atif Gulzar atif.gul...@gmail.com wrote: do not use scrollView at all and use LinearLauout and use combination of touch events and scrollBy(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View .html#scrollBy%28int,%20int%29, scrollTo(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View .html#scrollTo%28int,%20int%29. 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 ruksh...@optushome.com.au 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: Setting a listener for drag animations in MapView
Hi Daniel, check out mapview-overlay-manager. http://code.google.com/p/mapview-overlay-manager/ its a library that exactly addresses to your needs. would be great if you can give me some feedback. Greetings, Christoph On 7 Aug., 14:01, Cachapa cach...@gmail.com wrote: Hi, I have a class which extends MapView and manages markers inside the view. The trouble is I have a *lot* of markers to show (~12,000), and loading them all at once doesn't really work, so I'm retrieving the markers on demand so that at any time there will be only ~20 markers on the map (at lower zoom levels the markers are condensed into a few area markers). I need to set a listener for when the map drag animation stops so that I can load the markers at this point, but I've tried everything from setLayoutAnimationListener(this) to overriding onAnimationEnd (Animation arg0) and onAnimationEnd() without any positive results (those methods seem to never be called). My current solution is listening to a MotionEvent.ACTION_UP and updating the map at that moment, but that makes the animation jerky, and may load the wrong set of markers depending on how fast the user was scrolling. So, does anyone know if it is possible to listen to the map's animation? Cheers, Daniel Cachapa --~--~-~--~~~---~--~~ 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
Also I really want to use the .smoothScrollBy() function of the scrollView. On Aug 10, 7:39 pm, rukiman ruksh...@optushome.com.au wrote: LinearLayout will not work for me as what I want to put in the ScrollView is much larger than the screen. So I think it is easier to use ScrollView as it knows to not render the widgets until it scrolls onto view? Unless can you get that behaviour using a LinearLayout? On Aug 10, 7:32 pm, Atif Gulzar atif.gul...@gmail.com wrote: do not use scrollView at all and use LinearLauout and use combination of touch events and scrollBy(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View .html#scrollBy%28int,%20int%29, scrollTo(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View .html#scrollTo%28int,%20int%29. 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 ruksh...@optushome.com.au 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] About https connection
Hello, experts, About Android new platform Donut... It cannot build a https connection which has a private certification . Such as, If we try to connect to a private certification website, the browser may show ignore, trust it, quit to continue browsing webpage. Will andorid has any plan to support full function for browsing SSL website? Besides, if I want to manually add default trust website certification, what should I do? Thanks your reply. --~--~-~--~~~---~--~~ 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: Close Application
System.exit(0) -- Android Academy http://www.androidacademy.com On Aug 10, 10:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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] AppAccelerator for Android and iPhone
does someone knows and uses appaccelerator (http:// www.appcelerator.com/products/titanium-mobile/) for android? What do you think about? --~--~-~--~~~---~--~~ 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
Ok my requirements for this were 1) need scrollview to do smooth scrolling however only wanted scrolling to occur programmatically and not via touch 2) scrollview hijacks some touch events that stop the inner widgets from working so didnt want this. so I had to extend scrollview to meet my requirements: import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.ScrollView; public class ScrollViewNoScroll extends ScrollView { public ScrollViewNoScroll(Context context, AttributeSet attrs) { super(context, attrs); } public boolean onTouchEvent(MotionEvent ev) { return true; } public boolean onInterceptTouchEvent(MotionEvent ev) { return false; } } On Aug 10, 7:44 pm, rukiman ruksh...@optushome.com.au wrote: Also I really want to use the .smoothScrollBy() function of the scrollView. On Aug 10, 7:39 pm, rukiman ruksh...@optushome.com.au wrote: LinearLayout will not work for me as what I want to put in the ScrollView is much larger than the screen. So I think it is easier to use ScrollView as it knows to not render the widgets until it scrolls onto view? Unless can you get that behaviour using a LinearLayout? On Aug 10, 7:32 pm, Atif Gulzar atif.gul...@gmail.com wrote: do not use scrollView at all and use LinearLauout and use combination of touch events and scrollBy(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View .html#scrollBy%28int,%20int%29, scrollTo(int, int)file:///E:/android-sdk-windows-1.5_r3/docs/reference/android/view/View .html#scrollTo%28int,%20int%29. 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 ruksh...@optushome.com.au 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: Close Application
Doesn't work. It just closes the active Activity and changes to the last Activity. Actually it has the same effect like finish() Regards, Pascal On 10 Aug., 11:54, Carl Whalley carl.whal...@googlemail.com wrote: System.exit(0) -- Android Academyhttp://www.androidacademy.com On Aug 10, 10:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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: Close Application
Android kills your application if it is unused for long time.Your job is to close all application's activities with finish() method. Bye 2009/8/10 Blackmarket pascal.se...@gmail.com Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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: Close Application
you have to close all application's activities! When you change activity, you have to call finish() on old activity, so just one activity is shown on screen and in stack. 2009/8/10 Blackmarket pascal.se...@gmail.com Doesn't work. It just closes the active Activity and changes to the last Activity. Actually it has the same effect like finish() Regards, Pascal On 10 Aug., 11:54, Carl Whalley carl.whal...@googlemail.com wrote: System.exit(0) -- Android Academyhttp://www.androidacademy.com On Aug 10, 10:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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: SoftKeyboard doesn't appear on AlertDialog
Hi The bug is on alertdialog with one custom view on Title. If this view has one or more EdittText, the Softkeyboard doesn't appear when you click on they :s drjunior On Jul 31, 7:24 am, Gulfam gulfa...@gmail.com wrote: Hi, Can you please post your code snippet? Gulfam On Jul 30, 3:53 pm,drjuniordrjunior@gmail.com wrote: Hi, I have one EditText inside one AlertDialog. When the EditText has focus the SoftKeyboard doesn't appear with vertical screen orientation. I have other EditTex in a common Layout and this works fine. Someone with same 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 -~--~~~~--~~--~--~---
[android-developers] Animation across the layouts
Hello. I've met a problem with animation when tried to make a View to perform the animation which should cross 2 layouts, e.g. make a translate animation so a view could move down to the TableRow below. This trick works fine when i try to move a view within a single TableRow but not when i try to move it up or down. I've also discovered that if i create a single RelativeLayout and apply the same animation there, it works fine, but i can't arrange all the components i need on the screen. Could anybody please provide me any hints about it? Best regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to add a new application to the cupcake source code?
Some APIs is not supplied in SDK,such as bluetooth and so on. I want to develop an app in cupcake source code.It can simulate keyinject like Monkey and it should communicate with PC by bluetooth. What should I pay more attention?How do I change the makefile? Is it relizalible? --~--~-~--~~~---~--~~ 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: Animation across the layouts
I should add that the observed behavior for the animation across the layouts is interrupted movement, while animation within the same layout works fine without any interruptions. On 10 авг, 15:16, BouHu petrov@gmail.com wrote: Hello. I've met a problem with animation when tried to make a View to perform the animation which should cross 2 layouts, e.g. make a translate animation so a view could move down to the TableRow below. This trick works fine when i try to move a view within a single TableRow but not when i try to move it up or down. I've also discovered that if i create a single RelativeLayout and apply the same animation there, it works fine, but i can't arrange all the components i need on the screen. Could anybody please provide me any hints about it? Best regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Text-To-Speech library
Hi all, is there any text to speech library in 1.5?? if so where is it??? how can we use it?? -- Regards, Sujay Charles de Gaullehttp://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html - The better I get to know men, the more I find myself loving dogs. --~--~-~--~~~---~--~~ 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 use preferences widgets together.
On Aug 10, 6:03 am, ANKIT SOMANI ankitsomani...@gmail.com wrote: Is there any example of it like using the preferences with widgets. ? How about ExampleAppWidgetConfigure.java, in the Android API Demos? String --~--~-~--~~~---~--~~ 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 create XML file Programmatically?
Prajkti wrote: I want to create an XML file to Store my Application Settings into. ( I can't use SharedPrefs because i want that Settings file later to be accessed by Some other Code.) That makes absolutely no sense. I can easily create an XML with java's code and store it in File too. but in Android I can create xml with the same java code but can't save it into the file coz they have removed the package javax.xml.transform from SDK. Then write the XML directly. Or use a third-party JAR. Or skip XML and use the org.json classes to store the data in JSON. Or use a nicely-transactional SQLite database. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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: Text-To-Speech library
just googled and founded http://www.anddev.org/text-2-speech_tts_for_android_released-t3964.html 2009/8/10 Sujay Krishna Suresh sujay.coold...@gmail.com Hi all, is there any text to speech library in 1.5?? if so where is it??? how can we use it?? -- Regards, Sujay Charles de Gaullehttp://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html - The better I get to know men, the more I find myself loving dogs. --~--~-~--~~~---~--~~ 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] list with multiple selection
Hello, I want to create list with multiple selection. Can some one tell me how can i create it ? code snippt will be much useful. --~--~-~--~~~---~--~~ 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/where to submit the apps to ADC2?
manoj wrote: Hi friends, I developed an application for android. I would like to submit the same to ADC2 (Android Developer Challenge 2). I didnt find any source to submit the apps. Can any one please suggest me the sites to submit the apps? They have not announced the process for this yet. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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: listview (text+icon) inside a class Atcivity and not ListActivity
Dany BREARD wrote: Hi Mark Even if it's the same like what you said, I guess I have to make my own getView(int position, View convertView, ViewGroup parent) http://developer.android.com/intl/fr/guide/samples/ApiDemos/src/com/example/android/apis/view/List14.html Do you think its just possible to change severale thinks on the List14.java or I Have to create my new own getView(...). Implementing getView() is not that hard. Here is a link to an excerpt from one of my books that covers the process: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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: Text-To-Speech library
Sujay Krishna Suresh wrote: is there any text to speech library in 1.5?? if so where is it??? how can we use it?? There is no TTS library in the Android SDK. However, there is a third-party TTS library that some projects have used: http://code.google.com/p/eyes-free/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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] add an activity pragmatically in Menifest.xml
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 --~--~-~--~~~---~--~~ 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: Text-To-Speech library
Thnx for the reply guys... i tried searching developer.android.com for text to speech got to a class called InputMethodService. An input method has significant discretion in how it goes about its work: the InputMethodServicehttp://developer.android.com/reference/android/inputmethodservice/InputMethodService.htmlprovides a basic framework for standard UI elements (input view, candidates view, and running in fullscreen mode), but it is up to a particular implementor to decide how to use them. For example, one input method could implement an input area with a keyboard, another could allow the user to draw text, while a third could have no input area (and thus not be visible to the user) but instead listen to audio and* perform text to speech conversion*. This is from the class overview. Wat do they mean by the bold text? can this class help in text to speech conversion??? On Mon, Aug 10, 2009 at 5:11 PM, Mark Murphy mmur...@commonsware.comwrote: Sujay Krishna Suresh wrote: is there any text to speech library in 1.5?? if so where is it??? how can we use it?? There is no TTS library in the Android SDK. However, there is a third-party TTS library that some projects have used: http://code.google.com/p/eyes-free/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming Books: http://commonsware.com/books.html -- Regards, Sujay Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers. --~--~-~--~~~---~--~~ 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
Atif wrote: I want to run an activity without adding it in Menifest.xml file. Is it possible? and how? It is not possible. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text-To-Speech library
Sujay Krishna Suresh wrote: Thnx for the reply guys... i tried searching developer.android.com http://developer.android.com for text to speech got to a class called InputMethodService. An input method has significant discretion in how it goes about its work: the InputMethodService http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html provides a basic framework for standard UI elements (input view, candidates view, and running in fullscreen mode), but it is up to a particular implementor to decide how to use them. For example, one input method could implement an input area with a keyboard, another could allow the user to draw text, while a third could have no input area (and thus not be visible to the user) but instead listen to audio and* perform text to speech conversion*. This is from the class overview. Wat do they mean by the bold text? can this class help in text to speech conversion??? What it means is that you missed the word could in that sentence. None of what is in that sentence is available in the SDK today. They are all things that *could* be done. For example, one *could* use a third-party TTS library and the input method framework to offer a voice-based input method. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: add an activity pragmatically in Menifest.xml
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 atif.gul...@gmail.com 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 --~--~-~--~~~---~--~~ 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: Setting a listener for drag animations in MapView
Hi Christoph, thanks for your suggestion, but from playing with your library demonstrator you seem to be have the same problem I identified with my solution: since the only event available from the framework is when the user lifts his finger from the touchscreen (MotionEvent.ACTION_UP), the area used for retrieving the markers may be different than the area which is shown after the scrolling animation stops. To test this I compiled your demonstrator with the createOverlayWithLazyLoading() method, zoomed in a bit and made quick horizontal swipes. When I did this, no markers would show up because the decelaration animation would move beyond the area calculated at the moment I lifted my finger (or, in the emulator, my mouse). I couldn't confirm that this was really the case because I couldn't find the source code for the library anywhere, even though your project is listed as being GPL2. So I'm back to square one: I need to know how to get an event when the map deceleration animation finishes. Right now, I don't think that this is available from the framework. If that's the case, then I'll open a bug report with the official repository. On Aug 10, 11:40 am, christoph widulle christoph.widu...@googlemail.com wrote: Hi Daniel, check out mapview-overlay-manager.http://code.google.com/p/mapview-overlay-manager/ its a library that exactly addresses to your needs. would be great if you can give me some feedback. Greetings, Christoph On 7 Aug., 14:01,Cachapacach...@gmail.com wrote: Hi, I have a class which extends MapView and manages markers inside the view. The trouble is I have a *lot* of markers to show (~12,000), and loading them all at once doesn't really work, so I'm retrieving the markers on demand so that at any time there will be only ~20 markers on the map (at lower zoom levels the markers are condensed into a few area markers). I need to set a listener for when the map drag animation stops so that I can load the markers at this point, but I've tried everything from setLayoutAnimationListener(this) to overriding onAnimationEnd (Animation arg0) and onAnimationEnd() without any positive results (those methods seem to never be called). My current solution is listening to a MotionEvent.ACTION_UP and updating the map at that moment, but that makes the animation jerky, and may load the wrong set of markers depending on how fast the user was scrolling. So, does anyone know if it is possible to listen to the map's animation? Cheers, DanielCachapa --~--~-~--~~~---~--~~ 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: Close Application
Is there a way to access all Activities of an Application? My Problem is, that i don't know how to access other activities to close them. On 10 Aug., 12:49, Alessio Grumiro a.grum...@gmail.com wrote: you have to close all application's activities! When you change activity, you have to call finish() on old activity, so just one activity is shown on screen and in stack. 2009/8/10 Blackmarket pascal.se...@gmail.com Doesn't work. It just closes the active Activity and changes to the last Activity. Actually it has the same effect like finish() Regards, Pascal On 10 Aug., 11:54, Carl Whalley carl.whal...@googlemail.com wrote: System.exit(0) -- Android Academyhttp://www.androidacademy.com On Aug 10, 10:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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] MediaPlayer bug, pls help!
Hello! I have such code: public static MediaPlayer mp_click; mp_click = MediaPlayer.create(Context, R.raw.click); ... mp_click.start(); When my sound played for the first time, it's all fine. But when for second, third, etc.. it sounds like cutted, just little part of my click.wav. If I put there sound in another format like mp3 or ogg - all just fine. Or if I write like this: mp_click = MediaPlayer.create(CubeTest_Main.Context, R.raw.click); mp_click.start(); All if fine too, but this is a bit slow, becouse this sound is playing very often. If You now how to fix it, pls help me. 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] Proxy SDK 1.5r1
Hi all, With this SDK version I can use my emulator using a proxy server. There is three solutions: - add values in system table - configure -http-proxy in eclipse run menu - configure APN on emulator to set the proxy When I use Android browser, it's really slow but it's working...If I try to to a post from my application, I take an ANR and some minutes later a socket time out. Somebody knows the solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Close Application
I don't know, but you can save each activitie in a static list. 2009/8/10 Blackmarket pascal.se...@gmail.com Is there a way to access all Activities of an Application? My Problem is, that i don't know how to access other activities to close them. On 10 Aug., 12:49, Alessio Grumiro a.grum...@gmail.com wrote: you have to close all application's activities! When you change activity, you have to call finish() on old activity, so just one activity is shown on screen and in stack. 2009/8/10 Blackmarket pascal.se...@gmail.com Doesn't work. It just closes the active Activity and changes to the last Activity. Actually it has the same effect like finish() Regards, Pascal On 10 Aug., 11:54, Carl Whalley carl.whal...@googlemail.com wrote: System.exit(0) -- Android Academyhttp://www.androidacademy.com On Aug 10, 10:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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 button on focus?
Hi, i have a set of buttons. Usualy i can also move between em also with my trackball. But now I have set styles on my buttons and I dont see anymore if a button is focused. What can I do, is there a specific Styles Tag that I can use till now i use: style name=DoorButton item name=android:background#66/item item name=android:textSize12sp/item item name=android:textStylebold/item item name=android:textColor#FFF/item /style OR!! is there something i can check within my App if a button comes focused so i can highlight em manual? thanks chris --~--~-~--~~~---~--~~ 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 Android 1.5 SDK installed in most of the android phones now ? (I want to use GLSurfaceView)
I would like to use GLSurfaceView for my new cool application :) But I am still hestitating because Android 1.1 and Android 1.0 do not have GLSurfaceView class. And another question, If I don't use GLSurfaceView, how can I use OpenGL with SurfaceView class? 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] Weird height of ScrollView
Hey guys, I'm trying to build an interface and I'm having some trouble with the ScrollView component. Basically, no matter what height I set the ScrollView, it only renders 45px high. Even if I set the height to a fixed pixel number (like, 200px) it still only renders into a tiny area of the screen. Generally, I've got a pair of tabs at the top, then the FrameLayout. Inside of that, my first tab is a vertical LinearLayout, with a horizontal LinearLayout holding small labels, then a ScrollView with a ListView inside of that. The FrameLayout appears to be rendering the full height, as my second tab fills the space as you would expect. Here is the XML: LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TabHost android:id=@+id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content / FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingTop=35px LinearLayout android:id=@+id/packageTab xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent include layout=@layout/review_collection_header / ScrollView android:orientation=vertical android:layout_width=fill_parent android:layout_height=200px ListView xmlns:android=http://schemas.android.com/apk/res/android; android:id=@+id/listByPackage android:layout_width=fill_parent android:layout_height=wrap_content android:drawSelectorOnTop=false / /ScrollView /LinearLayout Button android:id=@+id/brandTab android:layout_width=fill_parent android:layout_height=fill_parent android:text=A semi-random button / /FrameLayout /TabHost /LinearLayout also, here is the included review_collection_header layout: LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content android:background=#FF00 xmlns:android=http://schemas.android.com/apk/res/android; TextView android:text=Name android:gravity=left android:layout_width=152px android:layout_height=wrap_content android:textColor=# android:textSize=10px android:textStyle=bold / TextView android:text=Max android:gravity=left android:layout_width=50px android:layout_height=wrap_content android:textColor=# android:textSize=10px android:textStyle=bold / TextView android:text=Qty android:gravity=left android:layout_width=50px android:layout_height=wrap_content android:textColor=# android:textSize=10px android:textStyle=bold / TextView android:text=Price android:gravity=left android:layout_width=78px android:layout_height=wrap_content android:textColor=# android:textSize=10px android:textStyle=bold / /LinearLayout Can anyone shed some light on what could be happening here? Thanks a lot! E --~--~-~--~~~---~--~~ 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: Weird height of ScrollView
Evan Ruff wrote: then a ScrollView with a ListView inside of that You should not put a ListView, or any widget that does its own scrolling, in a ScrollView. Just drop the ScrollView and use the ListView. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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: how to check button on focus?
guruk wrote: Hi, i have a set of buttons. Usualy i can also move between em also with my trackball. But now I have set styles on my buttons and I dont see anymore if a button is focused. What can I do, is there a specific Styles Tag that I can use till now i use: style name=DoorButton item name=android:background#66/item The focus ring is part of the background. Since you overrode the background, you lose the focus ring. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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: listview (text+icon) inside a class Atcivity and not ListActivity
I think I have 2 methode: - Take my list(icon+text) with my class extends ListActivity without buttons and i will find a methode to add my button later - Or conitnuous my code that i made with buttons and my class extends Acitvity and find a methode to add icon for each String. What do you think about please mark Dany On Aug 10, 3:27 pm, Dany BREARD dany.bre...@gmail.com wrote: thanks Mark I think I have to use listView with my class extends Activty because in my layout I add 2 buttons at the bottom. Do you Think I can't use my class extends ListActivity. here my xml. And I use ListView and not TextView, is it wrong? * ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/FrameLayout01 android:layout_width=fill_parent android:layout_height=fill_parent FrameLayout android:id=@+id/FrameLayout02 android:layout_width=fill_parent android:layout_height=fill_parent android:layout_marginBottom=25pt android:background=@drawable/text_bleu ListView android:id=@+id/ListVoicemail android:layout_height=wrap_content android:layout_width=fill_parent /ListView /FrameLayout LinearLayout android:id=@+id/LinearLayout01 android:layout_height=wrap_content android:layout_width=fill_parent android:layout_gravity=bottom android:gravity=center_horizontal android:background=@drawable/black1 Button android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/repondre android:text=Répondre android:textStyle=bold android:gravity=center /Button Button android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/effacer android:text= Effacer android:textStyle=bold /Button /LinearLayout /FrameLayout ** Sorry but I don't want to waste my time and I want to have the better methode to make what I want, list(text+icon) + button1 button2 In your pdf, your make just one layout add text+icon But about me, there are buttons in the same layout, I think its wrong because when i add imageView there is icon lonely on the left of my list. here : ** ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/FrameLayout01 android:layout_width=fill_parent android:layout_height=fill_parent FrameLayout android:id=@+id/FrameLayout02 android:layout_width=fill_parent android:layout_height=fill_parent android:layout_marginBottom=25pt android:background=@drawable/text_bleu LinearLayout android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal ImageView android:id=@+id/icon android:layout_width=22px android:paddingLeft=2px android:paddingRight=2px android:paddingTop=2px android:layout_height=wrap_content android:src=@drawable/check32 / ListView android:id=@+id/ListVoicemail android:layout_height=wrap_content android:layout_width=fill_parent /ListView /LinearLayout /FrameLayout LinearLayout android:id=@+id/LinearLayout01 android:layout_height=wrap_content android:layout_width=fill_parent android:layout_gravity=bottom
[android-developers] Re: listview (text+icon) inside a class Atcivity and not ListActivity
Dany BREARD wrote: I think I have 2 methode: - Take my list(icon+text) with my class extends ListActivity without buttons and i will find a methode to add my button later - Or conitnuous my code that i made with buttons and my class extends Acitvity and find a methode to add icon for each String. You can have buttons at the bottom of the activity in a ListActivity. Just put them in your layout and use setContentView() like you would any other activity. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 1.5 Programming 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: Weird height of ScrollView
Doh! That was it! I knew it had to be something simple! Thanks Mark! E On Aug 10, 9:42 am, Mark Murphy mmur...@commonsware.com wrote: Evan Ruff wrote: then a ScrollView with a ListView inside of that You should not put a ListView, or any widget that does its own scrolling, in a ScrollView. Just drop the ScrollView and use the ListView. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android 1.5 Programming 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] id specify
Hello, Can some one tell me how can i specify I.D in android ? acutlly i want to create List . I add the following code in main.xml file. But i do not know where i should specify @android:id /list. Can some one tell me where i should specify it ? ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=wrap_content android:scrollbars=none/ --~--~-~--~~~---~--~~ 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
Or use the ExecutorService (Future/Tasks/etc) in the java.util.concurrent package. On Aug 7, 2:02 pm, Dianne Hackborn hack...@android.com wrote: If you don't like it, use your own Thread or the slightly higher-level HandlerThread and implement the semantics you want. On Fri, Aug 7, 2009 at 10:50 AM, Jason Proctor jason.android.li...@gmail.com wrote: i'm fine with the single running instance model. not so much the totally unreusable model, which is the one followed by AsyncTask. java.util.Timer is the same way, but that's no excuse for imitation ;-) 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); -- 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.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Close Application
System.exit() is definitely not the same as Activity.finish() On Mon, Aug 10, 2009 at 3:45 AM, Blackmarketpascal.se...@gmail.com wrote: Doesn't work. It just closes the active Activity and changes to the last Activity. Actually it has the same effect like finish() Regards, Pascal On 10 Aug., 11:54, Carl Whalley carl.whal...@googlemail.com wrote: System.exit(0) -- Android Academyhttp://www.androidacademy.com On Aug 10, 10:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ 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: MediaPlayer bug, pls help!
On Mon, Aug 10, 2009 at 5:48 AM, Illidaneillid...@gmail.com wrote: Hello! I have such code: public static MediaPlayer mp_click; mp_click = MediaPlayer.create(Context, R.raw.click); ... mp_click.start(); When my sound played for the first time, it's all fine. But when for second, third, etc.. it sounds like cutted, just little part of my click.wav. If I put there sound in another format like mp3 or ogg - all just fine. Are you just calling start() again, or are you calling seek(0) before that? Or if I write like this: mp_click = MediaPlayer.create(CubeTest_Main.Context, R.raw.click); mp_click.start(); All if fine too, but this is a bit slow, becouse this sound is playing very often. If You now how to fix it, pls help me. Thanks. You might want to look in to using SoundPool. --~--~-~--~~~---~--~~ 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: SurfaceView behavior - what gives?
You should redraw the whole canvas. It's possible to lock only part of the canvas though. SurfaceView is intended for game applications that refresh their screen very often. On Aug 10, 7:59 am, SChaser crotalistig...@gmail.com wrote: I wrote a little test program that has a custom SurfaceView class and some buttons to let me cause various operations on them (draw bitmap over all of it - white or black, draw a circle on it, draw blue bitmap and circle). In each case, the drawing is done on a canvas obtained with getHolder.lockCanvas(). If I draw the white background in one op, then draw the red circle, the background vanishes. If I draw the red circle again, the white background re-appears behind it. Other operations have similar results - it's as if there is a toggle on the background pixels (those untouched by the circle drawing) - draw the circle once - get one background, draw it again, get another. Obviously I don't understand the semantics of SurfaceView. Any pointers? --~--~-~--~~~---~--~~ 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: Switching carriers
Thanks. I think, there's still hope, the RIL radio module can be accessed on the framework's level which is encouraging. By sending AT commands you could possibly reach the same effect as with traditional TAPI, which you kindly mentioned. As soon as we lay our hands upon the whole source code, we might try writing this code again Thanks anyway Andrzej Dobrucki Samsung Electronics On Aug 7, 7:33 pm, Roman roman.baumgaert...@t-mobile.com wrote: Hi Andrzej, I am not aware that the Android telephony package supports this functionality on SDK level. I also doubt that this functionality is implemented on framework level (please correct me if I am wrong). In general when you look at current existing TAPI API implementations there are APIs like - getPreferredNetworkList() - manualNetworkRegistration() which enables you to manually register to a network in the Preferred Network list - The TAPI API support is more complex than what is right now implemented in Android. You would need a similar support in Android for being able to manually switch the network. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·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 7, 4:37 am, Andrzej Dobrucki andrzej.dobru...@gmail.com wrote: Does anyone know if there's a way to manually switch from onecarrier to another in code? I could get actual operator data with serviceState.getOperatorAlphaLong (); etc, but wasn't able to find a solution to actually switch from one to another. Does one need to use AT commands or similar? Thanks for help On Aug 7, 1:37 pm, Andrzej Dobrucki andrzej.dobru...@gmail.com wrote: Does anyone know if there's a way to manually switch from onecarrier to another in code? I could get actual operator data with serviceState.getOperatorAlphaLong (); etc, but wasn't able to find a solution to actually switch from one to another. Does one need to use AT commands or similar? Thanks for 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 -~--~~~~--~~--~--~---
[android-developers] Re: listview (text+icon) inside a class Atcivity and not ListActivity
Ok thanks So I try to us ListActivity I try to play your simple code here: *** public class MyActivity extends ListActivity { public TextView selection; public String[] mStrings = new String[] {item0, item1, item2, item3, item4 }; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.label); ArrayAdapterString mAdapter = new ArrayAdapterString (this,R.layout.main, R.id.label, mStrings); setListAdapter(mAdapter); } public void onListItemClick(ListView parent, View v, int position, long id) { selection.setText(mStrings[position]); } } And xml: ** ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal ImageView android:id=@+id/icon android:layout_width=22px android:paddingLeft=2px android:paddingRight=2px android:paddingTop=2px android:layout_height=wrap_content android:src=@drawable/check32 / TextView android:id=@+id/label android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=44sp / /LinearLayout *** But there is an exception error like this: 08-10 14:25:43.851: ERROR/AndroidRuntime(1643): java.lang.RuntimeException: Unable to start activity ComponentInfo {com.dany.android.listtestandroid/ com.dany.android.listtestandroid.MyActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' I thought That i just need to us textView and not listview. dany On Aug 10, 3:50 pm, Mark Murphy mmur...@commonsware.com wrote: Dany BREARD wrote: I think I have 2 methode: - Take my list(icon+text) with my class extends ListActivity without buttons and i will find a methode to add my button later - Or conitnuous my code that i made with buttons and my class extends Acitvity and find a methode to add icon for each String. You can have buttons at the bottom of the activity in a ListActivity. Just put them in your layout and use setContentView() like you would any other activity. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android 1.5 Programming 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: MediaPlayer bug, pls help!
Thanks for answer! When I calling seek(0) before start() nothing changes.. Thanks for the SoundPool, I'll try it. On 10 авг, 17:31, Marco Nelissen marc...@android.com wrote: On Mon, Aug 10, 2009 at 5:48 AM, Illidaneillid...@gmail.com wrote: Hello! I have such code: public static MediaPlayer mp_click; mp_click = MediaPlayer.create(Context, R.raw.click); ... mp_click.start(); When my sound played for the first time, it's all fine. But when for second, third, etc.. it sounds like cutted, just little part of my click.wav. If I put there sound in another format like mp3 or ogg - all just fine. Are you just calling start() again, or are you calling seek(0) before that? Or if I write like this: mp_click = MediaPlayer.create(CubeTest_Main.Context, R.raw.click); mp_click.start(); All if fine too, but this is a bit slow, becouse this sound is playing very often. If You now how to fix it, pls help me. Thanks. You might want to look in to using SoundPool. --~--~-~--~~~---~--~~ 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] Reading Calendar?
Hi, I think I've seen somewhere that it's still not possible to read Google Calendar entries? I tried to search the forum, but didn't find any relevant threads. They mostly contain questions on java.util.Calendar. Can I read entries? I understand that it might be fragile if it still isn't in the public API, but I don't mind updating my code when the API becomes public. (I don't need to modify or create new entries) Thanks Kaj --~--~-~--~~~---~--~~ 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: listview (text+icon) inside a class Atcivity and not ListActivity
Dany BREARD wrote: Ok thanks So I try to us ListActivity I try to play your simple code here: *** public class MyActivity extends ListActivity { public TextView selection; public String[] mStrings = new String[] {item0, item1, item2, item3, item4 }; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.main); selection=(TextView)findViewById(R.id.label); ArrayAdapterString mAdapter = new ArrayAdapterString (this,R.layout.main, R.id.label, mStrings); setListAdapter(mAdapter); } public void onListItemClick(ListView parent, View v, int position, long id) { selection.setText(mStrings[position]); } } And xml: ** ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal ImageView android:id=@+id/icon android:layout_width=22px android:paddingLeft=2px android:paddingRight=2px android:paddingTop=2px android:layout_height=wrap_content android:src=@drawable/check32 / TextView android:id=@+id/label android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=44sp / /LinearLayout *** But there is an exception error like this: 08-10 14:25:43.851: ERROR/AndroidRuntime(1643): java.lang.RuntimeException: Unable to start activity ComponentInfo {com.dany.android.listtestandroid/ com.dany.android.listtestandroid.MyActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' I thought That i just need to us textView and not listview. Please re-read the PDF I linked to several messages ago. You can get source code that matches that excerpt from: http://commonsware.com/Android (click on the Source Code link, and look in the FancyLists directory in the ZIP file) -- 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: listview (text+icon) inside a class Atcivity and not ListActivity
Mark Murphy wrote: Please re-read the PDF I linked to several messages ago. You can get source code that matches that excerpt from: http://commonsware.com/Android (click on the Source Code link, and look in the FancyLists directory in the ZIP file) Also, you might wish to read: http://developer.android.com/reference/android/app/ListActivity.html To do this, your own view MUST contain a ListView object with the id @android:id/list. You appear to be confusing row layouts and the overall activity layout. -- 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: ProgressBar doesn't allow control of visibility in AppWidgetProvider App Widget?
Thanks Jeff, the work-around works well. On Aug 7, 7:45 pm, Jeff Sharkey jshar...@android.com wrote: Doh, good catch. The View.setVisibility() method is marked with the @android.view.RemotableViewMethod annotation, which is what allows it to be called through RemoteViews. In this case,ProgressBaractually overrides the default View implementation, but without adding that annotation. (This is why it throws the exception.) One quick workaround is to wrap theProgressBarinto a simple view like FrameLayout, and then setVisibility() on that wrapper. j On Fri, Aug 7, 2009 at 3:49 PM, Craigcraig.det...@gmail.com wrote: I was trying to set a progress bar to View.INVISIBLE or View.GONE, or View.VISIBLE inside an AppWidgetProvider. However, it doesn't seem to want to do it. Settingvisibilityworks fine with TextView fields or ImageView fields or ImageButtons. However,ProgressBardoesn't seem to work. It doesn't make sense that just the progress bar type isn't supported for controllingvisibility. Has anyone else seen this problem? The code: �...@override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.a_widget_home_screen); updateViews.setViewVisibility(R.id.progress_bar, View.VISIBLE); } ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ProgressBarandroid:id=@+id/progress_bar android:layout_height=32px android:layout_width=32px android:indeterminate=true android:layout_marginLeft=110px android:layout_marginTop=120px android:visibility=gone / /RelativeLayout This is the error: 08-07 17:42:42.633: WARN/AppWidgetHostView(102): updateAppWidget couldn't find any view, using error view 08-07 17:42:42.633: WARN/AppWidgetHostView(102): android.widget.RemoteViews$ActionException: view: android.widget.ProgressBarcan't use method with RemoteViews: setVisibility(int) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.widget.RemoteViews$ReflectionAction.apply(RemoteViews.java: 443) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.widget.RemoteViews.performApply(RemoteViews.java:855) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.widget.RemoteViews.apply(RemoteViews.java:832) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.appwidget.AppWidgetHostView.updateAppWidget (AppWidgetHostView.java:167) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.appwidget.AppWidgetHost.updateAppWidgetView(AppWidgetHost.java: 243) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.appwidget.AppWidgetHost$UpdateHandler.handleMessage (AppWidgetHost.java:73) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.os.Handler.dispatchMessage(Handler.java:99) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.os.Looper.loop(Looper.java:123) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at android.app.ActivityThread.main(ActivityThread.java:3948) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at java.lang.reflect.Method.invokeNative(Native Method) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at java.lang.reflect.Method.invoke(Method.java:521) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 08-07 17:42:42.633: WARN/AppWidgetHostView(102): at dalvik.system.NativeStart.main(Native Method) -- 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] Back Navigation to defined Activity
HI @all, I would like to have a Menu – Button, called Home, that goes back to my root activity and removes all activities from the stack. Therefore, if I press the back button afterwords, the application would close. I tried calling the Activity with the intent flag 'FLAG_ACTIVITY_CLEAR_TOP' but it does not seem to work. // --- // Options Menu /** * * The method codeonCreateOptionsMenu/code * * @param menu * @return * @overrides @see android.app.Activity#onCreateOptionsMenu (android.view.Menu) */ @Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0,1,1,A); menu.add(0,2,2,B); menu.add(0,3,3,C); menu.add(0,4,4,HOME); return super.onCreateOptionsMenu(menu); } /** * * The method codeonOptionsItemSelected/code * * @param item * @return * @overrides @see *android.app.Activity#onOptionsItemSelected (android.view.MenuItem *) */ @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case 1: startActivity(new Intent(this, TestActivityA.class)); break; case 2: startActivity(new Intent(this, TestActivityB.class)); break; case 3: startActivity(new Intent(this, TestActivityC.class)); break; case 4: Intent i = new Intent(this, TestActivityA.class); i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); break; } return super.onOptionsItemSelected(item); } // Options Menu // --- --~--~-~--~~~---~--~~ 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] Setting tab heights
The only way I know of to change the heights of the tabs in a TabWidget is via code akin to: tabHost .getTabWidget() .getChildAt(0) .setLayoutParams(new LinearLayout.LayoutParams(width,height)); (and iterate from 0 to whatever to do all of the tabs) This feels fragile. Is there a better solution, preferably one heartily endorsed by the core Android team? I'm getting inquiries about this and would like to address it in a book update someday. Thanks! -- 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: Back Navigation to defined Activity
On Mon, Aug 10, 2009 at 7:50 AM, Aracoskai.hen...@googlemail.com wrote: HI @all, I would like to have a Menu – Button, called Home, that goes back to my root activity and removes all activities from the stack. Therefore, if I press the back button afterwords, the application would close. I tried calling the Activity with the intent flag 'FLAG_ACTIVITY_CLEAR_TOP' but it does not seem to work. It most certainly does work. What exactly does not work for you? Is the activity not started, or are the other activities not closed? It's hard to say what's wrong with the code you posted, since you don't mentioned which activity you posted code for, and what the other activities look like. --~--~-~--~~~---~--~~ 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: list with multiple selection
Take a look at List11.java in ApiDemos. -- 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 10, 4:36 am, Honest honestsucc...@gmail.com wrote: Hello, I want to create list with multiple selection. Can some one tell me how can i create it ? code snippt will be much useful. --~--~-~--~~~---~--~~ 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: Proxy SDK 1.5r1
The 1.5r3 fixes these issue...So if you have the problem upgrade your SDK :) On Aug 10, 2:48 pm, arnouf arnaud.far...@gmail.com wrote: Hi all, With this SDK version I can use my emulator using a proxy server. There is three solutions: - add values in system table - configure -http-proxy in eclipse run menu - configure APN on emulator to set the proxy When I use Android browser, it's really slow but it's working...If I try to to a post from my application, I take an ANR and some minutes later a socket time out. Somebody knows the solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Inserting the 'status-bar' within ones own full-screen View
I read somewhere in the Android documentation that (paraphrasing here): 'if you do make your own View take up the whole screen, it is then possible/even-advisable, to insert and manage the 'status-bar' within your View'. How do you do that? - i.e. insert the status-bar within ones own 'full- screen' View? Thanks in advance for any useful feedback. 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: questions about tabHost
You can't remove a tab currently. To answer your second question, you can do something like this: mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator (one).setContent(R.id.content); LinearLayout id=...@+id/content″ android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” TextView android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”Hello World” / Button android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”Click Me” / On Aug 10, 1:30 am, tstanly tsai.sta...@gmail.com wrote: hi all, I have two questions for setting tab widget, if I set three tab initial, then how can I remove one of three tab? because form the reference,http://developer.android.com/reference/android/widget/TabHost.html#se...) there only have the clearalltabs() method. and the other question is when I want to add tab, the code is: eg: mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator (one).setContent(R.id.mTextView); if now I want to add two component in a tab content such as TextView and Button widget, then how can I do that? 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: How/where to submit the apps to ADC2?
Thanks for your reply. On Aug 10, 4:37 pm, Mark Murphy mmur...@commonsware.com wrote: manoj wrote: Hi friends, I developed an application for android. I would like to submit the same to ADC2 (Android Developer Challenge 2). I didnt find any source to submit the apps. Can any one please suggest me the sites to submit the apps? They have not announced the process for this yet. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android 1.5 Programming 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: Using AsyncTask as Serializable or Parcelable -- To void activity destruction(orientation or during incoming phone call)
Hello, I was able to come up with a small framework to handle all types of issues(phone calls/orientation changes etc), and it is behaving pretty well. Thanks Mark/Maher/Dianne. There is another question I wanted to ask which I thought I might utilize in my framework.(Sorry for a big message again) Basically now I have a mediator object which acts as a decoupling layer between Activity and AsyncTask. Currently, onPostExecute method(of async task) I get hold of the reference of mediator object and do a call back on it, which in-turn gets hold of activity and copy the results to the view components. Now Can I use a handler as a means of communication between async task (onPostExecute method) and the mediator i.e. rather than calling a method on mediator directly in onPostExecute, just get hold of the reference of the handler(originally instantiated and handleMessage defined in the mediator and stored in a static map) from the static map in the onPostExecute() method and call sendMessage on it. This should in-turn invoke the handle message on the mediator, and in-turn can give loose coupling between async task and mediator. (FYI: The static map approach I am using to cache the references to handle activity destruction process, rather than going through onSaveInstanceState route). Does the above startegy makes sense? The Android documentation for handler says There are two main uses for a Handler: (1) to schedule messages and runnables to be executed as some point in the future; and (2) to enqueue an action to be performed on a different thread than your own. Basically, if i understand it correctly, handler is used for communicating between two different threads Now, can there be (3) scenario(as I described above) where it can be used in the same thread but between two different objects(working as a callback mechanism). If yes, then if I make a call to sendMessage, will that immediately call handleMessage or will it still(even though we just have one thread) put it in a messagequeue and will invoke handlemessage when its turn come(as it does in case when we are communicating between two different threads). The reason why I asked this is(it is another question ofcourse) a.) When I just make a call to mediator.process method(and no handler) from postexecute, and suppose the user changes the orientation before the the mediator.process method exits, it still maintains the sanity i.e. the activity does not get recreated untill the method exits, because postExecute gets called on same thread so any other call to destroy activity even by android framework waits untill the postexecute (because I call mediator.process in it so it becomes part of postExecute) method exits, and hence atomicity is maintained and the logic does not mess up. b.) So If I use handler approach, will the steps be: 1.) Will the call inside the onPostExecute method to sendMessage on handler be blocking call or will the postExecute method exit immediately. 2.)if its a non-blocking call-- Then when onPostexecute method exits, and say orientation changes then can i be assured(as in a.) above) that handlemessage call be made before the activity destruction(in which atomicity is maintained) or can it be made before(in that case things can get messed up) On Aug 5, 4:27 pm, Maher Ali maher@gmail.com wrote: Vikas, Maybe you can create a mediator for every activity type. If an activity wants something from the server, it adds a job to this mediator passing its *this* as the key. The mediator will then contact a server proxy that does the server interaction async by default. The mediator can ask the activity to show a busy signal or not (it depends.) When the server finishes the job, it calls onSuccess on an object of an anonymous class passed by the mediator. The mediator then checks to see if the activity has not been destroyed (the activity will cancel the job by removing its *this* from the mediator's job list on its destruction.) If it has (no entry for that activity,) it discards the server's result. If not, it delivers the result to the activity (to refresh, etc.) and removes the job from its list. Hope this helps. Regards, Maher On Wed, Aug 5, 2009 at 1:49 PM, Vikas vik...@hotmail.com wrote: Hello David/Mark, Thanks a lot for replying. Since this use case is so common that any form based application needs it and I think a correct answer to this will avoid lots of pains and confusions for many people who are trying to write any enterprise level applications. Let me just describe a very simple use case step by step(rather than a big paragraph above It is still big{sorry about that}) : I am asking now in a more general way. I will take a two screen scenario. Here are Requirements(Steps): 1.) Screen 1 -- Search Screen which has a zip entry editText field and a Find button next to it. 2.) Screen 2. -- Store List screen that will contain list of all stores existing
[android-developers] Re: Inserting the 'status-bar' within ones own full-screen View
I'd be interested in knowing where this in in the documentation. The status bar is not something you can insert into your view and manage at all -- it is a completely separate window, on top of your window, that is owned by the system. The only thing you can do with it is have it hidden by the system while your window is visible, with one of the Theme.*.NoTitleBar.Fullscreen themes. On Mon, Aug 10, 2009 at 8:16 AM, gosh steve...@unimelb.edu.au wrote: I read somewhere in the Android documentation that (paraphrasing here): 'if you do make your own View take up the whole screen, it is then possible/even-advisable, to insert and manage the 'status-bar' within your View'. How do you do that? - i.e. insert the status-bar within ones own 'full- screen' View? Thanks in advance for any useful feedback. Steve -- 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: How to add a new application to the cupcake source code?
These kinds of questions should be posted to android-porting, since they are outside the bounds of the supported SDK and so require building your own system image. On Mon, Aug 10, 2009 at 4:07 AM, Handy_Zhou qdzhouhanq...@gmail.com wrote: Some APIs is not supplied in SDK,such as bluetooth and so on. I want to develop an app in cupcake source code.It can simulate keyinject like Monkey and it should communicate with PC by bluetooth. What should I pay more attention?How do I change the makefile? Is it relizalible? -- 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: SoftKeyboard doesn't appear on AlertDialog
If you are running on the emulator, and by vertical orientation you mean landscape, then this is the expected behavior since the emulator currently emulates a G1 where a hard keyboard is available in landscape. On Thu, Jul 30, 2009 at 3:53 AM, drjunior drjunior@gmail.com wrote: Hi, I have one EditText inside one AlertDialog. When the EditText has focus the SoftKeyboard doesn't appear with vertical screen orientation. I have other EditTex in a common Layout and this works fine. Someone with same problem? -- 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] Calling setContentView() more than once in method onCreate() ?
Hi, I was wondering whether anybody has tried calling setContentView() more than once in method onCreate() when creating an Activity. It seems only the last view is displayed. Or am I missing something here ? Say we have an Activity: public class SampleActivyt extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout1); // DO SOMETHING HERE and when it is done change the view setContentView(R.layout.layout2); } } You can think of it as you have a loading screen while a computation is being done and once it's finished the view needs to be changed. Cheers, Emre PS. I tried moving setContentView(R.layout.layout2) inside the onStart() method, only to find that this time the second view never gets displayed so I am stuck with the first one. _ Send and receive email from all of your webmail accounts. http://go.microsoft.com/?linkid=9671356 --~--~-~--~~~---~--~~ 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: Calling setContentView() more than once in method onCreate() ?
Emre A. Yavuz wrote: Hi, I was wondering whether anybody has tried calling setContentView() more than once in method onCreate() when creating an Activity. It seems only the last view is displayed. Or am I missing something here ? Say we have an Activity: * public* *class* SampleActivyt *extends* Activity { @Override * public* *void* onCreate(Bundle savedInstanceState) { * super*.onCreate(savedInstanceState); setContentView(R.layout./layout1/); // DO SOMETHING HERE and when it is done change the view setContentView(R.layout./layout2/); } } setContentView() does not have visual impact until *after* onCreate() returns. If you call it twice, the net is that the user will only see the second. Moreover, if DO SOMETHING HERE is long enough to warrant a loading screen, you *do not* want to be doing that work in onCreate(), anyway. Use AsyncTask or something else to put it in a background thread. You can think of it as you have a loading screen while a computation is being done and once it's finished the view needs to be changed. Use a FrameLayout to put your loading screen and the main view in one layout. Set the main view to be android:visibility=gone in the layout file. Once your background thread is done doing its work, in the UI thread (e.g., onPostExecute() in AsyncTask), make the loading screen be View.GONE and your main view to be View.VISIBLE. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] Simply touching screen reduces fps
Yes, it is. Try SpriteMethodTest, set 100 sprites, select OpenGL / Use VBO, let it run for a while. You will get something around 20ms / 50 fps. Now run it second time, and simply touch screen while test is running. You will get something around 35ms / 29 fps. So it is 15 ms difference. As I understand, the answer is simple - it is that dispatcher thread running with THREAD_PRIORITY_URGENT_DISPLAY priority. Setting THREAD_PRIORITY_URGENT_DISPLAY priority (will it work on non- ADP firmware?) on renderer thread yields 30 ms / 33 fps. Are there any other workarounds? --~--~-~--~~~---~--~~ 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] Memory leak - heap size (again)
Hi, First at all, sorry for my english. I know that's a subject which was discuss a lot of time and I try to find a solution since more than 6 day for the memory leak which appears in my application. I've read this page: http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/ So, I don't use static member fields, I always use recycle() and I don't use inner class. My application use a gallery and some bitmap. I use finalize to monitor garbage collection in each class of my application: protected void finalize() throws Throwable { try { Log.d(FINALIZE, this.toString()); } finally { super.finalize(); } } Thus, I can say that my Objects are well collected when I run an other instance of my activity, there no groups of object which are not garbage collected and there just one instance of my objects. The heap size of my application in DDMS is not growing a lot when I use the application but native memory leak appears sometimes (frequently when I use gallery which load a lot of thumbnail) despite the fact that my objects are GC. Just for information, I can say that there juste 4 or 5 ImageView alives in the same time when I scroll the Gallery (old ImageView are immediately garbage collected when I scroll) My conclusion is that the thumbnail bitmap are maybe not natively recycled, even if the ImageView is garbage collected. It's not realy serious if the application use juste a gallery but I use large Bitmap in the same application and Bitmap size exceeds VM budget So, I decide to extends ImageView and make the bitmap recycle each time ImageView is garbage collected: public class ImageViewGallery extends ImageView{ static int nbobjects = 0; static Object ob = new Object(); Context context; Bitmap bitmap = null; public ImageViewGallery(Context context) { super(context); this.context = context; Log.e(create ImageViewGallery, create ImageViewGallery); Log.e(ImageViewGallery size, nbobjects+); synchronized(ob){ nbobjects++; } } public void setImageURI(Uri uri){ try { bitmap = Media.getBitmap(context.getContentResolver(), uri); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } super.setImageBitmap(bitmap); } protected void finalize() throws Throwable { try { Log.e(FINALIZE, this.toString()); synchronized(ob){ nbobjects--; } if(bitmap!=null !bitmap.isRecycled()){ Log.e(bitmap.recycle(), nbobjects+); bitmap.recycle(); // == crash here bitmap = null; } Log.e(ImageViewGallery size, nbobjects+); } finally { super.finalize(); } } } But when I do this, I've an other error, print below: 08-10 18:03:52.703: INFO/DEBUG(3979): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 08-10 18:03:52.703: INFO/DEBUG(3979): Build fingerprint: 'vodafone/ vfpioneer/sapphire/sapphire:1.5/CRC1/150275:user/ota-rel-keys,release- keys' 08-10 18:03:52.703: INFO/DEBUG(3979): pid: 4238, tid: 4238 com.myapplication 08-10 18:03:52.703: INFO/DEBUG(3979): signal 7 (SIGBUS), fault addr 08-10 18:03:52.703: INFO/DEBUG(3979): r0 0006 r1 000c r2 afe3ca04 r3 002714ef 08-10 18:03:52.714: INFO/DEBUG(3979): r4 afe3c9a4 r5 0001 r6 0060 r7 afe3c980 08-10 18:03:52.714: INFO/DEBUG(3979): r8 r9 10 ac126298 fp 0009 08-10 18:03:52.714: INFO/DEBUG(3979): ip afd010c8 sp bee3f4d0 lr afe0e940 pc afe0b484 cpsr 8030 08-10 18:03:53.063: INFO/DEBUG(3979): #00 pc b484 / system/lib/libc.so 08-10 18:03:53.063: INFO/DEBUG(3979): #01 pc 0974 / system/lib/libstdc++.so 08-10 18:03:53.083: INFO/DEBUG(3979): #02 pc 000538a4 / system/lib/libsgl.so 08-10 18:03:53.103: INFO/DEBUG(3979): #03 pc 0003e782 / system/lib/libandroid_runtime.so 08-10 18:03:53.113: INFO/DEBUG(3979): #04 pc e3b4 / system/lib/libdvm.so 08-10 18:03:53.113: INFO/DEBUG(3979): stack: 08-10 18:03:53.113: INFO/DEBUG(3979): bee3f490 001b3c00 [heap] 08-10 18:03:53.123: INFO/DEBUG(3979): bee3f494 ac03c4ec /system/ lib/libsgl.so 08-10 18:03:53.123: INFO/DEBUG(3979): bee3f498 bee3f4bc [stack] 08-10 18:03:53.123: INFO/DEBUG(3979): bee3f49c 000c 08-10 18:03:53.123: INFO/DEBUG(3979): bee3f4a0 0006 08-10 18:03:53.133: INFO/DEBUG(3979):
[android-developers] I don't receive broadcasts
Hello! I have started developing a tool, which should react on an outgoing call or sms and also to be started at boot time. The start at boot time does work properply, but I'm not able to receive the broadcasts for the outgoing calls. Who can tell me, what is wrong with my code?? For this, I added two receivers in my manifest and implemented the broadcast- receivers: manifest.xml: -- receiver android:enabled=true android:name=.BootUpReceiver android:permission=android.permission.RECEIVE_BOOT_COMPLETED intent-filter action android:name=android.intent.action.BOOT_COMPLETED / category android:name=android.intent.category.DEFAULT / /intent-filter /receiver receiver android:name=.TelephoneViewer android:enabled=true android:exported=true android:permission= intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / action android:name=android.provider.Telephony.SMS_RECEIVED / action android:name=android.intent.action.PHONE_STATE / action android:name=android.intent.action.NEW_OUTGOING_CALL / /intent-filter /receiver -- TelephoneViewer.java: -- public class TelephoneViewer extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Log.d(this.getClass().getSimpleName(), Telephoneviewer.onReceive()); Toast.makeText(context,TelephoneViewer.onReceive(), Toast.LENGTH_SHORT).show(); } -- Thank you very much for your support! Best regards, Frank --~--~-~--~~~---~--~~ 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] Integrating Calendar/Contacts apps into your own application
Hi, I'm working on an application that allows a user to manage different email accounts all from one app. The application has it's own list of contacts / PIM (Personal Information Management) data obtained from each email service. To display the list of contacts/PIM data I was wondering if it would be possible to use the built-in contacts/calendar applications without having to add the data to the actual address book of the phone. So say for contacts when the user launches the contacts application from within my application it would populate the lists from a content provider I had written and not the usual users contacts, and when the user opens the application from the home screen as normal their usual contact list is not affected and they would not see the contacts from my application. I need to do this for PIM data using the calendar application as well. Any help on this would be much appreciated. Cheers Chirag --~--~-~--~~~---~--~~ 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] Android Market timeline
Does anyone know if some time-line exists for when paid apps will be available in which countries? Specifically, I need to know when I can sell apps in the market in Norway. I have an app completed and waiting but at the moment we can only upload free apps :( Thanks ST --~--~-~--~~~---~--~~ 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] Will Animated GIF format be supported in Android Browser?
We understand that currently there is no Media Format support for Animated GIF from the standard Android platform. Is there any roadmap for that to be supported in Android Browser in the future? 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] Publishing Applications on the Android Market: Tax implications
I'm a developer in the UK who wants to publish (and charge for) some applications to the Android Market. I don't have my own company, and don't know anything about tax. What do I need to do regarding tax? 1. Should I put all (or half or any fraction of) the earnings aside until the taxman asks me for some money? 2. What about sales in the US, does the same apply? 3. Is it considered income tax? Really don't want to get in trouble... --~--~-~--~~~---~--~~ 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] WebView in emulator
Hi, I have created an application using webview however whenever I load it up in the emulator even with asking it to load google.com in my code it comes up: Web page not available And then says the web page at http://www.google.com may be down etc. Any ideas why its doing this? Thanks. Matt. --~--~-~--~~~---~--~~ 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] Waiting Dialog?
Hi Guys, I got the following prob: -I have to implement an interface -in most methods its like show dialog and get the selected result -afaik in android there is no way to wait for such a result so... that's the base; [syntax=java]public int showDlg() { int iSelectedChoice = -1; //show Dlg //wait for Dlg to be finished (ok or cancel is clicked) return iSelectedChoice; //return selected choice }[/syntax] and my current implementation: [syntax=java]public int AskQuestion(String[] choices, String strQuestion, int preSelect) { Dialog oDlg = null; Builder oBuilder = new AlertDialog.Builder(this); oBuilder.setIcon(R.drawable.cortado_icon); oBuilder.setTitle(Question); oBuilder.setSingleChoiceItems(choices, 0, this); oBuilder.setPositiveButton(ok, this); oBuilder.setNegativeButton(cancel, this); oDlg = oBuilder.create(); oDlg.show(); while(m_fBool == false) //m_fBool is set true when a button is clicked (in the onClicklistener) { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } return m_iResult; }[/syntax] In my implementation I can't see the Dialog anyway =( Please help me, its urgent!!! --~--~-~--~~~---~--~~ 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] Driver issues on windows 7
I cannot get windows to install the SDK drivers instead of its preloaded disk drivers. I have tried to do a manual update from the device manager, but windows believes it knows better and says the best drivers are already installed. I also tried to shut of the automatic driver installation through the system settings but it still installs its own drivers. This is getting extremely frustrating, when i run adb it says that there is no device connected. Please 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 -~--~~~~--~~--~--~---
[android-developers] farsi font
Hi i have a HTC DREAM and i need farsi font for my mobile phone could u help me please --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] The Map keys of the Google APIs Add-on
In the Web When we apply the Map Keys, we need sumbit the URL of our sites. In the Google APIs Add-on , we need the MD5 of our soft to get the Map keys. but here is a big question. 1. MD5 is easy to be changed. 2. First I got the MD5 of my app ,and then submit, but when I add the new keys , if the MD5 is changed, there will have the problems of the martch. 3. what should I do? --~--~-~--~~~---~--~~ 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] Can an end user disable 2G data, or GSM function?
Is there a way for end users to disable 2G data services (e.g. make the phone just a phone)? Or disable the GSM function as well (say, for a device used on a hiking trip as a GPS tracker, where there is no coverage)? Is there enough control in the SDK to pursue writing an app with a control screen like: [x] Enable Voice (GSM) [ ] Enable 2G Data [ ] Enable 3G Data (uses more battery than 2G) [ ] Enable Data When Roaming (may result in extra charges) [x] Enable WiFi [x] Enable WiFi even if device is sleeping [x] Enable Bluetooth [x] Enable GPS [ ] Airplane mode (disable all radios) --~--~-~--~~~---~--~~ 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] Add user-agent / x-mailer to android mail
Hey there, I couldn't find a user-agent or x-mailer information in the source codes of mails sent with android mail. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---