[android-beginners] Re: Simple Animation Code
On Aug 20, 11:33 am, Kingcrowley kingcrow...@gmail.com wrote: Weirdly if i press the home button, and then switch back to my app it reopens and the animation is then shown as running! Thanks, David hi, start your animation when view is already visible (not in onCreate) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Please help in creating simple text file
hello, I want to create a simple text file in data/data/com.my.package/files/ test.txt. My code is as follows: private String CreateFile(Context context){ try{ FileOutputStream fOut = context.openFileOutput (test.txt,MODE_WORLD_WRITEABLE); fOut.close(); return 1; } catch(Exception e){ return e.getMessage(); } } I tried MODE_WORLD_READABLE also, but still gives error like: data/data/com.my.package/files/test.txt can anyone please helpvery urgent Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please help in creating simple text file
nitin wrote: hello, I want to create a simple text file in data/data/com.my.package/files/ test.txt. My code is as follows: private String CreateFile(Context context){ try{ FileOutputStream fOut = context.openFileOutput (test.txt,MODE_WORLD_WRITEABLE); fOut.close(); return 1; } catch(Exception e){ return e.getMessage(); } } I tried MODE_WORLD_READABLE also, but still gives error like: data/data/com.my.package/files/test.txt That is not an error. Look at your Java stack trace to find the error. The Java stack trace can be obtained through adb logcat, DDMS, or the DDMS perspective in Eclipse. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[no subject]
http://sites.google.com/site/levitralipitor/11 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please help in creating simple text file
hello sir, thanks for quick response, I am new to android and self learner. how to see the adb logcat or in Eclipse. Is there something wrong in above code or some setting is required? please help, sample code will be useful. Thanks On Aug 21, 3:09 pm, Mark Murphy mmur...@commonsware.com wrote: nitin wrote: hello, I want to create a simple text file in data/data/com.my.package/files/ test.txt. My code is as follows: private String CreateFile(Context context){ try{ FileOutputStream fOut = context.openFileOutput (test.txt,MODE_WORLD_WRITEABLE); fOut.close(); return 1; } catch(Exception e){ return e.getMessage(); } } I tried MODE_WORLD_READABLE also, but still gives error like: data/data/com.my.package/files/test.txt That is not an error. Look at your Java stack trace to find the error. The Java stack trace can be obtained through adb logcat, DDMS, or the DDMS perspective in Eclipse. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Need Android talent? Ask on HADO!http://wiki.andmob.org/hado- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Simple Animation Code
Maybe i didn't explain it well enough.. The main.xml file is used already, so frame_animations_layout.xml is the layout for this, see below *** ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/imageView android:layout_width=fill_parent android:layout_height=wrap_content / /LinearLayout the imgview is not set up in onCreate but later on, David * On Aug 21, 9:47 am, skink psk...@gmail.com wrote: On Aug 20, 11:33 am, Kingcrowley kingcrow...@gmail.com wrote: Weirdly if i press the home button, and then switch back to my app it reopens and the animation is then shown as running! Thanks, David hi, start your animation when view is already visible (not in onCreate) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Please help in creating simple text file
nitin wrote: thanks for quick response, I am new to android and self learner. how to see the adb logcat or in Eclipse. http://developer.android.com/guide/developing/tools/ddms.html http://developer.android.com/guide/developing/tools/adb.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Flash based games on Android
I want to develop and application that will be a clone of flash based online game. I need to know what resources would i require as a beginner. I like to start off with small games. Please let let me know about tutorials, articles, books, etc. Thanks, Maxood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Flash based games on Android
Please also tell me how can i integrate a flash app on android. Can i do that in the first place. I have also come to know that android supports flash 10. On Aug 21, 6:45 pm, Maxood maqs...@salsoft.net wrote: I want to develop and application that will be a clone of flash based online game. I need to know what resources would i require as a beginner. I like to start off with small games. Please let let me know about tutorials, articles, books, etc. Thanks, Maxood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Flash based games on Android
The following links should help you get started on game development: Getting Started in Android Game Development http://www.rbgrn.net/content/54-getting-started-android-game-development Writing Real-Time Games for Android http://code.google.com/events/io/sessions/WritingRealTimeGamesAndroid.html -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 21, 6:45 am, Maxood maqs...@salsoft.net wrote: I want to develop and application that will be a clone of flash based online game. I need to know what resources would i require as a beginner. I like to start off with small games. Please let let me know about tutorials, articles, books, etc. Thanks, Maxood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Simple Animation Code
Kingcrowley wrote: the imgview is not set up in onCreate but later on, hmm, so you setVisibke(View.VISIBLE) and start() your animation on some external event, right? did you try to start() your animation in post's Runnable? post(new Runnable() {...}) pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: how to update a listview
What is the adapter class? For an ArrayAdapter, you don't need to call notifyDataSetChanged() unless you called setNotifyOnChange(false). Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 20, 5:40 am, Liviu Ungureanu smartli...@gmail.com wrote: Hi all! I have a ListView with and adapter extended from BaseAdapter. I insert some data in my list but when i try to insert an other item in list nothing happend. Can someone give me a ideea about updating listview data? this is the code: //insertData info_list.setCacheColorHint(Color.WHITE); info_list.setSelector(R.drawable.list_item_border); ItemInfo phone = new ItemInfo(this,R.drawable.phone,Phone,item.getPhoneFormatted()); ItemInfo address = new ItemInfo(this,R.drawable.address,Address,item.getAddress()); ItemInfo e_mail = new ItemInfo(this,R.drawable.email,E-mail,formatTextV2(item.getEMail())); ItemInfo web_site = new ItemInfo(this,R.drawable.website,Website,formatTextV2(item.getWebSite())) ; ItemInfo category = new ItemInfo(this,R.drawable.category,Category,item.getCategory()); adapter.addItemInfo(phone); adapter.addItemInfo(address); adapter.addItemInfo(e_mail); adapter.addItemInfo(web_site); adapter.addItemInfo(category); info_list.setAdapter(adapter); ///insertData //updateData button_prev.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Item item_received = ResultsActivity.getItemAt(current_index--); int i; adapter.update(0,item.getPhoneFormatted()); adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.address,Address,formatTextV2(item.g etAddress(; adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.email,E-mail,formatTextV2(item.getE Mail(; adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.website,Website,formatTextV2(item.g etWebSite(; adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.category,Category,item.getCategory( ))); adapter.notifyDataSetChanged(); } }); ///updateData Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] which package the function setSilent lived in ?
hi,all. the url http://developer.android.com/intl/zh-TW/guide/topics/data/data-storage.html at the first example . boolean silent = settings.getBoolean(silentMode, false); setSilent(silent); I can't find the function setSilent in the manual. who can tell me? thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Problem in opening the Stream
HI i m facing an urgent issue, as i tried to open the following URL through coding it gives me exception at OpenStream().. illegal Character at home index 0: the URL is: http://viralmesh_iphone.s3.amazonaws.com/lowURcholesterol/myplan.json i also tried to encode the URL bt no vail... here is my code also: URL httpURL = null; URLConnection con = null; httpURL = new URL(page_URL); con = httpURL.openConnection(); StringBuffer jsonText = new StringBuffer(readInputStreamData (con.getInputStream())); thnx in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Invalid apk file
I got this error, too, Could anyone help to give any comment ? Thanks ! On Aug 4, 10:02 pm, green charuj...@gmail.com wrote: Hello, I think I have read all threads related to this problem. So I have tried the locale stuff, deleted keystore file from .android directory etc...Please advise on getting rid of this problem: This is from my eclipse console on my Windows XP laptop. [2009-08-04 09:52:36 - Home] Uploading Home.apk onto device 'emulator-5554' [2009-08-04 09:52:36 - Home] Installing Home.apk... [2009-08-04 09:52:38 - Home] Installation failed due to invalid APK file! [2009-08-04 09:52:38 - Home] Please check logcat output for more details. [2009-08-04 09:52:38 - Home] Launch canceled! --- Here are the last few lines of adb logcat D/AndroidRuntime( 697): AndroidRuntime START D/AndroidRuntime( 697): CheckJNI is ON D/AndroidRuntime( 697): --- registering native functions --- I/jdwp ( 697): received file descriptor 20 from ADB I/zipro ( 568): Could not find end-of-central-directory in Zip D/asset ( 568): failed to open Zip archive '/data/app/ vmdl28216.tmp' W/PackageParser( 568): Unable to readAndroidManifest.xmlof /data/ app/vmdl28216.tmp W/PackageParser( 568):java.io.FileNotFoundException:AndroidManifest.xml W/PackageParser( 568): at android.content.res.AssetManager.openXmlAssetNative(Native Method) W/PackageParser( 568): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java: 471) W/PackageParser( 568): at android.content.res.AssetManager.openXmlResourceParser (AssetManager.java:439) W/PackageParser( 568): at android.content.pm.PackageParser.parsePackageName(PackageParser.java: 455) W/PackageParser( 568): at com.android.server.PackageManagerService.installPackageLI (PackageManagerService.java:3659) W/PackageParser( 568): at com.android.server.PackageManagerService.access$1500 (PackageManagerService.java:104) W/PackageParser( 568): at com.android.server.PackageManagerService $5.run(PackageManagerService.java:3236) W/PackageParser( 568): at android.os.Handler.handleCallback (Handler.java:587) W/PackageParser( 568): at android.os.Handler.dispatchMessage (Handler.java:92) W/PackageParser( 568): at android.os.Looper.loop(Looper.java:123) W/PackageParser( 568): at android.os.HandlerThread.run (HandlerThread.java:60) E/PackageManager( 568): Couldn't find a package name in : /data/app/ vmdl28216.tmp D/AndroidRuntime( 697): Shutting down VM D/dalvikvm( 697): DestroyJavaVM waiting for non-daemon threads to exit D/dalvikvm( 697): DestroyJavaVM shutting VM down D/dalvikvm( 697): HeapWorker thread shutting down D/dalvikvm( 697): HeapWorker thread has shut down D/jdwp ( 697): JDWP shutting down net... D/jdwp ( 697): +++ peer disconnected I/dalvikvm( 697): Debugger has detached; object registry had 1 entries D/dalvikvm( 697): VM cleaning up D/dalvikvm( 697): LinearAlloc 0x0 used 629572 of 4194304 (15%) D/dalvikvm( 568): GC freed 1585 objects / 89480 bytes in 171ms Help please... Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Intent-Filter for custom protocols
good morning :) i have a problem with registring a reciever as i wish :/ My Problem: there exist links like irc://someserver.org/channelXY. When I try to open them with the browser, i always get some kind of not found, page maybe moved ...-message. Now im wondering if its possible to fetch those url-calls to my own activity. First thought: registering an reciever in the manifest - like: receiver android:name=.URIProtocolHandler intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE/ category data android:scheme=irc/data /intent-filter /receiver URIProtocolHandler.java: [...imports] public class URIProtocolHandler extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent openSoundSettingsActivity = new Intent(context, ConnectScreen.class); context.startActivity(openSoundSettingsActivity); } } As far as I understood the concept, this should at least open the ConnectScreen-Activity. But - well - nothing happens - the browser is still showing the error screen. Maybe someone has an idea and can help me? I seem to be to tired to get it -.- Kind regards, avi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How do I implement the onClick method for a DialogPreference?
I have implemented onSharedPreferenceChanged in my Preference Activity, which works for other preference settings but it won't get triggered when I click on the DialogPreference. I have also tried to add set the OnPreferenceClickListener to the DialogPreference, which also works, but this gets triggered as soon as I click on the preference screen and not on one of the buttons in the actual dialog window. I would like to somehow implement the onClick method but don't know where to do this. public class Preferences extends PreferenceActivity implements OnSharedPreferenceChangeListener { private static final String LOG = test; private DialogPreference mfactory; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.preferences); mfactory = (DialogPreference)findPreference (pref_factory); mfactory.setOnPreferenceClickListener(new DialogPreference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { Log.i(LOG, onPreferenceClick1 entered); // TODO Auto-generated method stub return false; }}); } @Override protected void onResume() { super.onResume(); Log.i(LOG, onResume entered); // Add a Listener getPreferenceScreen().getSharedPreferences ().registerOnSharedPreferenceChangeListener(this); } @Override protected void onPause() { super.onPause(); Log.i(LOG, onPause entered); // Remove the Listener getPreferenceScreen().getSharedPreferences ().unregisterOnSharedPreferenceChangeListener(this); } public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { Log.i(LOG, onSharedPreferenceChanged entered); } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] System Privileges on emulator
Hi, There seems to be two levels of uses-permission, user level and system level. When I declare to use INTERNET or BATTERY_STATS, in my AndroidManifest.xml file it works without problem. However when I try to use INSTALL_PACKAGES, BIND_APPWIDGET it does not work. According to a [android-beginner msg11514], “Whoever signs the system is also going to need to sign any app that wants system privileges.” I need to know how do I get System Privileges while debugging my application on emulator. Thanks, Asad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: database openOrCreateDatabase
Hi, Am I missing something here or are you setting your database pointer to null and yet use it later on to crate/open your database ? Emre Date: Thu, 20 Aug 2009 16:08:35 -0700 Subject: [android-beginners] database openOrCreateDatabase From: gand...@gmail.com To: android-beginners@googlegroups.com Hi Guys, I am creating a new database, with a table and inserting some fields in it But I get the following error in opening or creating database. What am I missing ? Thanks a lot ERROR/Database(167): sqlite3_open_v2(data2, handle, 6, NULL) failed code follows.. public class DataBaseWork extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ArrayListString results = new ArrayListString(); SQLiteDatabase myDB = null; String MY_DATABASE_TABLE = t_Users; try { /* Create the Database (no Errors if it already exists) */ myDB.openOrCreateDatabase(data2, null); myDB.execSQL(CREATE TABLE IF NOT EXISTS + MY_DATABASE_TABLE + (LastName VARCHAR, FirstName VARCHAR, + Country VARCHAR, Age INT(3));); myDB.execSQL(INSERT INTO + MY_DATABASE_TABLE + (LastName, FirstName, Country, Age) + VALUES ('Ggg', 'Nn', 'G', 20);); } catch (SQLException e){ } if (myDB != null) myDB.close(); } } _ Stay on top of things, check email from other accounts! http://go.microsoft.com/?linkid=9671355 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] 'if' sentences please help
Hey everybody.. I'm just startet writing code for android.. And then I need to have some if-sentences.. (sorry for my english) they look like this @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Date dateDate = new Date(); String codedate = new SimpleDateFormat(ddMMyy).format (dateDate); if (codedate != 220809) {txtKommentar.setText (R.string.k220809);} if (codedate != 210809) {txtKommentar.setText (R.string.k210809);} if (codedate != 200809) {txtKommentar.setText (R.string.k200809);} if (codedate != 190809) {txtKommentar.setText (R.string.k190809);} } and if the 'codedate' has a value of '210809', it still does this:... txtKommentar.setText(R.string.k190809); ...like the 'codedate'-strings value was 190809.. what is wrong?. please help me.. i can't figure it out.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Need to implement Android for my website powered in PHP
I'm guessing the op wants to make their site mobile friendly. Just a hunch. Aa01 On Aug 19, 2:04 am, kapil1728 kapilcpk1...@gmail.com wrote: Hi, I need to make mywebsite developed in PHP(Linux server, MySQL) in android. How can I do it? Can anyone tell me the steps for it? Thanks Kapil1728 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] System Privileges on emulator
Hi, I'm developing my application in Android emulator. In file AndroidManifest.xml, when I declare uses-permission for INTERNET and BATTERY_STATS it works without problems. However when I try to use INSTALL_PACKAGES or BIND_APPWIDGET it does not work. These permissions don't even appear on package installer UI. According to thread http://www.mail-archive.com/android-beginners@googlegroups.com/msg11514.html INSTALL_PACKAGES belong to System Privileges. My question is how can my application get system privileges when working on emulator? Thanks, Asad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Key Value pair in a spinner
Hey, I was wondering how to put a string array in a spinner (I can, using the ArrayAdapter) but I also want to set keys for these also. But it seems that there's no constructors for that (I may be mistaken). I have 2 arrays: {5123, 7434, 7333, 7345 } and {City 1, City 2, City 3, City 4 }. Obviously, the spinner UI should show the name array of the cities, but in the backend (what's returned from the submission of the form is the value. Anyone knows how? // Put the array in the spinner ArrayAdapterString adapter = new ArrayAdapterString(this, android.R.layout.simple_spinner_item, cityNames); spinCities.setAdapter(adapter); While, I'm the subject of spinners: is there any resource on the internet describing every type of spinner layouts? I'm using simple_spinner_item but I find it too small. Any suggestions? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: INTERNET
If you use an emulator try to set your DNS when you start the emulator ./emulator -dns-server ip-address -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 20, 8:52 pm, Mitch besse...@gmail.com wrote: I'm not trying to use HTTP, the www.google.com was just a URL I knew would be able to respond. Turns out that if I replace the www.google.com with it's IP 74.125.53.105 then it works. Don't know why. I would like to get 2 android simulators talking so I can test 2 way communications with data. I haven't found out how to get 2 simulators up yet either. On Aug 19, 11:14 pm, Mitch besse...@gmail.com wrote: I would like to play around with sockets to see if I can get them to work, but I'm not having any luck. Here's what I tried: new Socket(www.google.com, 80); I've also tried new Socket(localhost, 7); but anything you can suggest that's simple is appreciated. I'm no socket expert so I'm not sure if these are considered simple examples. I read that I should add INTERNET permission to my manifest, so I did this too: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.kea android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.ServSock android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / uses-permission android:name=android.permission.INTERNET/uses- permission /manifest I'm just trying to learn so there's no real goal, just looking for a simple example that I can get working. Any hints what I'm missing? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How do I implement onClick for a DialogPreference?
I have a DialogPreference in my Preference Activity and would like to know which button was pressed. I have implemented the OnSharedPreferenceChangeListener which does not seem to get triggered when the DialogPreference is selected. I have also tried OnPreferenceClickListener but this gets triggered as soon as the DialogPreference is clicked from the main screen and not when one of the actual dialog buttons was pressed. was. So I think I need to implement onClick for this dialog but I am not sure where to do this. public class Preferences extends PreferenceActivity implements OnSharedPreferenceChangeListener { private static final String LOG = test; private DialogPreference mfactory; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.preferences); mfactory = (DialogPreference)findPreference(pref_factory); mfactory.setOnPreferenceClickListener(new DialogPreference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { Log.i(LOG, onPreferenceClick1 entered); // TODO Auto-generated method stub return false; }}); } @Override protected void onResume() { super.onResume(); Log.i(LOG, onResume entered); // Add a Listener getPreferenceScreen().getSharedPreferences ().registerOnSharedPreferenceChangeListener(this); } @Override protected void onPause() { super.onPause(); Log.i(LOG, onPause entered); // Remove the Listener getPreferenceScreen().getSharedPreferences ().unregisterOnSharedPreferenceChangeListener(this); } public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { Log.i(LOG, onSharedPreferenceChanged entered); if (key.contains(seekbar)) { } } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Simple Animation Code
thx.I will try it. 在 2009/8/21 02:23 時, skink 寫到: On Aug 20, 11:33 am, Kingcrowley kingcrow...@gmail.com wrote: Weirdly if i press the home button, and then switch back to my app it reopens and the animation is then shown as running! Thanks, David hi, start your animation when view is already visible (not in onCreate) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Android SDK For Beginners?
Hello, my name is Zack but I go by Azelis. Introduction's out of the way, let's get down to it. From my history of programming, I know that languages based on other languages only make sense if you have extensive background. For example when I started learning NQC for the Mindstorms Invention System it was recommended that I take some C++ tutorials first. However most of these provided me with information I would never need to know (system speciffic stuff). That brings me to where I find myself. Within a week I will be receiving my G1 and I am very interested in programming for it. I have a great amount of programming experience as follows (in chronological order): AppleSoft Integer Basic QBASIC JavaScript Visual Basic Visual C++ TI89 Basic PHP Linden Scripting Language and recently a bit of ASM Basically, with my use of JS and PHP, I am no stranger to the DOM. However I found even the Hello Android tutorial a little difficult to follow, using data types, methods, models, and terms I was unfamiliar with (not to mention that I've never worked with XML, only style sheets). While I was able to kind of understand what was going on, by the time I got to the notepad example I was completely lost. Let me also qualify that I tried learning Java once before to create website applets (yeah, back in those olden days) and most tutorials I found convered very speciffic information that I really didn't need to know. So given my experience with outside tutorials that are only of peripheral interest to me and the knowledge that Android doesn't use the everyday flavor Java VM, is there a Java for Android for Beginners style reference anywhere? Barring that, is there a tutorial/set of tutorials anyone else who was in my position can recommend? Android may very well be the first place solo programmers like myself have a chance to create mainstream popular mobile applications so if such a reference doesn't exist I may well have to spearhead it. - Azelis the White Wolf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Attn Google: How about throwing a beta release of Android 2.0 SDK?
Why isn't Google releasing a beta version of Android 2.0 SDK for developers? Don't the folks at The Weather Channel already have it? It would be nice if developers have the option of working on 1.5 or 2.0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: AlertDialog text input problem
This works for me for an EditText as well. But when I try the same code for a Spinner I receive a NullPointerException. Both views are in the same Layout and both views have got an id. Actually, it is exactly the same code except the kind of the view. Any idea why I got this exception? Thanks On 24 Jul., 23:08, Jason Van Anden jason.van.an...@gmail.com wrote: That was it. Hopefully this post will help others. I could not find a good example of using AlertDialog for text input. The API Demos example does not show how to return the text! Thanks again Mark! Jason Van Anden On Fri, Jul 24, 2009 at 4:55 PM, Mark Murphy mmur...@commonsware.comwrote: Jason Van Anden wrote: I am having a problem using AlertDialog for input text. Code follows ... everything appears on screen as it should until I click OK - then I get a force close. I get a null error on line where Editable e = et.getText();. Second set of eyes and a sturdy brain appreciated... private void enter_search(){ LayoutInflater factory = LayoutInflater.from(this); final View textEntryView = factory.inflate(R.layout.search_dialog, null); new AlertDialog.Builder(Peeps.this) //.setIcon(R.drawable.alert_dialog_icon) .setTitle(R.string.search_dialog_text_entry) .setView(textEntryView) .setPositiveButton(R.string.search_dialog_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { EditText et = (EditText)findViewById(R.id.search_edit); // !!! apparently I am doing this wrong! I am assuming R.id.search_edit is a field in the textEntryView you supplied to the builder. In that case, try textEntryView.findViewById(R.id.search_edit). -- Mark Murphy (a Commons Guy) http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How can I download a file from the internet?
I want my application to download an update file e.g. http://www.mysite.com/updates/data.txt Also, what do I need to add to the manifest? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: NullPointerException with autocomplete in layout
I get the same thing... any solutions yet? On Aug 4, 9:34 am, phill ph...@mizzymead.com wrote: When I open the sample autocomplete_1.xml in eclipse and view in layout mode the screen is gray with the message NullPointerException: null It does the same if I create a layout and add an AutoCompleteTextView item. I am using Galileo (3.5) and the latest sdk (just downloaded it). Is this a fault or have I got something setup wrong. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] toggle background of an ImageView
Hi there, I want to determine if a particular background png is being used by an imageview at a particular time and want to execute some action based on the boolean result? How can I determine the current background resource? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android 1.5 - getNeighboringCellInfo() always returns 0 neighboring cells
Try selecting Use only 2G Networks in Settings-Wireless Controls- Mobile Networks. The getNeighboringCellInfo method only seems to be populated when on 2G for me. On 3G it is empty though the data must be in the radio stack. I'm using an ADP1 and 1.5 firmware. On Jul 7, 2:13 pm, kevink kevin.kir...@gmail.com wrote: Has anyone been able to retrieve the neighbor cell information using a G1 or ADP phone? I'm using android-sdk-linux_x86-1.5_r2 and compiling against API level 3 (Android 1.5). The application builds correctly but every time I request the neighboring cells as listed below, it returns a list of 0 neighbors. If I look at the radio log buffer, I can see the request being made to the RIL layer. Is anyone else seeing this? Here are the permissions in AndroidManifest.xml uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION/uses- permission uses-permission android:name=android.permission.ACCESS_LOCATION_EXTRA_COMMANDS/ uses-permission uses-permission android:name=android.permission.ACCESS_COARSE_UPDATES/uses- permission uses-permission android:name=android.permission.READ_PHONE_STATE/ uses-permission Here is the code: // Retrieve the telephony manager mTelephonyManager = (TelephonyManager)getSystemService (Context.TELEPHONY_SERVICE); // Get the neighbor cell information ArrayListNeighboringCellInfo neighbors = (ArrayListNeighboringCellInfo) mTelephonyManager.getNeighboringCellInfo(); Log.d(TAG, Number Of Neighbors: + neighbors.size()); // Print out the neighbor cells for (NeighboringCellInfoneighboringCellInfo: neighbors) { Log.d(TAG, NeighborCell: +neighboringCellInfo); } Any help would be greatly appreciated! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How do I implement onClick for a DialogPreference?
Looking around the source I think I found what I was looking for. I assume that I need to implement onDialogClosed from DialogPreference.java. But to do this do I need to create a new class say MyDialogPreference or is there a way to just implement that method in the class below? On Aug 20, 3:55 pm, Nick nick.vers...@gmail.com wrote: I have a DialogPreference in my Preference Activity and would like to know which button was pressed. I have implemented the OnSharedPreferenceChangeListener which does not seem to get triggered when the DialogPreference is selected. I have also tried OnPreferenceClickListener but this gets triggered as soon as the DialogPreference is clicked from the main screen and not when one of the actual dialog buttons was pressed. was. So I think I need to implement onClick for this dialog but I am not sure where to do this. public class Preferences extends PreferenceActivity implements OnSharedPreferenceChangeListener { private static final String LOG = test; private DialogPreference mfactory; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.preferences); mfactory = (DialogPreference)findPreference(pref_factory); mfactory.setOnPreferenceClickListener(new DialogPreference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { Log.i(LOG, onPreferenceClick1 entered); // TODO Auto-generated method stub return false; }}); } @Override protected void onResume() { super.onResume(); Log.i(LOG, onResume entered); // Add a Listener getPreferenceScreen().getSharedPreferences ().registerOnSharedPreferenceChangeListener(this); } @Override protected void onPause() { super.onPause(); Log.i(LOG, onPause entered); // Remove the Listener getPreferenceScreen().getSharedPreferences ().unregisterOnSharedPreferenceChangeListener(this); } public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { Log.i(LOG, onSharedPreferenceChanged entered); if (key.contains(seekbar)) { } } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android SDK For Beginners?
Hi Azelis and welcome to Android development! :) I'm pretty much new to programming. Android is my first software development experience aside from some relational database stuff I did years ago. I pretty much had to start learning from scratch several months ago. The first recommendation I have for you is to learn Java. I took this free online course: http://www.javapassion.com/javaintro/ I was new to both java and xml, but I found the xml easier to pick up than the java. Your C++ experience will help you learn the java faster I think. I also read this free Android development PDF book: http://andbook.anddev.org/ Which started to fill in a lot of the blanks for me about Android development. And I purchased the Professional Android Application Development paperback after browsing Android coding books at the local book store (so far it's my fav Android coding book). I still have lots more to learn, but I am on my 3rd or 4th app and I'm really enjoying developing for Android. I also made good use of this group, so I encourage you to also. Good luck! -- tinyang -Original Message- From: android-beginners@googlegroups.com [mailto:android-beginn...@googlegroups.com] On Behalf Of Azelis DeLano Sent: Friday, August 21, 2009 3:22 AM To: Android Beginners Subject: [android-beginners] Android SDK For Beginners? Hello, my name is Zack but I go by Azelis. Introduction's out of the way, let's get down to it. From my history of programming, I know that languages based on other languages only make sense if you have extensive background. For example when I started learning NQC for the Mindstorms Invention System it was recommended that I take some C++ tutorials first. However most of these provided me with information I would never need to know (system speciffic stuff). That brings me to where I find myself. Within a week I will be receiving my G1 and I am very interested in programming for it. I have a great amount of programming experience as follows (in chronological order): AppleSoft Integer Basic QBASIC JavaScript Visual Basic Visual C++ TI89 Basic PHP Linden Scripting Language and recently a bit of ASM Basically, with my use of JS and PHP, I am no stranger to the DOM. However I found even the Hello Android tutorial a little difficult to follow, using data types, methods, models, and terms I was unfamiliar with (not to mention that I've never worked with XML, only style sheets). While I was able to kind of understand what was going on, by the time I got to the notepad example I was completely lost. Let me also qualify that I tried learning Java once before to create website applets (yeah, back in those olden days) and most tutorials I found convered very speciffic information that I really didn't need to know. So given my experience with outside tutorials that are only of peripheral interest to me and the knowledge that Android doesn't use the everyday flavor Java VM, is there a Java for Android for Beginners style reference anywhere? Barring that, is there a tutorial/set of tutorials anyone else who was in my position can recommend? Android may very well be the first place solo programmers like myself have a chance to create mainstream popular mobile applications so if such a reference doesn't exist I may well have to spearhead it. - Azelis the White Wolf No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/20/2009 6:06 PM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Breaking up Activity classes
As I'm learning about Activities and the components they contain I am wanting to break things up into components. Is there any list of guidelines / commonly used organization of Activity classes? As I add functionality to my apps, things like context menus, options menus, and references to view objects in from resources, my class starts to look really ugly. I have done a lot of .net programming, so at first I wanted to start making partial class declarations in different files but found out java doesn't support this. Are activity classes generally ugly or is there a common way that pro developers compartmentalize things in their activity classes? Thanks for any helpful info, Greg Hedin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android SDK For Beginners?
Azelis DeLano wrote: So given my experience with outside tutorials that are only of peripheral interest to me and the knowledge that Android doesn't use the everyday flavor Java VM, is there a Java for Android for Beginners style reference anywhere? Most of the books/tutorials that I have seen assume some level of Java experience. You don't need tons of Java to get going with Android, but you do need to know Java's take on OO (classes, objects, inheritance, polymorphism), popular classes in java.lang/java.io/java.util, etc. Conversely, things you specifically don't need to know include: -- any existing Java UI framework (Swing, SWT, JavaME) or widget libraries for those frameworks (Glazed Lists, etc.) -- any server-side Java frameworks (JavaEE, servlets, etc.) -- JDBC (Android ships with SQLite and has a thin non-JDBC interface to it) -- the enterprise-y frameworks (JAX-this, WS-that, etc.) The API reference (a.k.a., class library) on the Android developer site and in the SDK is the definitive list of what is built into Android and is accessible from your projects: http://developer.android.com/reference/packages.html Barring that, is there a tutorial/set of tutorials anyone else who was in my position can recommend? For Java? Personally, I learned it so long ago that I haven't used much of the current resources. _Head First Java_ is pretty popular in terms of Java books. For Android, there are number of books on the market: http://wiki.andmob.org/books (and, yes, I wrote some of 'em) Tutorials are mostly in blog posts, plus sites like AndroidSnippets. I have a handful of them aggregated here: http://wiki.andmob.org/samplecode Android may very well be the first place solo programmers like myself have a chance to create mainstream popular mobile applications so if such a reference doesn't exist I may well have to spearhead it. Sounds great! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: ListView with addHeaderView Example?
Finally figured it all out. Here is the final code extended from ListActivity. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/tvHeader android:layout_width=fill_parent android:layout_height=wrap_content android:text=Hello List Activity/ ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout public class HelloListActivity extends ListActivity { private TextView tv; private TextView tp; private ListView lv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv = (TextView) findViewById(R.id.tvHeader); tp = new TextView(this); tp.setText(Top of the list); getListView().addHeaderView(tp); setListAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_1, COUNTRIES)); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { // TODO Auto-generated method stub super.onListItemClick(l, v, position, id); String temp = l.getItemAtPosition(position).toString(); Toast.makeText(HelloListActivity.this, temp, Toast.LENGTH_SHORT).show (); } static final String[] COUNTRIES = new String[] { Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina }; } On Aug 17, 12:55 am, chinchin nchinn...@googlemail.com wrote: Hello, I'm trying to modify the HelloListView example to useaddHeaderViewor addFooterView. Unfortunately I am unable to get this working. Is anyone able to provide any help? Here is my code, thanks in advance. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/textDisplay android:layout_width=fill_parent android:layout_height=wrap_content android:text=Hello! / /LinearLayout public class HelloListView extends ListActivity { private TextView test; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); test = (TextView) findViewById(R.id.textDisplay); getListView().addHeaderView(test); setListAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_1, COUNTRIES)); getListView().setTextFilterEnabled(true); } static final String[] COUNTRIES = new String[] { Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina }; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android SDK For Beginners?
I have actually found a resource that is working well for me. It's a book called The Busy Coder's guide to Android. This explains a lot more (although not everything) and I find myself starting to learn how things work. I did go through andbook and found it to be either badly typed or mis-translated and very lacking in explanations and examples (I got the latest version right off the site). Also it ends very abruptly leading me to believe it has not even been proof read yet, let alone finished. Basically, while I am finding the resources and examples I need, I do feel my situation is still fairly common and since my position has often been the guy who stumbles along and then teaches others once he figures it out, I expect I'll be creating or helping to create total beginners' content once I get going. On Fri, Aug 21, 2009 at 3:10 PM, Mark Murphy mmur...@commonsware.comwrote: Azelis DeLano wrote: So given my experience with outside tutorials that are only of peripheral interest to me and the knowledge that Android doesn't use the everyday flavor Java VM, is there a Java for Android for Beginners style reference anywhere? Most of the books/tutorials that I have seen assume some level of Java experience. You don't need tons of Java to get going with Android, but you do need to know Java's take on OO (classes, objects, inheritance, polymorphism), popular classes in java.lang/java.io/java.util, etc. Conversely, things you specifically don't need to know include: -- any existing Java UI framework (Swing, SWT, JavaME) or widget libraries for those frameworks (Glazed Lists, etc.) -- any server-side Java frameworks (JavaEE, servlets, etc.) -- JDBC (Android ships with SQLite and has a thin non-JDBC interface to it) -- the enterprise-y frameworks (JAX-this, WS-that, etc.) The API reference (a.k.a., class library) on the Android developer site and in the SDK is the definitive list of what is built into Android and is accessible from your projects: http://developer.android.com/reference/packages.html Barring that, is there a tutorial/set of tutorials anyone else who was in my position can recommend? For Java? Personally, I learned it so long ago that I haven't used much of the current resources. _Head First Java_ is pretty popular in terms of Java books. For Android, there are number of books on the market: http://wiki.andmob.org/books (and, yes, I wrote some of 'em) Tutorials are mostly in blog posts, plus sites like AndroidSnippets. I have a handful of them aggregated here: http://wiki.andmob.org/samplecode Android may very well be the first place solo programmers like myself have a chance to create mainstream popular mobile applications so if such a reference doesn't exist I may well have to spearhead it. Sounds great! -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Breaking up Activity classes
Greg Hedin wrote: Are activity classes generally ugly or is there a common way that pro developers compartmentalize things in their activity classes? I code in Ruby when I'm not working on Android. All Java code is ugly. ;-) There are many patterns you can use to help organize an activity. Here are two that I use, for what that's worth: 1. I sometimes break out the code that binds data to Views for rows in a ListView into a separate wrapper class, as described here: http://commonsware.com/Android/excerpt.pdf 2. I tend to break out my listeners and callback objects into private anonymous inner classes: private View.OnClickListener onButton=new View.OnClickListener() { public void onClick(View thingThatWentClick) { // something almost intelligent here } }; (then use button.setOnClickListener(onButton); in onCreate() or something) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: database openOrCreateDatabase
Emre Now I am using myDB = openOrCreateDatabase(data2, SQLiteDatabase.CREATE_IF_NECESSARY, null); before I was doing myDB = null; myDB.openOrCreateDatabase(data2, null); which was absurd Have to initialize myDB as the prototype of openOrCreateDatabase has the return as static On Aug 20, 4:53 pm, Emre A. Yavuz eayl...@hotmail.com wrote: Hi, Am I missing something here or are you setting your database pointer to null and yet use it later on to crate/open your database ? Emre Date: Thu, 20 Aug 2009 16:08:35 -0700 Subject: [android-beginners] database openOrCreateDatabase From: gand...@gmail.com To: android-beginners@googlegroups.com Hi Guys, I am creating a new database, with a table and inserting some fields in it But I get the following error in opening or creating database. What am I missing ? Thanks a lot ERROR/Database(167): sqlite3_open_v2(data2, handle, 6, NULL) failed code follows.. public class DataBaseWork extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ArrayListString results = new ArrayListString(); SQLiteDatabase myDB = null; String MY_DATABASE_TABLE = t_Users; try { /* Create the Database (no Errors if it already exists) */ myDB.openOrCreateDatabase(data2, null); myDB.execSQL(CREATE TABLE IF NOT EXISTS + MY_DATABASE_TABLE + (LastName VARCHAR, FirstName VARCHAR, + Country VARCHAR, Age INT(3));); myDB.execSQL(INSERT INTO + MY_DATABASE_TABLE + (LastName, FirstName, Country, Age) + VALUES ('Ggg', 'Nn', 'G', 20);); } catch (SQLException e){ } if (myDB != null) myDB.close(); } } _ Stay on top of things, check email from other accounts!http://go.microsoft.com/?linkid=9671355 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android SDK For Beginners?
Zack, By reading your post I realized its not a perfect world. May be you can bring perfection to Android tutorials to start with On Aug 21, 3:20 pm, Zack Podany azelisw...@gmail.com wrote: I have actually found a resource that is working well for me. It's a book called The Busy Coder's guide to Android. This explains a lot more (although not everything) and I find myself starting to learn how things work. I did go through andbook and found it to be either badly typed or mis-translated and very lacking in explanations and examples (I got the latest version right off the site). Also it ends very abruptly leading me to believe it has not even been proof read yet, let alone finished. Basically, while I am finding the resources and examples I need, I do feel my situation is still fairly common and since my position has often been the guy who stumbles along and then teaches others once he figures it out, I expect I'll be creating or helping to create total beginners' content once I get going. On Fri, Aug 21, 2009 at 3:10 PM, Mark Murphy mmur...@commonsware.comwrote: Azelis DeLano wrote: So given my experience with outside tutorials that are only of peripheral interest to me and the knowledge that Android doesn't use the everyday flavor Java VM, is there a Java for Android for Beginners style reference anywhere? Most of the books/tutorials that I have seen assume some level of Java experience. You don't need tons of Java to get going with Android, but you do need to know Java's take on OO (classes, objects, inheritance, polymorphism), popular classes in java.lang/java.io/java.util, etc. Conversely, things you specifically don't need to know include: -- any existing Java UI framework (Swing, SWT, JavaME) or widget libraries for those frameworks (Glazed Lists, etc.) -- any server-side Java frameworks (JavaEE, servlets, etc.) -- JDBC (Android ships with SQLite and has a thin non-JDBC interface to it) -- the enterprise-y frameworks (JAX-this, WS-that, etc.) The API reference (a.k.a., class library) on the Android developer site and in the SDK is the definitive list of what is built into Android and is accessible from your projects: http://developer.android.com/reference/packages.html Barring that, is there a tutorial/set of tutorials anyone else who was in my position can recommend? For Java? Personally, I learned it so long ago that I haven't used much of the current resources. _Head First Java_ is pretty popular in terms of Java books. For Android, there are number of books on the market: http://wiki.andmob.org/books (and, yes, I wrote some of 'em) Tutorials are mostly in blog posts, plus sites like AndroidSnippets. I have a handful of them aggregated here: http://wiki.andmob.org/samplecode Android may very well be the first place solo programmers like myself have a chance to create mainstream popular mobile applications so if such a reference doesn't exist I may well have to spearhead it. Sounds great! -- Mark Murphy (a Commons Guy) http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: 'if' sentences please help
This is a Java mistake that is common. By common I mean one I make all the frickin time. You should use String.equals() instead, like if (!codedate.equals(220809)) { If you just use the != operator then the JVM will compare the string pointer addresses, not their values. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 21, 5:00 am, GlennovitS glennov...@gmail.com wrote: Hey everybody.. I'm just startet writing code for android.. And then I need to have some if-sentences.. (sorry for my english) they look like this @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Date dateDate = new Date(); String codedate = new SimpleDateFormat(ddMMyy).format (dateDate); if (codedate != 220809) {txtKommentar.setText (R.string.k220809);} if (codedate != 210809) {txtKommentar.setText (R.string.k210809);} if (codedate != 200809) {txtKommentar.setText (R.string.k200809);} if (codedate != 190809) {txtKommentar.setText (R.string.k190809);} } and if the 'codedate' has a value of '210809', it still does this:... txtKommentar.setText(R.string.k190809); ...like the 'codedate'-strings value was 190809.. what is wrong?. please help me.. i can't figure it out.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android SDK For Beginners?
Hmm, I wanted to add that the book I referenced has errors in it. I'm working on the relative alignment section and it references android:layout_toRight when it should be toRightOf. I tried it in both 1.1 and 1.5 to be sure, and I double checked the example. Oh well, pressing on. I did notice in an article elsewhere that it is possible to actually replace the Android main UI, and I've seen videos supposedly of doing this. Are there any guides on doing that? I've set myself a lofty goal for my first complete project. Not that I necessarily feel the need to replace the default UI, I just want to do it so that I know I can do it. Also I'm a fan of Hitchhiker's Guide to the Galaxy. On Fri, Aug 21, 2009 at 5:31 PM, gandor gand...@gmail.com wrote: Zack, By reading your post I realized its not a perfect world. May be you can bring perfection to Android tutorials to start with On Aug 21, 3:20 pm, Zack Podany azelisw...@gmail.com wrote: I have actually found a resource that is working well for me. It's a book called The Busy Coder's guide to Android. This explains a lot more (although not everything) and I find myself starting to learn how things work. I did go through andbook and found it to be either badly typed or mis-translated and very lacking in explanations and examples (I got the latest version right off the site). Also it ends very abruptly leading me to believe it has not even been proof read yet, let alone finished. Basically, while I am finding the resources and examples I need, I do feel my situation is still fairly common and since my position has often been the guy who stumbles along and then teaches others once he figures it out, I expect I'll be creating or helping to create total beginners' content once I get going. On Fri, Aug 21, 2009 at 3:10 PM, Mark Murphy mmur...@commonsware.com wrote: Azelis DeLano wrote: So given my experience with outside tutorials that are only of peripheral interest to me and the knowledge that Android doesn't use the everyday flavor Java VM, is there a Java for Android for Beginners style reference anywhere? Most of the books/tutorials that I have seen assume some level of Java experience. You don't need tons of Java to get going with Android, but you do need to know Java's take on OO (classes, objects, inheritance, polymorphism), popular classes in java.lang/java.io/java.util, etc. Conversely, things you specifically don't need to know include: -- any existing Java UI framework (Swing, SWT, JavaME) or widget libraries for those frameworks (Glazed Lists, etc.) -- any server-side Java frameworks (JavaEE, servlets, etc.) -- JDBC (Android ships with SQLite and has a thin non-JDBC interface to it) -- the enterprise-y frameworks (JAX-this, WS-that, etc.) The API reference (a.k.a., class library) on the Android developer site and in the SDK is the definitive list of what is built into Android and is accessible from your projects: http://developer.android.com/reference/packages.html Barring that, is there a tutorial/set of tutorials anyone else who was in my position can recommend? For Java? Personally, I learned it so long ago that I haven't used much of the current resources. _Head First Java_ is pretty popular in terms of Java books. For Android, there are number of books on the market: http://wiki.andmob.org/books (and, yes, I wrote some of 'em) Tutorials are mostly in blog posts, plus sites like AndroidSnippets. I have a handful of them aggregated here: http://wiki.andmob.org/samplecode Android may very well be the first place solo programmers like myself have a chance to create mainstream popular mobile applications so if such a reference doesn't exist I may well have to spearhead it. Sounds great! -- Mark Murphy (a Commons Guy) http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Attn Google: How about throwing a beta release of Android 2.0 SDK?
You can always download the source and build it yourself... On Aug 21, 2009 12:31 PM, androidgoo androidf...@gmail.com wrote: Why isn't Google releasing a beta version of Android 2.0 SDK for developers? Don't the folks at The Weather Channel already have it? It would be nice if developers have the option of working on 1.5 or 2.0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: 'if' sentences please help
On Fri, Aug 21, 2009 at 2:00 PM, GlennovitS glennov...@gmail.com wrote: Hey everybody.. I'm just startet writing code for android.. And then I need to have some if-sentences.. (sorry for my english) they look like this @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Date dateDate = new Date(); String codedate = new SimpleDateFormat(ddMMyy).format (dateDate); if (codedate != 220809) {txtKommentar.setText (R.string.k220809);} if (codedate != 210809) {txtKommentar.setText (R.string.k210809);} if (codedate != 200809) {txtKommentar.setText (R.string.k200809);} if (codedate != 190809) {txtKommentar.setText (R.string.k190809);} } and if the 'codedate' has a value of '210809', it still does this:... txtKommentar.setText(R.string.k190809); ...like the 'codedate'-strings value was 190809.. what is wrong?. please help me.. i can't figure it out.. just wondering, if codedate=210809 wont that make all the other if statements valid? and in that case 190809 is the last one to set the text --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Attn Google: How about throwing a beta release of Android 2.0 SDK?
And there's no Android 2.0 SDK... The next version is 1.6. On Fri, Aug 21, 2009 at 5:34 PM, Justin Andersonjanderson@gmail.com wrote: You can always download the source and build it yourself... On Aug 21, 2009 12:31 PM, androidgoo androidf...@gmail.com wrote: Why isn't Google releasing a beta version of Android 2.0 SDK for developers? Don't the folks at The Weather Channel already have it? It would be nice if developers have the option of working on 1.5 or 2.0. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: database openOrCreateDatabase
I don't know what's causing the error in your code but it seems like you are using an older version of Android (maybe older than 1.0). I would recommend upgrading your Android SDK and using the method suggested in this link: http://moazzam-khan.com/blog/?cat=26paged=2 . - Moazzam http://moazzam-khan.com/ On Aug 21, 5:59 pm, gandor gand...@gmail.com wrote: Emre Now I am using myDB = openOrCreateDatabase(data2, SQLiteDatabase.CREATE_IF_NECESSARY, null); before I was doing myDB = null; myDB.openOrCreateDatabase(data2, null); which was absurd Have to initialize myDB as the prototype of openOrCreateDatabase has the return as static On Aug 20, 4:53 pm, Emre A. Yavuz eayl...@hotmail.com wrote: Hi, Am I missing something here or are you setting your database pointer to null and yet use it later on to crate/open your database ? Emre Date: Thu, 20 Aug 2009 16:08:35 -0700 Subject: [android-beginners] database openOrCreateDatabase From: gand...@gmail.com To: android-beginners@googlegroups.com Hi Guys, I am creating a new database, with a table and inserting some fields in it But I get the following error in opening or creating database. What am I missing ? Thanks a lot ERROR/Database(167): sqlite3_open_v2(data2, handle, 6, NULL) failed code follows.. public class DataBaseWork extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ArrayListString results = new ArrayListString(); SQLiteDatabase myDB = null; String MY_DATABASE_TABLE = t_Users; try { /* Create the Database (no Errors if it already exists) */ myDB.openOrCreateDatabase(data2, null); myDB.execSQL(CREATE TABLE IF NOT EXISTS + MY_DATABASE_TABLE + (LastName VARCHAR, FirstName VARCHAR, + Country VARCHAR, Age INT(3));); myDB.execSQL(INSERT INTO + MY_DATABASE_TABLE + (LastName, FirstName, Country, Age) + VALUES ('Ggg', 'Nn', 'G', 20);); } catch (SQLException e){ } if (myDB != null) myDB.close(); } } _ Stay on top of things, check email from other accounts!http://go.microsoft.com/?linkid=9671355 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: how to update a listview
You have to change the data structure that stores the data for the listView and then call notifyDataSetChange(); Let;s say you are using and ArrayListString lst, you would do something like this: public void getRemoteData() { // .. get data and put it in the array list adapter.notifyDataSetChange(); } And, it will update itself. Hope it made sense and helped :) - Moazzam http://moazzam-khan.com/ On Aug 21, 1:31 pm, Yusuf Saib (T-Mobile USA) yusuf.s...@t- Mobile.com wrote: What is the adapter class? For an ArrayAdapter, you don't need to call notifyDataSetChanged() unless you called setNotifyOnChange(false). Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 20, 5:40 am, Liviu Ungureanu smartli...@gmail.com wrote: Hi all! I have a ListView with and adapter extended from BaseAdapter. I insert some data in my list but when i try to insert an other item in list nothing happend. Can someone give me a ideea about updating listview data? this is the code: //insertData info_list.setCacheColorHint(Color.WHITE); info_list.setSelector(R.drawable.list_item_border); ItemInfo phone = new ItemInfo(this,R.drawable.phone,Phone,item.getPhoneFormatted()); ItemInfo address = new ItemInfo(this,R.drawable.address,Address,item.getAddress()); ItemInfo e_mail = new ItemInfo(this,R.drawable.email,E-mail,formatTextV2(item.getEMail())); ItemInfo web_site = new ItemInfo(this,R.drawable.website,Website,formatTextV2(item.getWebSite())) ; ItemInfo category = new ItemInfo(this,R.drawable.category,Category,item.getCategory()); adapter.addItemInfo(phone); adapter.addItemInfo(address); adapter.addItemInfo(e_mail); adapter.addItemInfo(web_site); adapter.addItemInfo(category); info_list.setAdapter(adapter); ///insertData //updateData button_prev.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Item item_received = ResultsActivity.getItemAt(current_index--); int i; adapter.update(0,item.getPhoneFormatted()); adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.address,Address,formatTextV2(item.g etAddress(; adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.email,E-mail,formatTextV2(item.getE Mail(; adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.website,Website,formatTextV2(item.g etWebSite(; adapter.addItemInfo(new ItemInfo(TestActivity.this,R.drawable.category,Category,item.getCategory( ))); adapter.notifyDataSetChanged(); } }); ///updateData Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---