[android-beginners] Layout of webview
hi, The webview demo at http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Samples/WebViewDemo does not take the full screen on my WVGA (480x800) device. Do you know how to make this occupy the available screen? Attached screenshot. Thanks, Zaheer -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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 attachment: device.png
[android-beginners] Problem with httpclient and self-signed certificates.
Hi, I am sure this has been discussed in this group, but I couldn't find that thread, so bear with it, or if possible merge it with the original. I am using httpclient for my android app and I have a local site which has a few https pages. Since default httpclient doesnot allow self- signed certificates I am using EasySSLFactory and EasyX509TrustManager, which are mentioned in httpclient documentation. code client = new DefaultHttpClient(); client.getConnectionManager().getSchemeRegistry().register(new Scheme(https, new EasySSLSocketFactory(), 443)); /code The problem is if I use this SSLFactory in my android app, I am getting correct response from my site's https pages, but I get SSL handshake failure: I/O error during system call, Unknown error: 0 for sites such as gmail.com, ymail.com. If I don't use EasySSLSocketFactory I get response from these sites but get exception for my site. The funny thing is that this page fetch code works fine as a standalone java application. What could be the problem. Please help me with this. Thanks and Regards -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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 Using Geocoder
I am trying to use the Geocoder class to the get the address of the location specified by latitude and longitude. logcat is showing the following: LocationMasfClient E reverseGeocode(): no feature in GLocation Can anyone tell me what this means? As an aside, I wonder if this could be related to why Google Maps cannot show me my location and the Browser says location unavailable. -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Re: Switch between views.
On Tue, Jun 22, 2010 at 10:44 AM, m0ny3t dendydo...@gmail.com wrote: I am looking for better/good ways if there is any. Do u have nice links u can share? None you couldn't find yourself on the official documentation or doing a Google search for whatever you're interested in. - 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 Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Questions for the group regarding URL Launchers
* What is the best recommendation the group can suggest as a starting point?* A starting point for what exactly? You haven't been real clear on what you are wanting * How do I open the .apk file in my eclipse environment to make the changes necessary? * First, an APK is just a zip with a different extension. If you really want to open it just change the extension to .zip and unzip it. If you change anything though, it will invalidate the certificate. As far as creating a certificate for publishing on the Market, you can follow the steps outlined here: http://developer.android.com/guide/publishing/app-signing.html#releasemode -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Jun 24, 2010 at 7:05 PM, AfMob affiliatesmob...@gmail.com wrote: I have long had my WAP pages built and had my URL launchers built by an outsourced group in India. I now have a requirement to update my .apk files to 2.2 as well as build 6 additional .apk files that are made up of 6 completely different URL launchers to other WAP sites. I have successfully set up my Java and SDK environment My questions are: - What is the best recommendation the group can suggest as a starting point? - How do I open the .apk file in my eclipse environment to make the changes necessary? The Android Market says the following when I attempt to upload my .apk file: [quote] Market does not accept apks signed with the debug certificate. Create a new certificate that is valid for at least 50 years. Market requires that the certificate used to sign the apk be valid until at least October 22, 2033. Create a new certificate. Market requires the minSdkVersion to be set to a positive 32-bit integer in AndroidManifest.xml. [/quote] -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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: Adding a button which opens another screen
Thank you for that, so the other screen doing what I want it to do would be a whole other Java File? How do I set up a listener on the button as there is already a listener on the gallery? Sorry if this soulds basic, but I am just learning ;-) On Jun 24, 8:09 pm, Justin Anderson janderson@gmail.com wrote: When you click the button, launch a new activity with startActivity(). That method takes an Intent through which you can pass data to the activity you are calling. When you do it this way, pressing the back button automatically has the effect you want by virtue of how the Android OS works. -- There are only 10 types of people in the world... Those who know binary and those who don't. --On Thu, Jun 24, 2010 at 10:04 AM, Justin justinbrett1...@gmail.com wrote: I have written a app, and I have pictures which are stored in the / drawable directory. My app makes a sliding gallery across the top, (id gallery1) and as you select the picture in the gallery it load the picture bigger underneath, (id image1). These a layed out in a XML file. There is a button below the image (image1) which is called (id mybutton). I want it when a image comes up, when the button is pressed it loads the same image on a XML layout file, in which the picture is full screen, the ID of the XML file image is (id bigpic), and then from there to beable to press the back button to go back to the gallery screen. Can anyone help? My Whole Code is: *** ** public class PicViews extends Activity { //---the images to display--- Integer[] imageIDs = { R.drawable.pic01, R.drawable.pic02, R.drawable.pic03, R.drawable.pic04, R.drawable.pic05 }; �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.displayview); Gallery gallery = (Gallery) findViewById(R.id.gallery1); gallery.setAdapter(new ImageAdapter(this)); gallery.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { //---display the images selected--- ImageView imageView = (ImageView) findViewById(R.id.image1); imageView.setImageResource(imageIDs[position]); } }); } public class ImageAdapter extends BaseAdapter { private Context context; private int itemBackground; public ImageAdapter(Context c) { context = c; //---setting the style--- TypedArray a = obtainStyledAttributes(R.styleable.Gallery1); itemBackground = a.getResourceId( R.styleable.Gallery1_android_galleryItemBackground, 0); a.recycle(); } //---returns the number of images--- public int getCount() { return imageIDs.length; } //---returns the ID of an item--- public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } //---returns an ImageView view--- public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView = new ImageView(context); imageView.setImageResource(imageIDs[position]); imageView.setScaleType(ImageView.ScaleType.FIT_XY); imageView.setLayoutParams(new Gallery.LayoutParams(150, 120)); imageView.setBackgroundResource(itemBackground); return imageView; } } } *** ** The Section of code which pulls up the image and makes the bigger picture show is: *** ** gallery.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { //---display the images selected--- ImageView imageView = (ImageView) findViewById(R.id.image1); imageView.setImageResource(imageIDs[position]); } }); ***
Re: [android-beginners] application space files access.
On Mon, Jun 21, 2010 at 7:27 AM, changdeo changdeojad...@gmail.com wrote: Can anybody please help me to create a file on application space and tell a way to read it. There are various log-reading apps available for exactly this reason. You can just have your users install one of those apps and send you the logs via email. I am doing this String fileName = Environment.getExternalStorageDirectory()+/ WFLog.txt; That's for writing to the SD card, not application space. Also, don't randomly append strings together to form file paths. Use the various File constructors and functions to form a complete, valid File object. Alternative I thought was to create log file on sdcard but I can not delete it when application gets uninstalled. This also can be helpful if anybody knows how to delete sdcard files created by applicationon removal(unistall) of application. I believe this is in the works, and maybe available in Froyo, I can't remember. - 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 Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Re: Adding a button which opens another screen
* Thank you for that, so the other screen doing what I want it to do would be a whole other Java File? * The other screen would be a completely separate Activity, which would be a separate java file. * How do I set up a listener on the button as there is already a listener on the gallery? * Look at the documentation for Button... It gives this very example right at the top of the page: http://developer.android.com/reference/android/widget/Button.html * Sorry if this soulds basic, but I am just learning ;-)* We all have to start somewhere... Most start with basic. ;-) -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 9:35 AM, Justin justinbrett1...@gmail.com wrote: Thank you for that, so the other screen doing what I want it to do would be a whole other Java File? How do I set up a listener on the button as there is already a listener on the gallery? Sorry if this soulds basic, but I am just learning ;-) On Jun 24, 8:09 pm, Justin Anderson janderson@gmail.com wrote: When you click the button, launch a new activity with startActivity(). That method takes an Intent through which you can pass data to the activity you are calling. When you do it this way, pressing the back button automatically has the effect you want by virtue of how the Android OS works. -- There are only 10 types of people in the world... Those who know binary and those who don't. --On Thu, Jun 24, 2010 at 10:04 AM, Justin justinbrett1...@gmail.com wrote: I have written a app, and I have pictures which are stored in the / drawable directory. My app makes a sliding gallery across the top, (id gallery1) and as you select the picture in the gallery it load the picture bigger underneath, (id image1). These a layed out in a XML file. There is a button below the image (image1) which is called (id mybutton). I want it when a image comes up, when the button is pressed it loads the same image on a XML layout file, in which the picture is full screen, the ID of the XML file image is (id bigpic), and then from there to beable to press the back button to go back to the gallery screen. Can anyone help? My Whole Code is: *** ** public class PicViews extends Activity { //---the images to display--- Integer[] imageIDs = { R.drawable.pic01, R.drawable.pic02, R.drawable.pic03, R.drawable.pic04, R.drawable.pic05 }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.displayview); Gallery gallery = (Gallery) findViewById(R.id.gallery1); gallery.setAdapter(new ImageAdapter(this)); gallery.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { //---display the images selected--- ImageView imageView = (ImageView) findViewById(R.id.image1); imageView.setImageResource(imageIDs[position]); } }); } public class ImageAdapter extends BaseAdapter { private Context context; private int itemBackground; public ImageAdapter(Context c) { context = c; //---setting the style--- TypedArray a = obtainStyledAttributes(R.styleable.Gallery1); itemBackground = a.getResourceId( R.styleable.Gallery1_android_galleryItemBackground, 0); a.recycle(); } //---returns the number of images--- public int getCount() { return imageIDs.length; } //---returns the ID of an item--- public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } //---returns an ImageView view--- public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView = new ImageView(context); imageView.setImageResource(imageIDs[position]); imageView.setScaleType(ImageView.ScaleType.FIT_XY); imageView.setLayoutParams(new Gallery.LayoutParams(150,
[android-beginners] Application still consumes battery even tough it is closed
This may sound stupid, but I have a problem with my application. I made an application to check the accelerometer and orientation sensor. I tested it on my Nexus One and it works. The problem starts when I close it. (I pressed the - button in the phone) When I checked the Battery usage. That program I made is still there. Also when I checked my task manager, the application is still there! Did I miss some code? Or is it another kind of problem? thx a lot :) -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Application still consumes battery even tough it is closed
On Fri, Jun 25, 2010 at 5:21 PM, Flamechamp flamechamp1...@yahoo.com wrote: This may sound stupid, but I have a problem with my application. I made an application to check the accelerometer and orientation sensor. I tested it on my Nexus One and it works. The problem starts when I close it. (I pressed the - button in the phone) When I checked the Battery usage. That program I made is still there. You also need to be sure to unregister your sensor listeners. If you do not, your program will not truly end, and you will continue receiving sensor data. -- 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.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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] Why does TextView.setText cause the enclosing ScrollView to scroll?
Hello! I'm new to this group and (full disclosure) cross posting this question here from StackOverflow, just because I'm not 100% sure how my question will be found by other SO users (I made sure to read the suggested How To Ask Questions The Smart Way, and made sure to search SO for a clear explanation, but I must have missed it). Here, I'm clear that it'll be sent out to everyone, so here goes (my apologies in advance if I shouldn't be cross-posting like this!) I've got this odd problem which is happening on 1.6, 2.2, and a MyTouch 3G Slide (which is API #7, and listed as 2.1-Update1 in the Android Device Chooser). The basic idea for my app is to make a stopwatch-sort of thing, in that the user can tap a button to start a timer, then tap it again to stop (pause) the timer; further taps alternate between resuming the timer and pausing the timer. I've got a top-level ScrollView which contains a RelativelLayout, which contains a bunch of widgets. The first widget is a HUGE button (so that it's easy to press), which pushes all my other widgets below the bottom of the screen. This is intentional, as I want to rely on the ScrollView (and an on-screen reminder to the user) to make the rest of the input options available. I've got a simple state-machine type setup, where mState is the current mode (STATE_TIMER_NOT_STARTED before the user presses any buttons, ...RUNNING after the first press, and then ...PAUSED after the second, back to ...RUNNING after the third, etc, etc). All this works great EXCEPT that when the timer is running, and the user presses the start/stop/resume button again, the ScrollView will scroll down a ways. I am NOT issuing this command (I don't even have a reference to ScrollView object), and I'm not sure why it's doing this. REPRO: Compile + run the below samples. When the app starts, press the 'Start Timing' button. Use your thumb (or the mouse) to touch-drag the screen upwards (so you can see the RatingBar), then drag it back downwards (so the button is again completely on-screen). Tap the button (which now reads 'PauseTiming') again, and it'll jump down a bit. It should NOT be jumping/scrolling down, since there's no statement (that I can see) that tells it to scroll down. As near as I can tell, it's the setText that causes the scrolling ( when I comment those lines out, no scrolling occurs). WHAT I'M ASKING FOR: If I'm doing something dumb you could point out what it is, I'd really appreciate it! :) ***I wonder if 'touch mode' might have something to do with this, since it does NOT appear to happen (in the emulator) when I use the mouse's scroll wheel to move the panel upwards (i.e.,instead of the simulated finger-dragging). I can't find a whole lot on touch-mode, and nothing specific on focus/selection in touch mode within a ScrollView If you can confirm that this error occurs for you too, that would be ok, too (since misery loves company.*AHEM* I mean, since it might help confirm that it's not just me :) ). bMyTestApp.java/b code package bug.android.scrollview; import android.app.Activity; import android.os.Bundle; import android.text.format.Time; import android.view.Display; import android.view.View; import android.view.WindowManager; import android.widget.Button; import android.widget.TextView; public class MyTestApp extends Activity { public final static int STATE_TIMER_NOT_STARTED = 1; public final static int STATE_TIMER_RUNNING = 2; public final static int STATE_TIMER_PAUSED = 3; private int mState; Time t = new Time(); private Time data = new Time(); private Button btnStartStopResume; private TextView lblSpacer; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.new_time_entry); btnStartStopResume = (Button) findViewById(R.id.btnStartStopResume); // Set the button's size so that the other info will also be visible Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)) .getDefaultDisplay(); // This is such a hack, but the windowScroller doesn't appear to // have a height at this point in the lifecycle (nor in 'onResume' : ( ) btnStartStopResume.setHeight(display.getHeight() - 200); lblSpacer = (TextView) findViewById(R.id.lblSpacer); reset(); } public void doStartStopResume(View v) { if (mState == MyTestApp.STATE_TIMER_NOT_STARTED) { mState = MyTestApp.STATE_TIMER_RUNNING; data.setToNow(); } else if (mState == MyTestApp.STATE_TIMER_RUNNING) { mState = MyTestApp.STATE_TIMER_PAUSED; String s = getString(R.string.add_scroll_down_to_add);
[android-beginners] Duplicate case problems
Hello All, I am trying to work on the notepad tutorial on the Android website. I tried incorporating a menu function to see how I can try to use mutiple functions. I keep getting errors of Duplicate case for the switch cases like Menu_1, insert_ID. Does any one knows what are some of the things I could do to avoid these errors please? Thank you. /* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.demo.notepad1; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.SimpleCursorAdapter; public class Notepadv1 extends ListActivity { private int mNoteNumber = 1; private NotesDbAdapter mDbHelper; private static final int MENU_1=Menu.FIRST; private static final int MENU_QUIT=Menu.FIRST+1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.notepad_list); mDbHelper = new NotesDbAdapter(this); mDbHelper.open(); fillData(); } private void fillData() { // Get all of the notes from the database and create the item list Cursor c = mDbHelper.fetchAllNotes(); startManagingCursor(c); String[] from = new String[] { NotesDbAdapter.KEY_TITLE }; int[] to = new int[] { R.id.text1 }; // Now create an array adapter and set it to display using our row SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row, c, from, to); setListAdapter(notes); } public static final int INSERT_ID = Menu.FIRST; @Override public boolean onCreateOptionsMenu(Menu menu) { boolean result = super.onCreateOptionsMenu(menu); menu.add(0, INSERT_ID, 0, R.string.menu_insert); menu.add(0, MENU_1, 0, New Game); menu.add(0, MENU_QUIT, 0, Quit); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case INSERT_ID: createNote(); return true; case MENU_1: createNote(); return true; case MENU_QUIT: createNote(); return true; return true; } return super.onOptionsItemSelected(item); } private void createNote() { String noteName = Note + mNoteNumber++; mDbHelper.createNote(noteName, ); fillData(); } } -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Duplicate case problems
* Does any one knows what are some of the things I could do to avoid these errors please?* Yes... don't have duplicate case values. Your problem lies with this line: public static final int INSERT_ID = Menu.FIRST; So when you include INSERT_ID and Menu.FIRST in the same case statement they have the same value. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 4:38 PM, Varun Khanduja varunkhand...@gmail.comwrote: INSERT_ID -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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
Re: [android-beginners] Duplicate case problems
I meant when you have them in the same switch statement... -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 5:04 PM, Justin Anderson janderson@gmail.comwrote: * Does any one knows what are some of the things I could do to avoid these errors please?* Yes... don't have duplicate case values. Your problem lies with this line: public static final int INSERT_ID = Menu.FIRST; So when you include INSERT_ID and Menu.FIRST in the same case statement they have the same value. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 4:38 PM, Varun Khanduja varunkhand...@gmail.comwrote: INSERT_ID -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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: Duplicate case problems
Hi Justin, Thanks for your response. I m sorry maybe I m not very clear with some of the steps I should take. I followed this tutorial(http:// www.youtube.com/watch?v=6UYNnQOxCS8) and in the first 2 minutes they declare the way I declared here. Although I know this is a very basic problem, but in case your time permits some more help will be very kind of you. Thank you On Jun 25, 4:05 pm, Justin Anderson janderson@gmail.com wrote: I meant when you have them in the same switch statement... -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 5:04 PM, Justin Anderson janderson@gmail.comwrote: * Does any one knows what are some of the things I could do to avoid these errors please?* Yes... don't have duplicate case values. Your problem lies with this line: public static final int INSERT_ID = Menu.FIRST; So when you include INSERT_ID and Menu.FIRST in the same case statement they have the same value. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 4:38 PM, Varun Khanduja varunkhand...@gmail.comwrote: INSERT_ID -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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: Duplicate case problems
I am sorry I didn't read your comment properly. I ll work on it again. Thanks On Jun 25, 4:05 pm, Justin Anderson janderson@gmail.com wrote: I meant when you have them in the same switch statement... -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 5:04 PM, Justin Anderson janderson@gmail.comwrote: * Does any one knows what are some of the things I could do to avoid these errors please?* Yes... don't have duplicate case values. Your problem lies with this line: public static final int INSERT_ID = Menu.FIRST; So when you include INSERT_ID and Menu.FIRST in the same case statement they have the same value. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun 25, 2010 at 4:38 PM, Varun Khanduja varunkhand...@gmail.comwrote: INSERT_ID -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android 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