[android-developers] adb serving a limited number of devices attached to PC via USB
Hi all, I think I read somewhere that adb can serve a maximum of 11 devices that are connected to the PC via USB. Is this true? If yes, where does this limitation come from? Thank you, Best regards, Adrian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Convert a J2ME project to Android project
You can try http://microemu.blogspot.com/2009/08/converting-javame-applications-to.html It's free and works pretty good. BR, Adrian Vintu http://adrianvintu.com On Tue, Mar 15, 2011 at 3:37 PM, michal.g...@gmail.com michal.g...@gmail.com wrote: Converting J2ME to Android is not a trivial task. UpOnTek spent months to develop a service that converts J2ME to Android - in addtion to the automatic conversion our engineers provide optimization tops. Take a look at our website for more information. Thanks, Michal On Mar 15, 6:43 am, Huynh Ngoc Bang hnbang1...@gmail.com wrote: Hii all Developers I would like to ask you. How to convert a J2ME project to Android project. Please help me show step by step I can convert them. Thanks so much! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: locale change does not affect menu
Hi Engin, I also noticed this behaviour - albeit, only in the emulator. I cannot test on a 2.2 phone. Unfortunately, I did have enough time to find out why this happens, so I made a hack. First, some info: this resetting of the locale probably happens somewhere after the onResume(). This means that not only the menu gets reset to the default locale, but also, for example, in onTextChanged if we show a validation message, this message will also be displayed in the default system locale. What I did is identify the key events that can happen in my application AFTER the onResume. I see that the user will either: a. onPrepareOptionsMenu or b. onTextChanged So two events - pretty easy for me. I added in those methods something like this: if (!hasSetLocaleSpecial) { setLocale(); hasSetLocaleSpecial = true; } Basically, I am calling the setLocale again, in the FIRST event that can happen after onResume. It is a horrible hack, but until I can get more info on why this happens, I will stick to it. I hope this will help you a little bit. Best Regards, Adrian Vintu http://adrianvintu.com PS another developer asked this question, but until now, no answer http://groups.google.com/group/android-developers/browse_thread/thread/3c9b74cb8eb555e9/7ead8fd7ada84233?hl=en On Wed, Jul 28, 2010 at 3:24 PM, Engin Arslan enginarsla...@gmail.comwrote: Richard, no it is not what i am trying to do. Suppose that I have an telephone which does not support Germany but i want to develop application supporting many languages as well as Germany . if the only way of changing language of application is changing Locale from telephone settings , it is impossible to . To summarize , i only want user to be able to choose my application language using application's settings. I partially achieved this using site that ı posted link. however, menu does not change when ı apply that way On Jul 28, 2:57 pm, RichardC richard.crit...@googlemail.com wrote: For multi-language apps you don't need to do any of this. Have a read of localization in the docs: http://developer.android.com/guide/topics/resources/localization.html you will get the collect localized resources loaded automatically by the platform. If however you are trying to switch language/localein a running app, then as DH pointed out the platform does not support this. I have not looked into the platform code for lanuage/locale(s) but I suppect that Android has no concept of an applicaton onlylocaleonly systemlocale. If I am correct then are you trying to change thelocalefor the whole system? On Jul 28, 12:41 pm, Engin Arslan enginarsla...@gmail.com wrote: Hi, i am not trying to fight with system. i am just trying to publish application having multilanguage capability. so this should not be fighting. Whatever, http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx in this link i have found alternative way of doing this. by this way all texts changed proposed language, however there is still problem in Menu even if i recreatemenuafter changinglocale. On Jul 27, 5:00 pm, RichardC richard.crit...@googlemail.com wrote: You have already asked this and got a - don't do this - reply from Dianne Hackborn. DH You are blowing away the current configuration in the resources with your own you have created that is not initialized. Things aren't going to work when you do that. You could improve that by giving it a properly created Configuration, but I don't want to help with doing that because what you are trying to do is never going to work quite right because you will be fighting with the platform over what configuration is being used in the resources. See your previous thread: http://groups.google.com/group/android-developers/browse_thread/threa... On Jul 27, 1:42 pm, Engin Arslan enginarsla...@gmail.com wrote: any ideas? On Jul 23, 3:17 pm, Engin Arslan enginarsla...@gmail.com wrote: Specifically,menulanguage changes to English (which is default language) when I try to changelocale. And then it does not change any other language On Jul 23, 2:18 pm, Engin Arslan enginarsla...@gmail.com wrote: Hi all, I am developing application in which user can choose application language. To achieve this, I am changing Locale as follows: Localelocale= newLocale(language code here); Locale.setDefault(locale); Configuration config = new Configuration(); config.locale=locale; getBaseContext().getResources().updateConfiguration(config, getResources().getDisplayMetrics()); and restart activity in following way: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
Re: [android-developers] Re: User-set Locale always get reset after onCreate?
Hi Yuku, Please read my post here: http://groups.google.com/group/android-developers/browse_thread/thread/5440163027722168/a0b2f1003843bd5b?hl=en BR, Adrian Vintu http://adrianvintu.com On Tue, Sep 14, 2010 at 8:11 PM, yuku yuk...@gmail.com wrote: Just noticed that this topic disappeared from the Discussion section of the group page. I found this using google web search engine. I wonder why? On Sep 14, 1:29 pm, yuku yuk...@gmail.com wrote: I want to have a configurable language settings in my app. So, in onCreate of my activity, I call Resources.updateConfiguration with the new locale. However, after onCreate (at some time, I can't find it when), the locale is set back to the default locale. On the code example below, the strings shown in the main layout (as inflated by setContentView) shows the in language version, BUT when I press the menu button, on which onCreateMenu is called, the strings is taken from the en (default) locale. The log shows this: 18337 oncreate D { scale=1.0 imsi=525/1 loc=in touch=3 keys=1/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=143} 30430ActivityManager I Displayed activity yuku.coba.locale/.CobaLocaleActivity: 266 ms (total 266 ms) 18337KeyCharacterMap W No keyboard for id 65540 18337KeyCharacterMap W Using default keymap: /system/usr/ keychars/qwerty.kcm.bin 18337 onmenu D { scale=1.0 imsi=525/1 loc=en_GB touch=3 keys=1/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=143} Between oncreate and onmenu, the locale magically changes. Please help, I have been tinkering with this with no luck. Thanks, Yuku @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Configuration c = new Configuration(); c.locale = new Locale(in); getResources().updateConfiguration(c, null); setContentView(R.layout.main); Log.d(oncreate, getResources().getConfiguration().toString()); } @Override public boolean onCreateOptionsMenu(Menu menu) { Log.d(onmenu, getResources().getConfiguration().toString()); new MenuInflater(this).inflate(R.menu.utama, menu); return true; } -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: locale change does not affect menu
I also added a setLocale in onStart and onConfigurationChanged, but this is really getting out of control :( BR, Adrian Vintu http://adrianvintu.com On Wed, Sep 29, 2010 at 1:38 PM, Adrian Vintu adrianvi...@gmail.com wrote: Hi Engin, I also noticed this behaviour - albeit, only in the emulator. I cannot test on a 2.2 phone. Unfortunately, I did have enough time to find out why this happens, so I made a hack. First, some info: this resetting of the locale probably happens somewhere after the onResume(). This means that not only the menu gets reset to the default locale, but also, for example, in onTextChanged if we show a validation message, this message will also be displayed in the default system locale. What I did is identify the key events that can happen in my application AFTER the onResume. I see that the user will either: a. onPrepareOptionsMenu or b. onTextChanged So two events - pretty easy for me. I added in those methods something like this: if (!hasSetLocaleSpecial) { setLocale(); hasSetLocaleSpecial = true; } Basically, I am calling the setLocale again, in the FIRST event that can happen after onResume. It is a horrible hack, but until I can get more info on why this happens, I will stick to it. I hope this will help you a little bit. Best Regards, Adrian Vintu http://adrianvintu.com PS another developer asked this question, but until now, no answer http://groups.google.com/group/android-developers/browse_thread/thread/3c9b74cb8eb555e9/7ead8fd7ada84233?hl=en On Wed, Jul 28, 2010 at 3:24 PM, Engin Arslan enginarsla...@gmail.comwrote: Richard, no it is not what i am trying to do. Suppose that I have an telephone which does not support Germany but i want to develop application supporting many languages as well as Germany . if the only way of changing language of application is changing Locale from telephone settings , it is impossible to . To summarize , i only want user to be able to choose my application language using application's settings. I partially achieved this using site that ı posted link. however, menu does not change when ı apply that way On Jul 28, 2:57 pm, RichardC richard.crit...@googlemail.com wrote: For multi-language apps you don't need to do any of this. Have a read of localization in the docs: http://developer.android.com/guide/topics/resources/localization.html you will get the collect localized resources loaded automatically by the platform. If however you are trying to switch language/localein a running app, then as DH pointed out the platform does not support this. I have not looked into the platform code for lanuage/locale(s) but I suppect that Android has no concept of an applicaton onlylocaleonly systemlocale. If I am correct then are you trying to change thelocalefor the whole system? On Jul 28, 12:41 pm, Engin Arslan enginarsla...@gmail.com wrote: Hi, i am not trying to fight with system. i am just trying to publish application having multilanguage capability. so this should not be fighting. Whatever, http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx in this link i have found alternative way of doing this. by this way all texts changed proposed language, however there is still problem in Menu even if i recreatemenuafter changinglocale. On Jul 27, 5:00 pm, RichardC richard.crit...@googlemail.com wrote: You have already asked this and got a - don't do this - reply from Dianne Hackborn. DH You are blowing away the current configuration in the resources with your own you have created that is not initialized. Things aren't going to work when you do that. You could improve that by giving it a properly created Configuration, but I don't want to help with doing that because what you are trying to do is never going to work quite right because you will be fighting with the platform over what configuration is being used in the resources. See your previous thread: http://groups.google.com/group/android-developers/browse_thread/threa... On Jul 27, 1:42 pm, Engin Arslan enginarsla...@gmail.com wrote: any ideas? On Jul 23, 3:17 pm, Engin Arslan enginarsla...@gmail.com wrote: Specifically,menulanguage changes to English (which is default language) when I try to changelocale. And then it does not change any other language On Jul 23, 2:18 pm, Engin Arslan enginarsla...@gmail.com wrote: Hi all, I am developing application in which user can choose application language. To achieve this, I am changing Locale as follows: Localelocale= newLocale(language code here); Locale.setDefault(locale); Configuration config = new Configuration(); config.locale=locale
[android-developers] Re: mp3 player application with dB amplifier
Finally I found a way to increase the headset volume :) Here it is: http://www.drakaz.com/2010/05/13/audio-hack-for-samsung-galaxy-test-phase-before-included-in-galaxo/ BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 15, 2010 at 12:44 PM, Adrian Vintu adrianvi...@gmail.comwrote: Hello all, I need a simple mp3 player - with the functionality of the default Android player - with one small addition. I need to be able to up the sound volume more than the VolumeUp button can do. I see you can do that in Winamp from the Equalizer window, by choosing Preamp. Why do i need this: because many of my albums were ripped at a low sound volume, and i can barely hear them on the subway. Is there such a player available on the market? There are some catches though: 1. must be as simple as possible 2. must be able to upgrade the volume without destroying the sound quality too much 3. must be free. Thank you, BR, Adrian Vintu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Adding android:targetSdkVersion=4 gives me a sdcard (Permission denied)
where does the /mnt come from in /mnt/sdcard/myapp/customer.db ? could it be that your path is wrong? should it not be /sdcard/...? On Thu, Jul 8, 2010 at 1:39 PM, powder andr...@unidevsolutions.com wrote: I have this already in my Manifest: ... uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ uses-permission android:name=android.permission.READ_EXTERNAL_STORAGE/ /application uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/ /manifest On Jul 8, 1:34 pm, Mark Murphy mmur...@commonsware.com wrote: The WRITE_EXTERNAL_STORAGE permission was added in API Level 4. By saying you are targeting that API level, you will need to add that permission to your manifest. On Thu, Jul 8, 2010 at 7:28 AM, powder andr...@unidevsolutions.com wrote: I have a piece of code that copies a file to the sdcard, it always worked. But changing the following line in the Manifest from: uses-sdk android:minSdkVersion=3/ to uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4/ Gives me a error (have not changed anything else). Anyone have an explanation? 07-08 13:13:38.121: ERROR/myApp(266): /mnt/sdcard/myapp/customer.db (Permission denied) 07-08 13:13:38.121: ERROR/myApp(266): java.io.FileNotFoundException: / mnt/sdcard/myappt/customer.db (Permission denied) 07-08 13:13:38.121: ERROR/myApp(266): at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method) 07-08 13:13:38.121: ERROR/myApp(266): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java: 152) Regards Jonas. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com| http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguyhttp://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Adding android:targetSdkVersion=4 gives me a sdcard (Permission denied)
thank you Mark. good to know :) On Thu, Jul 8, 2010 at 2:27 PM, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 8, 2010 at 8:16 AM, Adrian Vintu adrianvi...@gmail.com wrote: where does the /mnt come from in /mnt/sdcard/myapp/customer.db ? could it be that your path is wrong? should it not be /sdcard/...? The path varies by device and Android release. /mnt/sdcard is typical for Android 2.2, at least in the emulator. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ListView, SimpleCursorAdapter and Cursors
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item, c, new String[]{MyDBHelper.KEY_NAME, MyDBHelper.KEY_ID}, new int[]{R.id.field_name}); i.e. leave the KEY_ID at the end of the String[] and do not link it to any View. Create the context menu and get the KEY_ID registerForContextMenu(list); list.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { menu.add(0, 1, 0, R.string.menu_item_delete_user); } }); list.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView? adapterView, View v, int arg2, long arg3) { Cursor cursor = (Cursor) adapterView.getItemAtPosition(arg2); int key_id = cursor.getInt(cursor.getColumnIndex(MyDBHelper.KEY_ID)); ... } }); } BR, Adrian Vintu http://www.adrianvintu.com On Thu, Jun 10, 2010 at 3:06 PM, ColletJb collet...@gmail.com wrote: Hi, I have a very simple issue i actually can't fix :( I have a basic database with fields, let's say MyDBHelper.KEY_ID, MyDBHelper.KEY_NAME, MyDBHelper.KEY_DATA and a listview where i only display the MyDBHelper.KEY_NAME field. I used this sample of code : Cursor c = data_db.getAll(); startManagingCursor(c); SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item, c, new String[]{MyDBHelper.KEY_NAME}, new int[]{R.id.field_name}); setListAdapter(adapter); My problem is, I don't know how i can modify simply this code in order to get the MyDBHelper.KEY_ID value when I click an item on the listView. I suppose it should be something like this : Cursor c = data_db.getAll(); startManagingCursor(c); SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item, c, new String[]{MyDBHelper.KEY_ID, MyDBHelper.KEY_NAME}, new int[]{R.id.field_id, R.id.field_name}); // How to hide the KEY_ID value ? setListAdapter(adapter); Thanks for your 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] OutOfMemoryError
What does logcat say? see http://developer.android.com/intl/de/guide/developing/tools/adb.html and http://www.adrianvintu.com/blogengine/post/Colored-Logcat-Script-for-Windows.aspx if you don't know what logcat is. BR, Adrian Vintu http://www.adrianvintu.com On Thu, Jun 10, 2010 at 4:28 PM, svebee sven.kapud...@gmail.com wrote: hello, as I'm beginner in Android I have problem with memory - after only 2-3 minutes I get Force Close and outOfMemory Error. I have only onCreate (I know, stupid, but I didn't knew for anything else as I started only few weeks ago) and inside I have... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); many lines of code...manipulating with SQLite databases... } inside main XML layout I have many images, small, big (background) and so on...How can I on every onCreate delete all content from memory that was before in it - so when I open activity again, it deletes all images and everything out and insert the new (old) one inside. Little awkward but that's only thing I have on mind. Also, inside many lines of code I don't declare any images! Or simply, how can I bypass outOfMemoryError? Do I have to do something like this? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); BitmapFactory.Options options=new BitmapFactory.Options(); options.inSampleSize = 8; Bitmap buildingBitmap = BitmapFactory.decodeResource(null,R.drawable.background,options); if (buildingBitmap != null) { buildingBitmap.recycle(); System.gc(); buildingBitmap = null; } setContentView(R.layout.main); many lines of code...manipulating with SQLite databases... } or...? Also on other activity is everything the same except I have multiple overlays, how can I erase (recycle) them also? Thank you for any help. *currently, I'm not searching for fastest, most correct or better solution, I just want something that it's not crashing all the time -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] rounded rectangle for TextView
Hi all, Does anyone know how to obtain the rounded rectangle effect from this picture? http://developer.android.com/intl/de/resources/articles/images/list_fade_4.png Is it somewhere in samples? Thank you, BR, Adrian Vintu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: rounded rectangle for TextView
Nope. I will ckeck it out. Thank you very much :) BR, Adrian Vintu On Thu, May 20, 2010 at 3:06 PM, greg sep...@eduneer.com wrote: Have you seen Graphics/RoundRects in APIDemos? On May 20, 8:30 am, Adrian Vintu adrianvi...@gmail.com wrote: Hi all, Does anyone know how to obtain the rounded rectangle effect from this picture? http://developer.android.com/intl/de/resources/articles/images/list_f... Is it somewhere in samples? Thank you, BR, Adrian Vintu -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AVD Manager
See here http://developer.android.com/guide/practices/screens_support.html and here http://www.adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Tue, May 18, 2010 at 12:32 AM, Mark vbreneg...@sbcglobal.net wrote: Hello everyone, I am new to android development. Why is it that the screen looks great on a test avd but when I deploy the app to my Droid everything is off and really small? Thanks -Mark -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ListView created programmat ically - emptyView doesn’t pop up
Take a look at the AdapterView http://webcache.googleusercontent.com/search?q=cache:DuD-98M6iV4J:www.netmite.com/android/mydroid/frameworks/base/core/java/android/widget/AdapterView.java+android+AdapterViewcd=6hl=enct=clnk Sorry, that's the only link I could get in a rush. You should though have the Android sources locally... BR, Adrian Vintu http://adrianvintu.com On Wed, May 12, 2010 at 2:45 PM, TreKing treking...@gmail.com wrote: On Sat, May 8, 2010 at 3:11 AM, yorick yuri.opo...@gmail.com wrote: what can be wrong? Try setting the empty view BEFORE setting the adapter, or call adapter.notifyDataSetChanged() after setting the empty view. Maybe this will trigger the change. Not sure. Also, your constructor takes a Context and an Activity, which IS a context, so the first parameter is pointless. Then you use getContext(), which I don't know how it's defined, but you're already passing in two contexts - might as well use one of them there. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed
Hi all, I am trying to run the rotation example from http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationTwo/ I created an Eclipse project, added the files from the location above. I created an emulator with target 2.0.1 API level 6. Resolution is 480x854. Abstracted LCD density is 240 (also tried with 160). For some reason, on rotation i get the Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed message. Did anyone get this thing running without the above warning? Thank you, Adrian Vintu PS i also posted here, but got no answer :( http://groups.google.com/group/android-developers/browse_thread/thread/b4922460c3c5c59f/0a0741860e6eb90d?hl=enlnk=gstq=Something+wrong+here#0a0741860e6eb90d -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed
Hi Mark, Thank you for your answer. Please let me (us) know if you have a solution for this. All the best, Adrian Vintu On Mon, May 3, 2010 at 2:16 PM, Mark Murphy mmur...@commonsware.com wrote: Adrian Vintu wrote: Hi all, I am trying to run the rotation example from http://github.com/commonsguy/cw-android/tree/master/Rotation/RotationTwo/ I created an Eclipse project, added the files from the location above. I created an emulator with target 2.0.1 API level 6. Resolution is 480x854. Abstracted LCD density is 240 (also tried with 160). For some reason, on rotation i get the Something wrong here, didn't expect com.commonsware.android.rotation.two to be resumed message. Did anyone get this thing running without the above warning? I can reproduce your problem. On Android 2.1, this has been downgraded to an informational message, not a warning. I'll look into this some more when I get a spare moment. BTW, questions regarding the CommonsWare book examples are best asked on the [cw-android] Google Group, so I don't accidentally miss them: http://groups.google.com/group/cw-android Thanks for pointing this out! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.5 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] Something wrong here... using simplest project
Hi all, I am getting that annoying 'Something wrong here, didn't expect package name to be resumed' for the most basic Android project. Thing is, it only appears on the emulator but not on my Android 1.6 device. I don't know what to do. Is the emulator broken? Am I missing something here? This is a bare bone project, this message should not appear, right? Details and the test project can be found here http://adrianvintu.com/blogengine/post/The-Infamous-Something-wrong-here2c-didnt-expect-3cpackage-name3e-to-be-resumed-Warning.aspx Any feedback is appreciated! Many thanks, Adrian Vintu PS I did try android:configChanges=keyboardHidden|orientation but I don't want to use this trick. PPS I did take a peek at UsageStatsService.java but I did not find anything helpful :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: create TextView
You are right Bob, but it's a little bit more complex. You can explain this in two words or write a paragraph. I decided half the info is better than the complete one. You know, a simple question deserves a simple solution. For more info, refer to the documentation :) Anyway, the best solution would be to use the view.getContext IMO. If you hardcode the this to the OuterClass then it's not really portable. Also having globals that carry the Context is a nono that should be avoided if possible. But alas, it's all about the damn context - no pun intended. BR, Adrian Vintu http://adrianvintu.com On Sun, Mar 28, 2010 at 3:58 AM, Bob Kerns r...@acm.org wrote: Actually, the first part is not true -- you just have to use the right 'this'. Just use MyOuterClassName.this and all will be fine. You could also copy it to a final variable but there's no need since Java provides this mechanism for just this situation. On Mar 27, 7:44 am, Adrian Vintu adrianvi...@gmail. You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] create TextView
Your code probably looks like this AlertDialog a = builder.create(); a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { TextView b = new TextView(this); ... } You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] Re: create TextView
you should probably call removeView() :)) sorry, i could not help it :)) how about you just add the textview one time only? or how about you just post your code? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote: Yeah, figured out that yet, if i do that it works if i push the button 1 time, the second time i push it the application just crashes. Logcat gives me this error: You must call removeView() on the childs parent first. I need some way to 'flush' the textview. On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote: Your code probably looks like this AlertDialog a = builder.create(); a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { TextView b = new TextView(this); ... } You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] Re: create TextView
It's my pleasure to help :) I think an easy solution is to use view.setVisibility(View.GONE) Does this work for you? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote: checkboxrifle.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Patient p = (Patient) spinner.getSelectedItem(); Service s = new Service(RIFLE); if (((CheckBox) v).isChecked()) { p.addService(s,0); DataAccess.registerService(p,s); //TableRow tr = new TableRow(this); //TextView b = new TextView(this); //tr.removeView(b); //TableLayout tl = (TableLayout)findViewById(R.id.dynatabel); //tl.removeView(tr); // b.setText(Dynamic tekst); // tr.addView(b); //tl.addView(tr); } else { p.removeService(0); DataAccess.unregisterService(p, s); } } }); 1st of all tx for ur time. So, i want to do this, push a checkbox, get an object in a spinner, add a row to a tabel. Uncheck the checkbox and the row gets removed. If i create textview outside the scope, i can add 1 new row to the table. Second time i check the checkbox i get the error described previously. The removeView() just removes the view, the application does not crash, but no new rows are added. It just removes the previously created View and creates a new one. If i can create the textview inside the scope the prob would be fixed i think, just need something else then the 'this' when creatin a new one. On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote: you should probably call removeView() :)) sorry, i could not help it :)) how about you just add the textview one time only? or how about you just post your code? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote: Yeah, figured out that yet, if i do that it works if i push the button 1 time, the second time i push it the application just crashes. Logcat gives me this error: You must call removeView() on the childs parent first. I need some way to 'flush' the textview. On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote: Your code probably looks like this AlertDialog a = builder.create(); a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { TextView b = new TextView(this); ... } You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- You
Re: [android-developers] Re: create TextView
So toggle the visibility from GONE to VISIBLE. I think this would be a quick solution :) BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com wrote: It's my pleasure to help :) I think an easy solution is to use view.setVisibility(View.GONE) Does this work for you? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote: checkboxrifle.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Patient p = (Patient) spinner.getSelectedItem(); Service s = new Service(RIFLE); if (((CheckBox) v).isChecked()) { p.addService(s,0); DataAccess.registerService(p,s); //TableRow tr = new TableRow(this); //TextView b = new TextView(this); //tr.removeView(b); //TableLayout tl = (TableLayout)findViewById(R.id.dynatabel); //tl.removeView(tr); // b.setText(Dynamic tekst); // tr.addView(b); //tl.addView(tr); } else { p.removeService(0); DataAccess.unregisterService(p, s); } } }); 1st of all tx for ur time. So, i want to do this, push a checkbox, get an object in a spinner, add a row to a tabel. Uncheck the checkbox and the row gets removed. If i create textview outside the scope, i can add 1 new row to the table. Second time i check the checkbox i get the error described previously. The removeView() just removes the view, the application does not crash, but no new rows are added. It just removes the previously created View and creates a new one. If i can create the textview inside the scope the prob would be fixed i think, just need something else then the 'this' when creatin a new one. On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote: you should probably call removeView() :)) sorry, i could not help it :)) how about you just add the textview one time only? or how about you just post your code? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote: Yeah, figured out that yet, if i do that it works if i push the button 1 time, the second time i push it the application just crashes. Logcat gives me this error: You must call removeView() on the childs parent first. I need some way to 'flush' the textview. On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote: Your code probably looks like this AlertDialog a = builder.create(); a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { TextView b = new TextView(this); ... } You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http
Re: [android-developers] Re: create TextView
A. create one time the container view then use setVisibility() to show or hide it or/and B. you also have alert.getOwnerActivity() which gives you back the... context :) you can then play around with it as you wish On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com wrote: Same error, how can such a simple thing be so difficult :D if i create those outside the onclick scope, its like i can use them only one time. final TableRow tr = new TableRow(this); final TextView b = new TextView(this); On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote: So toggle the visibility from GONE to VISIBLE. I think this would be a quick solution :) BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com wrote: It's my pleasure to help :) I think an easy solution is to use view.setVisibility(View.GONE) Does this work for you? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote: checkboxrifle.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Patient p = (Patient) spinner.getSelectedItem(); Service s = new Service(RIFLE); if (((CheckBox) v).isChecked()) { p.addService(s,0); DataAccess.registerService(p,s); //TableRow tr = new TableRow(this); //TextView b = new TextView(this); //tr.removeView(b); //TableLayout tl = (TableLayout)findViewById(R.id.dynatabel); //tl.removeView(tr); // b.setText(Dynamic tekst); // tr.addView(b); //tl.addView(tr); } else { p.removeService(0); DataAccess.unregisterService(p, s); } } }); 1st of all tx for ur time. So, i want to do this, push a checkbox, get an object in a spinner, add a row to a tabel. Uncheck the checkbox and the row gets removed. If i create textview outside the scope, i can add 1 new row to the table. Second time i check the checkbox i get the error described previously. The removeView() just removes the view, the application does not crash, but no new rows are added. It just removes the previously created View and creates a new one. If i can create the textview inside the scope the prob would be fixed i think, just need something else then the 'this' when creatin a new one. On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote: you should probably call removeView() :)) sorry, i could not help it :)) how about you just add the textview one time only? or how about you just post your code? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote: Yeah, figured out that yet, if i do that it works if i push the button 1 time, the second time i push it the application just crashes. Logcat gives me this error: You must call removeView() on the childs parent first. I need some way to 'flush' the textview. On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote: Your code probably looks like this AlertDialog a = builder.create(); a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { TextView b = new TextView(this); ... } You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
Re: [android-developers] Re: create TextView
in the onClick you also have v.getContext(); v.getParent(); v.getRootView(); On Sat, Mar 27, 2010 at 4:41 PM, Adrian Vintu adrianvi...@gmail.com wrote: A. create one time the container view then use setVisibility() to show or hide it or/and B. you also have alert.getOwnerActivity() which gives you back the... context :) you can then play around with it as you wish On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com wrote: Same error, how can such a simple thing be so difficult :D if i create those outside the onclick scope, its like i can use them only one time. final TableRow tr = new TableRow(this); final TextView b = new TextView(this); On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote: So toggle the visibility from GONE to VISIBLE. I think this would be a quick solution :) BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com wrote: It's my pleasure to help :) I think an easy solution is to use view.setVisibility(View.GONE) Does this work for you? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote: checkboxrifle.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Patient p = (Patient) spinner.getSelectedItem(); Service s = new Service(RIFLE); if (((CheckBox) v).isChecked()) { p.addService(s,0); DataAccess.registerService(p,s); //TableRow tr = new TableRow(this); //TextView b = new TextView(this); //tr.removeView(b); //TableLayout tl = (TableLayout)findViewById(R.id.dynatabel); //tl.removeView(tr); // b.setText(Dynamic tekst); // tr.addView(b); //tl.addView(tr); } else { p.removeService(0); DataAccess.unregisterService(p, s); } } }); 1st of all tx for ur time. So, i want to do this, push a checkbox, get an object in a spinner, add a row to a tabel. Uncheck the checkbox and the row gets removed. If i create textview outside the scope, i can add 1 new row to the table. Second time i check the checkbox i get the error described previously. The removeView() just removes the view, the application does not crash, but no new rows are added. It just removes the previously created View and creates a new one. If i can create the textview inside the scope the prob would be fixed i think, just need something else then the 'this' when creatin a new one. On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote: you should probably call removeView() :)) sorry, i could not help it :)) how about you just add the textview one time only? or how about you just post your code? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote: Yeah, figured out that yet, if i do that it works if i push the button 1 time, the second time i push it the application just crashes. Logcat gives me this error: You must call removeView() on the childs parent first. I need some way to 'flush' the textview. On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote: Your code probably looks like this AlertDialog a = builder.create(); a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener() { public void onClick(DialogInterface dialog, int which) { TextView b = new TextView(this); ... } You need to create the TextView outside the scope of the OnClickListener. The this has to point to Context, which is your Activity. BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote: Hi, i'm trying to create a new TextView when a button is clicked. TextView b = new TextView(this); isnt working cause 'this' refers to new View.onClickListener. Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr
Re: [android-developers] Re: create TextView
Np. There are many ways to get your desired behavior. I will post one of them, just in case someone needs it. This is actually a toggle layout, so it's a little bit more than what you asked. cb.setOnClickListener(new OnClickListener() { TableLayouttl; @Override public void onClick(View v) { if (((CheckBox) v).isChecked()) { if (tl == null) { Context c = v.getContext(); TableRow tr = new TableRow(c); TextView b = new TextView(c); tl = new TableLayout(c); tl.removeView(tr); b.setText(Dynamic test); tr.addView(b); tl.addView(tr); LinearLayout parent = (LinearLayout) v.getParent(); parent.addView(tl); } } else { LinearLayout parent = (LinearLayout) v.getParent(); parent.removeView(tl); tl = null; } } }); BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 5:00 PM, rubeN_vl rvanluch...@hotmail.com wrote: the v.getContext() did it!!! ty dude On 27 mrt, 16:48, Adrian Vintu adrianvi...@gmail.com wrote: in the onClick you also have v.getContext(); v.getParent(); v.getRootView(); On Sat, Mar 27, 2010 at 4:41 PM, Adrian Vintu adrianvi...@gmail.com wrote: A. create one time the container view then use setVisibility() to show or hide it or/and B. you also have alert.getOwnerActivity() which gives you back the... context :) you can then play around with it as you wish On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com wrote: Same error, how can such a simple thing be so difficult :D if i create those outside the onclick scope, its like i can use them only one time. final TableRow tr = new TableRow(this); final TextView b = new TextView(this); On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote: So toggle the visibility from GONE to VISIBLE. I think this would be a quick solution :) BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com wrote: It's my pleasure to help :) I think an easy solution is to use view.setVisibility(View.GONE) Does this work for you? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote: checkboxrifle.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Patient p = (Patient) spinner.getSelectedItem(); Service s = new Service(RIFLE); if (((CheckBox) v).isChecked()) { p.addService(s,0); DataAccess.registerService(p,s); //TableRow tr = new TableRow(this); //TextView b = new TextView(this); //tr.removeView(b); //TableLayout tl = (TableLayout)findViewById(R.id.dynatabel); //tl.removeView(tr); // b.setText(Dynamic tekst); // tr.addView(b); //tl.addView(tr); } else { p.removeService(0); DataAccess.unregisterService(p, s); } } }); 1st of all tx for ur time. So, i want to do this, push a checkbox, get an object in a spinner, add a row to a tabel. Uncheck the checkbox and the row gets removed. If i create textview outside the scope, i can add 1 new row to the table. Second time i check the checkbox i get the error described previously. The removeView() just removes the view, the application does not crash, but no new rows are added. It just removes the previously created View and creates a new one. If i can create the textview inside the scope the prob would be fixed i think, just need something else then the 'this' when creatin a new one. On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote: you should probably call removeView() :)) sorry, i could not help it :)) how about you just add the textview one time only? or how about you just post your code? BR, Adrian Vintu http://adrianvintu.com On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote: Yeah, figured out that yet, if i do that it works if i push
Re: [android-developers] Problem in Showing TXT file in Webview
You can use the pre tag. For example html 1 2 3 pre 1 2 3 /pre BR, Adrian Vintu http://adrianvintu.com On Thu, Mar 25, 2010 at 1:13 PM, brijesh masrani masrani.brij...@gmail.comwrote: Hello I am reading a txt file using Stringbuffer and try to show it in webview by adding simple html tags (htmlBodyMy txt content/html/Body) but it is not showing Spacial characters so can u please help me or any other way to show txt file in Web Browser -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] Re: Unexpected Resumes Running Under 2.0
I think i posted this link 100 times already :D http://www.adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 24, 2010 at 9:07 PM, Johan Nilsson markupart...@gmail.comwrote: Found a solution for this, guess I mixed up CHANGE_CONFIGURATION with android:configChanges=locale that should be added to the activity element in the Manifest. Adding this solves the problem. Regards, Johan Nilsson On Wed, Mar 24, 2010 at 7:29 PM, Johan Nilsson markupart...@gmail.com wrote: Did you manage to find a workaround for this? I have the same problem in 2.0 and 2.0.1, the very same code is working perfect in 1.5, 1.6 and 2.1. My implementation[1] is pretty much the same as Menions. I also tried to set the permission 'CHANGE_CONFIGURATION' that I believe is needed when done from an Activity but without luck. Is there a workaround or do I need to disable this option for 2.0.x? Regards, Johan Nilsson [1] http://github.com/johannilsson/sthlmtraveling/blob/master/src/com/markupartist/sthlmtraveling/MyApplication.java#L39 On Fri, Nov 13, 2009 at 1:15 PM, Menion menion.as...@gmail.com wrote: Hi, I have very similar problem, but still not successfully resolved. In first activity during onCreate() I have this code Resources res = activity.getResources(); DisplayMetrics dm = res.getDisplayMetrics(); Configuration conf = res.getConfiguration(); // want to set (force) czech language on english phone Logger.i(TAG, set CS lang); Locale loca = new Locale(cs); // cs_CZ not work too // !!! THIS LINE DO CYCLE !!! conf.locale = loca; res.updateConfiguration(conf, dm); as I commented in code, line 'conf.locale = loca;' cause repeating whole creating and destroying cycle as wrote Nmix in first post. And also I have to say, than this code worked perfectly until 2.0 SDK. Any suggestion? I'm using this for ability to choose app language different from system lang. Thank you very much ... -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] Re: Problem in Showing TXT file in Webview
You can't find the encoding the user used to write the text file. You can maybe: A. force the users to write UTF-8 (or whatever the default encoding should be) B. assume the encoding is UTF-8 (or whatever the default encoding should be) C. let the user change the encoding if THEY think it's not ok. B + C is kinda like what the browsers do. BR, Adrian Vintu http://adrianvintu.com PS for UTF-8 the html should look like htmlheadmeta http-equiv=Content-Typecontent=text/html; charset=UTF-8/ On Thu, Mar 25, 2010 at 3:17 PM, brijesh masrani masrani.brij...@gmail.comwrote: Thanks for ur replay Adrian Vintu , I have used that but now i came to know that The problem is with Encoding So if u have any idea about how to know which encoding was used for file than let me know. On Thu, Mar 25, 2010 at 5:43 PM, brijesh masrani masrani.brij...@gmail.com wrote: Hello I am reading a txt file using Stringbuffer and try to show it in webview by adding simple html tags (htmlBodyMy txt content/html/Body) but it is not showing Spacial characters so can u please help me or any other way to show txt file in Web Browser -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] Re: Problem in Showing TXT file in Webview
Nice trick Bob. This totally slipped my mind :) I will use it in the future :) On Thu, Mar 25, 2010 at 3:27 PM, Bob Kerns r...@acm.org wrote: If you add HTML tags, you also have to convert the text, converting and and to lt;, gt;, and amp;, respectively. But there's an easier way. Instead of webview.loadData(page, text/html, utf-8) -- use text/plain instead, and leave off the tags. On Thu, Mar 25, 2010 at 5:13 AM, brijesh masrani masrani.brij...@gmail.com wrote: Hello I am reading a txt file using Stringbuffer and try to show it in webview by adding simple html tags (htmlBodyMy txt content/html/Body) but it is not showing Spacial characters so can u please help me or any other way to show txt file in Web Browser -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] finishPackage() vs restartPackage()
Unless you are a little bit of a self-hater, the Napoleonic cock can be easily switched to your favorite mp3. Just go to Music, long click on an mp3, set as ring tone. Then the mp3 will appear both in call ring tones and in alarm ring tones. BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 22, 2010 at 10:56 PM, dipu contac...@gmail.com wrote: I think there should be a finishPackage() function similar to the restartPackage(). There should be a way to stop some tasks without killing the process. For example sometimes I need to stop music running in the background, alarm going in the background etc. It takes way too many steps to stop such apps. Specially at 6 in the morning when I try to stop that annoying rooster alarm :) restartPackage() issues death notification. Most of the time I do not want to do that. I would like to simply close(finish) a task normally. Thanks, dipu -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [android-developers] Re: Masking password input in extracted UI
what is Extracted fullscreen? please post s short example of your java and xml code. BR, Adrian Vintu http://adrianvintu.com On Tue, Mar 16, 2010 at 4:45 PM, ahamed ahamedp...@gmail.com wrote: Thanks for your reply. I got it to work in portrait mode. But the problem is on landscape mode. Im using android 1.5 to build it. when on portrait mode/candidate view the letters being masked when you type(one by one) itself. But on fullscreen mode where the extracted UI has its own edit field when you type any letter it doesnt masked. I tried your code even it did same. 1) Do we have direct access to control(password transformation) extracted UI from parent edit text. 2) Do i need to implement inputmethodservice or any to programmatically controll extracted edit text view? Any code examples would be greatefull for masking password input in Extracted fullscreen mode( masking 1char at a time while entering input itself in extracted fullscreen vkp) thanks in advance On Mar 15, 5:53 pm, Adrian Vintu adrianvi...@gmail.com wrote: When switching orientation the activity restarts. You need to put this code somewhere in onCreate: EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType( InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available from designer editText.setTransformationMethod(new PasswordTransformationMethod()); How exactly are you managing NOT to set the properties in onCreate? Are you reusing the EditTexts? Please play with this code and see the results - comment and uncomment the instructions in onCreate and also see the button clicks. package com.tests; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; import android.text.InputType; import android.text.method.PasswordTransformationMethod; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class Main extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.Button01); button.setOnClickListener(this); // EditText editText = (EditText) findViewById(R.id.EditText01); // editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); // editText.setTransformationMethod(new PasswordTransformationMethod()); } @Override public void onClick(View v) { EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); editText.setTransformationMethod(new PasswordTransformationMethod()); } } BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 15, 2010 at 6:12 PM, ahamed ahamedp...@gmail.com wrote: I tried the following but no luck. on landscape mode on fullscreen vkp mode text doenst masked. text1 = (EditText) this.findViewById(R.id.EditText01); text1.setTransformationMethod(new PasswordTransformationMethod()); Please let me know how can i mask the password in fullscreen VKP mode. thanks ahamed On Mar 11, 5:20 pm, ahamed ahamedp...@gmail.com wrote: Thanks for the reply Adrian. I tried editText.setTransformationMethod(new PasswordTransformationMethod()); and editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); for masking password in extracted view softkeyboard. but no luck. how would initialization vary for edit text. Im initializing by using EditText setPinEditText= new EditText(context); But you wrote EditText editText = (EditText) findViewById(R.id.EditText01); I havnt set id for parent Edittext and also so R.id.EditText01 is undefined in my class. And also how can extracted soft keyboard UI view links to parent edittext. please clarify. many thanks in advance. On Mar 3, 5:06 pm, Adrian Vintu adrianvi...@gmail.com wrote: EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available from designer editText.setTransformationMethod(new PasswordTransformationMethod()); BR, Adrian Vintu http://adrianvintu.com On Thu, Feb 25, 2010 at 4:44 PM, ahamed ahamedp...@gmail.com wrote: Dear Experts, Can you please assist how can we mask password input in fullscreen virtual keypad. EditText setPinEditText= new EditText(context); setPinEditText.setImeOptions(EditorInfo.IME_ACTION_UNSPECIFIED);) I tried using setPinEditText.setTransformationMethod(new PasswordTransformationMethod()); Masking
[android-developers] HTC tester needed
Hi all, I ran into a problem and I need an HTC tester badly. I developed an app for managing the user dictionary on Android. The homepage is http://udm.adrianvintu.com Thing is, it works great, except for the HTCs. I think the HTC is not using the standard custom dictionary :( Tech: I am using the standard way to add custom words - UserDictionary.Words.addWord(context, word, frequency, app_id) I need an HTC owner to make a short test for me. Steps: 1. install UDM 2. go to Edit and add a test word like: TESTESTEST 3. go to SMS screen 4. start writing TESTE and see if the TESTESTEST comes up in the suggestion bar. 5. let me know if the word appears in the suggestion bar I will be very grateful to who can help me with this issue. Thank you, BR, Adrian Vintu http://adrianvintu.com PS you must not use any custom keyboard software, except the official on from HTC, of course. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: HTC tester needed
Thank you very much String :) My opinion is that this should work on all devices. I think it's a standard Android feature that the manufacturers should stick with... But then again... who knows... For now I'll just stick with whatever help I can get. BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 17, 2010 at 10:42 PM, String sterling.ud...@googlemail.comwrote: On Mar 17, 9:06 pm, Adrian Vintu adrianvi...@gmail.com wrote: I ran into a problem and I need an HTC tester badly. And at the other end of the HTC spectrum, my G1 gives the same result. TESTESTEST came up as a suggestion in the SMS app. Just curious, both the G1 and the N1 are plain-vanilla Android devices, albeit made by HTC. I'm wondering if you actually need someone running HTC's Sense UI to test this, instead of just someone on HTC hardware? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: HTC tester needed
Ok String, you may be up to something. An HTC Sense user reported 03-17 21:23:47.735: ERROR/ActivityThread(1071): Failed to find provider info for user_dictionary 03-17 21:23:47.735: ERROR/UserDictManager(1071): java.lang.IllegalArgumentException: Unknown URL content://user_dictionary/words Now this, is pretty bad. The same error came from a rooted TATOO - but this one ~may~ happen because of other issues. I will wait for more info for now. And go to sleep. Tomorrow is a new day :) On Wed, Mar 17, 2010 at 10:50 PM, Adrian Vintu adrianvi...@gmail.comwrote: Thank you very much String :) My opinion is that this should work on all devices. I think it's a standard Android feature that the manufacturers should stick with... But then again... who knows... For now I'll just stick with whatever help I can get. BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 17, 2010 at 10:42 PM, String sterling.ud...@googlemail.comwrote: On Mar 17, 9:06 pm, Adrian Vintu adrianvi...@gmail.com wrote: I ran into a problem and I need an HTC tester badly. And at the other end of the HTC spectrum, my G1 gives the same result. TESTESTEST came up as a suggestion in the SMS app. Just curious, both the G1 and the N1 are plain-vanilla Android devices, albeit made by HTC. I'm wondering if you actually need someone running HTC's Sense UI to test this, instead of just someone on HTC hardware? 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] mp3 player application with dB amplifier
Hello all, I need a simple mp3 player - with the functionality of the default Android player - with one small addition. I need to be able to up the sound volume more than the VolumeUp button can do. I see you can do that in Winamp from the Equalizer window, by choosing Preamp. Why do i need this: because many of my albums were ripped at a low sound volume, and i can barely hear them on the subway. Is there such a player available on the market? There are some catches though: 1. must be as simple as possible 2. must be able to upgrade the volume without destroying the sound quality too much 3. must be free. Thank you, BR, Adrian Vintu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Custom Dialog
This one hs been answered a couple of times on this forum. Use dialog = new Dialog(this); instead of dialog = new Dialog(getApplicationContext()); BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 15, 2010 at 10:05 PM, Dirk Vranckaert dirkvrancka...@gmail.comwrote: Thx for the quick response but doesn't change a thing, it gives me exactly the same exception! On 15 mrt, 21:58, Kumar Bibek coomar@gmail.com wrote: Try getBaseContext(); Thanks and Regards, Kumar Bibek On Mar 16, 1:50 am, Dirk Vranckaert dirkvrancka...@gmail.com wrote: I'm trying to create a custom dialog in my application to show an about window but it ain't working. Maybe one of you knows a solution? So I have an activity with the onCreateDialog(int id) overriden in it: @Override protected Dialog onCreateDialog(int id) { Dialog dialog = null; switch (id) { case EPISODE_LOADING_DIALOG: ... case EXCEPTION_DIALOG: ... case ABOUT_DIALOG: dialog = new Dialog(getApplicationContext()); dialog.setContentView(R.layout.aboutdialog); dialog.setTitle(MyTitle); break; default: ... } return dialog; } My aboutdialog layout files looks like this: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=10dp TextView android:id=@+id/aboutText android:layout_width=wrap_content android:layout_height=fill_parent android:textColor=#FFF android:text=@string/aboutText / /LinearLayout This is exactly as described here: http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog However this my exception thrown: 03-15 21:48:32.055: ERROR/AndroidRuntime(2004): Uncaught handler: thread main exiting due to uncaught exception 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.ViewRoot.setView(ViewRoot.java:429) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:178) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.app.Dialog.show(Dialog.java:231) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.app.Activity.showDialog(Activity.java:2407) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at eu.vranckaert.episodeWatcher.EpisodesWatchListActivity.onOptionsItemSelected(EpisodesWatchListActivity.java: 130) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.app.Activity.onMenuItemSelected(Activity.java:2085) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java: 820) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 139) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java: 813) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java: 519) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java: 122) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.View.onTouchEvent(View.java:3828) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.widget.TextView.onTouchEvent(TextView.java:6291) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.View.dispatchTouchEvent(View.java:3368) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004): at com.android.internal.policy.impl.PhoneWindow $DecorView.dispatchTouchEvent(PhoneWindow.java:1691) 03-15 21:48:32.130: ERROR/AndroidRuntime(2004
Re: [android-developers] Re: Masking password input in extracted UI
When switching orientation the activity restarts. You need to put this code somewhere in onCreate: EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType( InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available from designer editText.setTransformationMethod(new PasswordTransformationMethod()); How exactly are you managing NOT to set the properties in onCreate? Are you reusing the EditTexts? Please play with this code and see the results - comment and uncomment the instructions in onCreate and also see the button clicks. package com.tests; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; import android.text.InputType; import android.text.method.PasswordTransformationMethod; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class Main extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.Button01); button.setOnClickListener(this); // EditText editText = (EditText) findViewById(R.id.EditText01); // editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); // editText.setTransformationMethod(new PasswordTransformationMethod()); } @Override public void onClick(View v) { EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); editText.setTransformationMethod(new PasswordTransformationMethod()); } } BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 15, 2010 at 6:12 PM, ahamed ahamedp...@gmail.com wrote: I tried the following but no luck. on landscape mode on fullscreen vkp mode text doenst masked. text1 = (EditText) this.findViewById(R.id.EditText01); text1.setTransformationMethod(new PasswordTransformationMethod()); Please let me know how can i mask the password in fullscreen VKP mode. thanks ahamed On Mar 11, 5:20 pm, ahamed ahamedp...@gmail.com wrote: Thanks for the reply Adrian. I tried editText.setTransformationMethod(new PasswordTransformationMethod()); and editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); for masking password in extracted view softkeyboard. but no luck. how would initialization vary for edit text. Im initializing by using EditText setPinEditText= new EditText(context); But you wrote EditText editText = (EditText) findViewById(R.id.EditText01); I havnt set id for parent Edittext and also so R.id.EditText01 is undefined in my class. And also how can extracted soft keyboard UI view links to parent edittext. please clarify. many thanks in advance. On Mar 3, 5:06 pm, Adrian Vintu adrianvi...@gmail.com wrote: EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available from designer editText.setTransformationMethod(new PasswordTransformationMethod()); BR, Adrian Vintu http://adrianvintu.com On Thu, Feb 25, 2010 at 4:44 PM, ahamed ahamedp...@gmail.com wrote: Dear Experts, Can you please assist how can we mask password input in fullscreen virtual keypad. EditText setPinEditText= new EditText(context); setPinEditText.setImeOptions(EditorInfo.IME_ACTION_UNSPECIFIED);) I tried using setPinEditText.setTransformationMethod(new PasswordTransformationMethod()); Masking the password input in portrait vkp mode works fine with this change but when I rotate to landscape mode, in fullscreen virtual keyboard mode it doenst worked. Any help would be highly appreciated. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android
Re: [android-developers] Re: Android app only taking up part of screen
Also see http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx It seems these resolution questions come every few days... BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 10, 2010 at 11:42 AM, Kumar Bibek coomar@gmail.com wrote: Aah, An example of apps running on different screen sizes and resolutions. Please have a look at this. http://developer.android.com/intl/de/guide/practices/screens_support.html Kumar Bibek On Mar 9, 1:07 am, Drew zit...@gmail.com wrote: I have an Android application that's seemingly only taking up 1/3 or so of the screen on a Texas Instruments Zoom Android device. You can see what I mean here: http://www.zitnay.com/stuff/IMG00910.jpg The upper-middle third or so of the screen contains the app, but the rest of the screen is black. I have thousands of other people using this app, but have never had a report of this before (and can't reproduce it using the emulator). I'm typically building the layout programmatically (typically with a ScrollView as the main view) then using setContentView() to display it. I was originally using setContentView(View), but I tried adding new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT) as the second parameter today, which didn't seem to fix the problem. I'd appreciate any advice anyone can give. Thanks. Drew -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: EditText layout for all devices
LinearLayout android:id=@+id/LinearLayout01 android:layout_height=wrap_content android:weightSum=2 android:layout_width=fill_parent EditText android:text=@+id/EditText01 android:id=@+id/EditText01 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=1/EditText EditText android:text=@+id/EditText02 android:id=@+id/EditText02 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=1/EditText /LinearLayout The key is using the Weight attribute. And make sure to check out this article http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Fri, Mar 12, 2010 at 7:20 PM, temp tempche...@gmail.com wrote: 50% of available vertical height if total height = 100px then EditText1 height= 50px ( 0-50px) EditText2 height=50px ( 51-100px) Thanks On Mar 13, 2:03 am, Mike dg vinb...@gmail.com wrote: 50% of the total area of the screen? or just 50% of the width? Can you include a picture of exactly what you want it to look like? -Mike dg On Mar 12, 12:52 pm, temp tempche...@gmail.com wrote: Hi, In my layout i need to have to 2 EditText widgets which would occupy 50% of area individually. I'm planning to have the solution generic for all devices, let me know if this can be controlled through XML in any way or I'll have to create the layout through code. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Market Intent Suggestion
Use market://details?id=package BR, Adrian Vintu http://adrianvintu.com On Thu, Mar 4, 2010 at 8:15 AM, Atif Gulzar atif.gul...@gmail.com wrote: When we search for an application by its fully qualified Java package name using http://market.android.com/search?q=pname:package or market://search?q=pname:package It displays a single result in a list. Since it a single result it should display the detailed application view instead of showing it in a list view. Just a suggestion -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en http://adrianvintu.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: selecting language from within the app rather than by locale of the system settings
Hi Menion, Yes, you have to set the locale in onCreate. It was written in the comments of the article. BR, Adrian Vintu http://adrianvintu.com On Thu, Mar 4, 2010 at 6:33 AM, Menion menion.as...@gmail.com wrote: Hi Adrian, thanks for you response. Your code is very similar to mine. Only base diference is that you use Activity.getBaseContext().getResources() instead of mine used Activity.getResources(). But this not help with my main problem. Probably in your code, every display rotate call same INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3 loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34} and after that, locale change to default. but is seems that only solution is to call language change code in every onCreate() in every activity. Little bit weird but cannot find any other permanent solution. On Mar 3, 10:38 pm, Adrian Vintu adrianvi...@gmail.com wrote: Hope this will helphttp:// adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Sat, Feb 27, 2010 at 3:09 PM, Menion menion.as...@gmail.com wrote: Hi mot12, sorry not post earlier. I don't know, if you find my info still useful ..., but ad 1) Yes, it's my own function that check if user selected Czech or English, so this return cz or en String. ad 2) I didn't tried this. When user change locale in PreferenceScreen, I force him to restart application. Changing of application language is not a common activity, so restart is not a bad solution I think :). But with your problem, it's relevant to my another problem. Did you try set another locale (language) and then rotate display? With my current solution, ActivityManager send this event INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3 loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34} and language of whole application set from my (e.g. cz, to default (in this case to loc=en_GB). I think that this is similar to your problem. Grr ... Hope we find any solution ... On Feb 14, 11:45 am, mot12 martin.hu...@gmail.com wrote: Menion, Ok, now I feel silly because I thought I could figure it out from your post. 1) Settings.getLanguage() is from your own preference settings? It is no android.provider.Settings, right? 2) When my app loads, I read the language preference from my own app preference settings and set the locale using the code you gave. Works great. But if I change the language preference in my settings using updateConfiguration, I hoped I would trigger the onConfigurationChanged of my main Activity. But that doesn't happen despite my entries android:configChanges=locale for the main activity and uses-permission android:name=android.permission.CHANGE_CONFIGURATION/ in the manifest. Let's say I am in the main activity. I load the locale specified in the settings in OnCreate. Everything is great. Now I go from there to a preference activity, change the desired locale, update the configuration via updateConfiguration and using the 'back' key I go back to my main activity. Instead of onConfigurationChanged I get onResume, giving me no possibility to reload my resources. Any idea? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: selecting language from within the app rather than by locale of the system settings
My pleasure :) BR, Adrian Vintu http://adrianvintu.com On Thu, Mar 4, 2010 at 6:53 PM, Menion menion.as...@gmail.com wrote: next time, I'll try to read comments also :). Thank you very much, you point me to finally working solution. On Mar 4, 11:41 am, Adrian Vintu adrianvi...@gmail.com wrote: Hi Menion, Yes, you have to set the locale in onCreate. It was written in the comments of the article. BR, Adrian Vintu http://adrianvintu.com On Thu, Mar 4, 2010 at 6:33 AM, Menion menion.as...@gmail.com wrote: Hi Adrian, thanks for you response. Your code is very similar to mine. Only base diference is that you use Activity.getBaseContext().getResources() instead of mine used Activity.getResources(). But this not help with my main problem. Probably in your code, every display rotate call same INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3 loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34} and after that, locale change to default. but is seems that only solution is to call language change code in every onCreate() in every activity. Little bit weird but cannot find any other permanent solution. On Mar 3, 10:38 pm, Adrian Vintu adrianvi...@gmail.com wrote: Hope this will helphttp:// adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Sat, Feb 27, 2010 at 3:09 PM, Menion menion.as...@gmail.com wrote: Hi mot12, sorry not post earlier. I don't know, if you find my info still useful ..., but ad 1) Yes, it's my own function that check if user selected Czech or English, so this return cz or en String. ad 2) I didn't tried this. When user change locale in PreferenceScreen, I force him to restart application. Changing of application language is not a common activity, so restart is not a bad solution I think :). But with your problem, it's relevant to my another problem. Did you try set another locale (language) and then rotate display? With my current solution, ActivityManager send this event INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3 loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34} and language of whole application set from my (e.g. cz, to default (in this case to loc=en_GB). I think that this is similar to your problem. Grr ... Hope we find any solution ... On Feb 14, 11:45 am, mot12 martin.hu...@gmail.com wrote: Menion, Ok, now I feel silly because I thought I could figure it out from your post. 1) Settings.getLanguage() is from your own preference settings? It is no android.provider.Settings, right? 2) When my app loads, I read the language preference from my own app preference settings and set the locale using the code you gave. Works great. But if I change the language preference in my settings using updateConfiguration, I hoped I would trigger the onConfigurationChanged of my main Activity. But that doesn't happen despite my entries android:configChanges=locale for the main activity and uses-permission android:name=android.permission.CHANGE_CONFIGURATION/ in the manifest. Let's say I am in the main activity. I load the locale specified in the settings in OnCreate. Everything is great. Now I go from there to a preference activity, change the desired locale, update the configuration via updateConfiguration and using the 'back' key I go back to my main activity. Instead of onConfigurationChanged I get onResume, giving me no possibility to reload my resources. Any idea? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr
Re: [android-developers] Android Library
I use a Java Project for a library. Seems if you use an Android project in Eclipse as library, you will have big troubles. Just use the Java project and remove the standard JRE from the build path and add the android.jar in the build path. That should do the tick. BR, Adrian Vintu http://adrianvintu.com On Wed, Mar 3, 2010 at 3:28 PM, MobDev developm...@mobilaria.com wrote: Hi, I'd like to create a own Android Library, as in a JAR file with specific functionality which I can later re-use in future projects... This Library will also include basic Archtiecture components... Now I was wondering what type of Project should I be using for this in Eclipse ? Should it be a specific Android Project (thus having all res/gen/ R.java/AndroidManifest etc) or just a normal plain Java project ? The first option would obviously be specific for Android, including and importing Andorid-specific api's... But to me it seems that such a project is only usable for an application and not a library ? The second option would make it more like a simple clean Api/Library, but might obviously try to use specific Java libraries which aren't accessible in Android... So my question woul be : is an Android Project usable for creating a Library (JAR) ? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] developing for differant sizes
AbsoluteLayout is deprecated. See here http://groups.google.com/group/android-developers/browse_thread/thread/570db5c34bb2265d?pli=1 http://groups.google.com/group/android-developers/browse_thread/thread/400f966b1e671e94?pli=1 and perhaps here http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx On Sun, Feb 28, 2010 at 11:26 PM, Gagan gagansing...@gmail.com wrote: Hello all, I am currently at the end of devoping a simple program with a radio group, two buttons and a text view. When I test it on my g1 and the 1.6 emulator it looks great, but when my friend tries it on his droid many elements are displaced and cut off. I am using absolutelayout, does this layout not scale accordingly to the screen? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- BR, Adrian Vintu http://adrianvintu.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Why is English the only Locale my Phone has in Settings
Here is an app that may help you a little bit http://udm.adrianvintu.com/ BR, Adrian Vintu http://adrianvintu.com On Mon, Mar 1, 2010 at 2:47 PM, Hekki kaye...@gmail.com wrote: Simply download Locale 2 from the market, and you'll have all the languages you want for your phone. No need for root or anything like that. Yahel On 1 mar, 13:43, Mark Murphy mmur...@commonsware.com wrote: lordjoe wrote: and How can I change this Buy a different phone, or root it and load a different ROM. For example, my Motorola DROID has English and Spanish. My Nexus One has a range of language/regions, 13 in total. My HTC Tattoo has English (Malaysia) and English (Vietnam) and nothing else, because it was manufactured for those two markets, and Android does not have translations to those languages yet. And so on. The language options are in the ROM, so there is no sort of downloadable language pack. Alternative ROMs may have other language mixes. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: selecting language from within the app rather than by locale of the system settings
Hope this will help http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Sat, Feb 27, 2010 at 3:09 PM, Menion menion.as...@gmail.com wrote: Hi mot12, sorry not post earlier. I don't know, if you find my info still useful ..., but ad 1) Yes, it's my own function that check if user selected Czech or English, so this return cz or en String. ad 2) I didn't tried this. When user change locale in PreferenceScreen, I force him to restart application. Changing of application language is not a common activity, so restart is not a bad solution I think :). But with your problem, it's relevant to my another problem. Did you try set another locale (language) and then rotate display? With my current solution, ActivityManager send this event INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3 loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34} and language of whole application set from my (e.g. cz, to default (in this case to loc=en_GB). I think that this is similar to your problem. Grr ... Hope we find any solution ... On Feb 14, 11:45 am, mot12 martin.hu...@gmail.com wrote: Menion, Ok, now I feel silly because I thought I could figure it out from your post. 1) Settings.getLanguage() is from your own preference settings? It is no android.provider.Settings, right? 2) When my app loads, I read the language preference from my own app preference settings and set the locale using the code you gave. Works great. But if I change the language preference in my settings using updateConfiguration, I hoped I would trigger the onConfigurationChanged of my main Activity. But that doesn't happen despite my entries android:configChanges=locale for the main activity and uses-permission android:name=android.permission.CHANGE_CONFIGURATION/ in the manifest. Let's say I am in the main activity. I load the locale specified in the settings in OnCreate. Everything is great. Now I go from there to a preference activity, change the desired locale, update the configuration via updateConfiguration and using the 'back' key I go back to my main activity. Instead of onConfigurationChanged I get onResume, giving me no possibility to reload my resources. Any idea? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Masking password input in extracted UI
EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available from designer editText.setTransformationMethod(new PasswordTransformationMethod()); BR, Adrian Vintu http://adrianvintu.com On Thu, Feb 25, 2010 at 4:44 PM, ahamed ahamedp...@gmail.com wrote: Dear Experts, Can you please assist how can we mask password input in fullscreen virtual keypad. EditText setPinEditText= new EditText(context); setPinEditText.setImeOptions(EditorInfo.IME_ACTION_UNSPECIFIED);) I tried using setPinEditText.setTransformationMethod(new PasswordTransformationMethod()); Masking the password input in portrait vkp mode works fine with this change but when I rotate to landscape mode, in fullscreen virtual keyboard mode it doenst worked. Any help would be highly appreciated. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Masking password input in extracted UI
EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available from designer editText.setTransformationMethod(new PasswordTransformationMethod()); BR, Adrian Vintu http://adrianvintu.com On Wed, Feb 24, 2010 at 7:58 PM, ahamed ahamedp...@gmail.com wrote: Hi All, Can you guys share how can we mask password input in fullscreen virtual keypad. EditText setPinEditText= new EditText(context); setPinEditText.setImeOptions(EditorInfo.IME_ACTION_UNSPECIFIED);) I tried using setPinEditText.setTransformationMethod(new PasswordTransformationMethod()); Masking the password input in portrait vkp mode works fine with this change but when I rotate to landscape mode, in fullscreen virtual keyboard mode it doenst worked. Any help would be highly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en http://www.google.com/search?q=EditText%20editText%20=%20%28EditText%29%20findViewById%28R.id.EditText01%29;%0D%0AeditText.setInputType%28InputType.TYPE_TEXT_VARIATION_PASSWORD%29;%20//also%20available%20from%20designer%0D%0AeditText.setTransformationMethod%28new%20PasswordTransformationMethod%28%29%29;%0D%0A%0D%0ABR,%0D%0AAdrian%20Vintu%0D%0A%0D%0Ahttp://adrianvintu.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Edit Text Password visible on focus in landscape
EditText editText = (EditText) findViewById(R.id.EditText01); editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); //also available in design mode editText.setTransformationMethod(new PasswordTransformationMethod()); BR, Adrian Vintu http://adrianvintu.com On Tue, Feb 23, 2010 at 8:19 PM, syronet edwinpat...@gmail.com wrote: I have a login screen with a edit text password field. In landscape mode, when i try to enter anything into the field, the view kinda zooms into the field with the virtual keyboard on the bottom, and anything i type is visible as plain text; now if i were to hit the back button, it will zoom out and display the entire activity but the text in the field is hidden. I have tried setting android:password=true, it works only in portrait and when in the zoomed in state.. thats no help android:inputType=textPassword this by itself is useless any other ideas ? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Localization in Eclair
Also see http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu http://adrianvintu.com On Tue, Feb 23, 2010 at 5:00 PM, android learner android.lear...@gmail.comwrote: Thank you Mark. On Feb 22, 6:38 pm, Mark Murphy mmur...@commonsware.com wrote: android learner wrote: Does Android provide any tool(s) that would help developers translate the strings (may be to convert from xml to xliff format or some other format that translators generally use)? No, though it would not take much work for somebody to write one. The 'Internationalization and Localization' part in developer.android.com still has a stub (coming soon). Try: http://developer.android.com/guide/topics/resources/localization.html -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: eclipse linkedResources - linked layout xml is neither included in the apk nor generated
Hi Bob, Thank you for your input. I think they are all interesting ideas. I have decided to use another approach though. So here is how we are standing: Project A (Java) is the common base and holds the layout xmls. Projects B, C, etc (Android) are the regular applications. I will make Eclipse file links in project B, C, etc to all the layout xmls from project A. I will add a prebuild script that will physically copy the files from project A if no hard copy already exists in project B, C, etc (so physically copy the linked files). The aapt will run ok. Then I guess I will also have to delete them on post build. I choose this way because it fits most for what I need. I also like it because I have a visual representation of linked xmls. I can at any time replace the linked xmls with custom ones, and I will immediately get visual feedback - the linked/physical file icons in Eclipse. It is a little bit weird, but I think, as usability, this fits my purposes best. Thank you, BR, Adrian Vintu On Mon, Feb 22, 2010 at 5:11 PM, Bob Kerns r...@acm.org wrote: Yeah, google-fu fails when you are the first to try something -- or when those who have gone before are too foolish to ask their question in public! This way you get to both pose the question and the answer for the next person to try this. Anyway, the first thing I'd do is to think long and hard about my reasons for wanting to do this. If there's really not enough benefit, then don't do it; that's the simplest way. Otherwise, I'd write an ant script, and add an ant builder to my project that copies it in from the source. You'll want to set it up to run whenever the source changes, and to refresh the output file whenever the script runs. This way, it'll run the script, do the copy, and then tell Eclipse that the file has changed. But you won't be able to edit the file in res/ in Eclipse, without losing your changes. That may be a steep price to pay. A better solution, in my opinion, is to have them be separate files with a common ancestor, and use your revision control systems merging capabilities to merge changes back and forth. For example, with Subversion, use 'svn copy source/layout/main.xml res/layout/main.xml' to make the local res/layout copy, such that it is a descendant of the source/layout file. Then use 'svn merge' to merge changes between the two files. (Of course, you'll need 'svn commit' after each step, before touching these files again, but you can combine that with other changes). A big advantage of this approach is that you can have changes which you do NOT merge back, but only exist in one of the projects using the common source. And yet you can continue to merge other changes back and forth as needed. It's not as automatic, but it also leaves a better audit trail. On Feb 22, 6:47 am, Adrian Vintu adrianvi...@gmail.com wrote: Ok, I found it. Seems the resources are built using the aapt.exe command line. This means, only physical files are taken into account... Anyone has an idea on a workarround for this? - to also make the linked files be physically included in the RES folder but also be updated if the source changes? Without using symlinks and stuff like that? Thank you, BR, Adrian Vintu -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] eclipse linkedResources - linked layout xml is neither included in the apk nor generated
Hi all, I am trying to include a layout xml in an Android project from a Java project - using new file - link to file system. It looks like this in .project: linkedResources link nameres/layout/main.xml/name type1/type locationURIANDROID_COMMON_RES/layout/main.xml/locationURI /link /linkedResources The xml looks ok in Eclipse, i can edit it and i get the ADT layout editor, but unfortunately the layout is not generated, and does not appear in R.java - R.layout.main. When making a build, the apk does NOT contain the main.xml file :( Does anyone have a clue about this? My google-fu has failed me :( BR, Adrian Vintu -- 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: eclipse linkedResources - linked layout xml is neither included in the apk nor generated
Ok, I found it. Seems the resources are built using the aapt.exe command line. This means, only physical files are taken into account... Anyone has an idea on a workarround for this? - to also make the linked files be physically included in the RES folder but also be updated if the source changes? Without using symlinks and stuff like that? Thank you, BR, Adrian Vintu On Mon, Feb 22, 2010 at 2:28 PM, Adrian Vintu adrianvi...@gmail.com wrote: Hi all, I am trying to include a layout xml in an Android project from a Java project - using new file - link to file system. It looks like this in .project: linkedResources link nameres/layout/main.xml/name type1/type locationURIANDROID_COMMON_RES/layout/main.xml/locationURI /link /linkedResources The xml looks ok in Eclipse, i can edit it and i get the ADT layout editor, but unfortunately the layout is not generated, and does not appear in R.java - R.layout.main. When making a build, the apk does NOT contain the main.xml file :( Does anyone have a clue about this? My google-fu has failed me :( BR, Adrian Vintu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: I am a german market developer. How can I see the english comments to my program?
sorry, you are right. comments are also missing from androidzoom and andrlib :( On Sun, Jan 17, 2010 at 10:47 PM, Martin google-gro...@digle.de wrote: But since the Google Market just allows to use the Market api for 5 Minutes an hour, cyrket.com is down and all the caching-pages will not be up to date anymore. (Info for germans: http://www.androidpit.de/android/de/de/forum/thread/391210/Warum-Cyrket-down-ist?si=0 ) On 16 Jan., 15:37, Adrian Vintu adrianvi...@gmail.com wrote: androlib and androidzoom both do a cache of the Android Market. Aaik you do not need to create any new accounts on these 2 sites. BR, Adrian Vintu On 1/16/10, Adrian Vintu adrianvi...@gmail.com wrote: I usehttp://www.androidzoom.comThey update comments more often. BR, Adrian Vintu On 1/16/10, Al alcapw...@googlemail.com wrote: Androlib.com allows you to use this if you link an app to your account on their site. They keep a cache of comments and update it on a regular basis so the comments you see are not always the most recent ones, but it's the best alternative at this time. Martin wrote: No, I don't mean the comments I wrote for my program. I mean the comments of other users who rated my application. I just can see the german comments and every time I want to see other comments, I have to clear the Market-cache and change the locale on my phone. Is there a faster way to see comments from other countries? Greetings, Martin -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: I am a german market developer. How can I see the english comments to my program?
I use http://www.androidzoom.com They update comments more often. BR, Adrian Vintu On 1/16/10, Al alcapw...@googlemail.com wrote: Androlib.com allows you to use this if you link an app to your account on their site. They keep a cache of comments and update it on a regular basis so the comments you see are not always the most recent ones, but it's the best alternative at this time. Martin wrote: No, I don't mean the comments I wrote for my program. I mean the comments of other users who rated my application. I just can see the german comments and every time I want to see other comments, I have to clear the Market-cache and change the locale on my phone. Is there a faster way to see comments from other countries? Greetings, Martin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: I am a german market developer. How can I see the english comments to my program?
androlib and androidzoom both do a cache of the Android Market. Aaik you do not need to create any new accounts on these 2 sites. BR, Adrian Vintu On 1/16/10, Adrian Vintu adrianvi...@gmail.com wrote: I use http://www.androidzoom.com They update comments more often. BR, Adrian Vintu On 1/16/10, Al alcapw...@googlemail.com wrote: Androlib.com allows you to use this if you link an app to your account on their site. They keep a cache of comments and update it on a regular basis so the comments you see are not always the most recent ones, but it's the best alternative at this time. Martin wrote: No, I don't mean the comments I wrote for my program. I mean the comments of other users who rated my application. I just can see the german comments and every time I want to see other comments, I have to clear the Market-cache and change the locale on my phone. Is there a faster way to see comments from other countries? Greetings, Martin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Force locale for an application, bug in 2.0?
There is a bug when changing the Locale on the Motorola Milestone. The font gets smaller each time the updateConfiguration(...) is called. See here an article on this and the fix: http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu On Sun, Dec 27, 2009 at 11:13 PM, Evgeny V evgen...@gmail.com wrote: Yes. I added to each activity too after more tests! On Sun, Dec 27, 2009 at 9:47 PM, shomari nyuster...@gmail.com wrote: I've been looking for a long time at a solution to this problem (ever since 2.0 was released). I can confirm that by adding locale to configChanges fixes the problem. My exact xml entry is: android:configChanges=orientation|keyboardHidden|locale I've actually added the locale parameter to each of my Manfiest activities (to be safe), however, it did seem to fix the problem just by adding into the Launcher as mentioned before. So relieved to see this fixed :) S. On Nov 12, 2:31 pm, monmonja almondmend...@gmail.com wrote: Add android:configChanges=locale to your activity nodes on the manifest file activity android:name=.Main android:configChanges=locale android:label=@string/app_name / Update the post onhttp:// almondmendoza.com/2009/01/28/force-localize-an-application-on-... :) monmonja On Nov 10, 3:43 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: I don't think that the process is crashing, at least not in the emulator since I can see all these logging messages: 11-07 23:11:33.849: WARN/UsageStats(61): Something wrong here, didn't expect mypackagename to be resumed There are lots of them. It looks like it gets stuck in some kind of loop. Btw. It used to work, and I think it is great that it used to work. There are lots of people in the world who speak more than one language, where none of the languages are English, or they might understand English but have two other languages as preferred languages. Setting the OS locale to Swedish would make the application display the English resources if Swedish isn't available, but an application that I have installed might support e.g .Spanish, and that could be preferred over English. On 9 Nov, 22:15, Dianne Hackborn hack...@android.com wrote: No, changing the application's locale like this is not supported, and will not entirely work. It shouldn't cause an activity to restart though... actually I can't imagine how this would cause an activity to restart, since this method is much lower-level than the activity. Maybe the process is crashing for some reason in this call? 2009/11/9 Bahadır Yağan bahadir.ya...@gmail.com Does anyone know if this method of changing Locale just for one application is a supported functionality? -- Bahadır Yağan On Mon, Nov 9, 2009 at 12:18 PM, ydario mc6...@mclink.it wrote: Hi, found the same problem here. Even this kind of code fails: Configuration config = context.getResources().getConfiguration(); config.locale = newLocale; context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics()); where newLocale is a properly created locale instance. The strange thing is that I can get the above code to work when my wizard library is running; the library code does not implement a new activity, but simply uses the existing one. I compared code, but I cannot find other real differences. And I'm getting the resume problem also when I start an activity from a non-GUI class, this worked from 1.1 to 1.6 :-( Yuri -- 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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@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
[android-developers] changing Locale (updateConfiguration(...)) on Milestone makes the fonts smaller
Hi all, There is a bug when changing the Locale on the Motorola Milestone. The font gets smaller each time the updateConfiguration(...) is called. See here an article on this and the fix: http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx BR, Adrian Vintu -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HTTP Requests - can Android be identified?
Sure. You have to use the user agent. You have something like Mozilla/5.0 (Linux; U; Android 1.5; en-us; Galaxy Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 for Android and something like Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) from the normal Firefox browser. BR, Adrian Vintu On Tue, Jan 12, 2010 at 11:21 AM, Neilz neilhorn...@googlemail.com wrote: Hi all. Could a standard web server identify an HTTP request as coming from a normal browser, as opposed to an Android application? What could be different about the request that would enable the server to differentiate between the two, and modify the response accordingly? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] HTTP Requests - can Android be identified?
You can use Fiddler to take a peek at user agents. For example, an IE request for google looks like this: GET /csi?v=3s=webhpaction=e=17259,17291,23189ei=HE9MS66yO4WI_AaJrYXgDArt=prt.469,xjsls.750,xjses.1234,xjsee.1422,xjs.1453,ol.1828 HTTP/1.1 Accept: */* Referer: http://www.google.at/ Accept-Language: en-us,de-at;q=0.5 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) Accept-Encoding: gzip, deflate Host: www.google.at Connection: Keep-Alive Link is http://www.fiddler2.com/fiddler2/ BR, Adrian Vintu On Tue, Jan 12, 2010 at 11:28 AM, Adrian Vintu adrianvi...@gmail.comwrote: Sure. You have to use the user agent. You have something like Mozilla/5.0 (Linux; U; Android 1.5; en-us; Galaxy Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 for Android and something like Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) from the normal Firefox browser. BR, Adrian Vintu On Tue, Jan 12, 2010 at 11:21 AM, Neilz neilhorn...@googlemail.comwrote: Hi all. Could a standard web server identify an HTTP request as coming from a normal browser, as opposed to an Android application? What could be different about the request that would enable the server to differentiate between the two, and modify the response accordingly? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Alarm code source code
google for android-1.6_r1-donut-src.zip or go here http://code.google.com/p/android/issues/detail?id=979#c43 or here http://code.google.com/p/android/issues/detail?id=979#c52 BR, Adrian Vintu On Fri, Dec 4, 2009 at 11:18 AM, Andri Kurniawan andricl...@gmail.comwrote: thanks. but i have try it, and it doesn't work. i take the latest merge and i'm using sdk 1.6 r1. and one other thing, how can i download the project to windows platform? git only works for linux and mac T_T. i download it in old fashion way, one by one. 2009/12/4 Desu Vinod Kumar vinny.s...@gmail.com HI u can find here http://android.git.kernel.org/?p=platform/packages/apps/AlarmClock.git;a=summary On Fri, Dec 4, 2009 at 1:16 PM, Andri Kurniawan andricl...@gmail.comwrote: does any one knows where i can download a full source code of AlarmClock? cause i need to modify it for small screen resolution (320x240). the problem in small resolution is when i want to set the time, the time picker doesn't show perfectly , the number doesn't shown and the minus button too. thanks for your 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] what is FLV associated with?
Hi all, I can't seem to be able to play a FLV file on my Samsung Galaxy. Does anyone know why i need special software for that and also where to get it? Thank you, Adrian PS i suppose it's some proprietary thing, but why is it then playing in the browser? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Samsung Galaxy --- How to debug?
a cool trick on the galaxy is to dial *#*#9900#*#* to get the logs to the sdcard. from http://android-dls.com/wiki/index.php?title=Galaxy_Essentials On Mon, Nov 9, 2009 at 3:43 PM, joelt j...@harpsoft.com wrote: I have a user that says my application gives him an error on the Samsung Galaxy (it works fine one the G1). How can I debug this issue? Is there an accurate emulator/simulator? Can someone try it (Bendometer is the app)? Joel -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To 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] colored logcat for windows
Hi all, Jeff Sharkey made a nice app to highlight the logcat. It is really useful for debugging so be sure to check it out at a href=http://jsharkey.org/blog/2009/04/22/modifying-the-android- logcat-stream-for-full-color-debugging/http://jsharkey.org/blog/ 2009/04/22/modifying-the-android-logcat-stream-for-full-color- debugging//a The colored abd logcat idea was great so i decided to make a Windows port. Here a href=http://adrianvintu.com/blogengine/post/Colored-Logcat- Script-for-Windows.aspxhttp://adrianvintu.com/blogengine/post/Colored- Logcat-Script-for-Windows.aspx/a is the link to it. Best Redards, Adrian Vintu -- 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] colored logcat for windows
Hi all, Jeff Sharkey made a nice app to highlight the logcat. It is really useful for debugging so be sure to check it out at http://jsharkey.org/blog/2009/04/22/modifying-the-android-logcat-stream-for-full-color-debugging/ The colored abd logcat idea was great so i decided to make a Windows port. Here http://adrianvintu.com/blogengine/post/Colored-Logcat-Script-for-Windows.aspx is the link to it. Best Redards, Adrian Vintu -- 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