[android-beginners] Re: Missing/Hidden/Dissappearing Button problem
Ok. Tried switching to RelativeLayout and I'm still having the same problem. On May 30, 2:31 am, Justin Anderson janderson@gmail.com wrote: Why are you using AbsoluteLayout? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sat, May 29, 2010 at 8:14 PM, Tollas tolla...@gmail.com wrote: No. I have a single AbosoluteLayout nested in a single ScrollView. ScrollView android:id=@+id/scrollview android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical xmlns:android=http://schemas.android.com/apk/res/android; AbsoluteLayout android:id=@+id/mainlayout android:layout_width=fill_parent android:layout_height=fill_parent On May 29, 8:14 am, niko20 nikolatesl...@yahoo.com wrote: Hi, Are you using a relative layout at all? Relative layout has some bugs when you use forward references, and basically will disappear. -niko On May 28, 3:07 pm, Tollas tolla...@gmail.com wrote: Yes. (getResources().getDrawable(R.drawable.attack_any) != null) returns true. On May 28, 1:41 pm, Justin Anderson janderson@gmail.com wrote: Have you verified that getResources().getDrawable(R.drawable.attack_any) is not returning a null value? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, May 28, 2010 at 12:22 PM, Tollas tolla...@gmail.com wrote: The button is there. I can click on it and it behaves normally. I have a Spinner onItemSelected that updates the button's image. When I activate that set to any value but the default, the button updates properly and the new image is displayed. On May 28, 12:57 pm, Justin Anderson janderson@gmail.com wrote: Is it there and you just can't see it? Or is it not there period? What happens if you click where the button is supposed to be at? One other thing I noticed... You are using AbsoluteLayout. That has been deprecated and it will not play nice with phones that have different screen sizes. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, May 28, 2010 at 11:43 AM, Tollas tolla...@gmail.com wrote: Button android:id=@+id/attack_ability_button android:layout_width=52dp android:layout_height=52dp android:layout_x=10dp android:layout_y=70dp/ final Button attack_ability_button = (Button)findViewById(R.id.attack_ability_button); attack_ability_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.attack_any)); My problem is that when I use the attack_any drawable to create the button, it just isn't there. If I change to another image of the same size, the button shows up just fine. I've tried replacing the image file, renaming it, resizing it. Always with the same results. I tried using the attack_any drawable for another button and it disappears as well. I've also tried moving the button and changing its size, but the problem persists. I've even tried drawing the background in XML rather than java and it still will not show up. attack_any.png is a 60x60px image 1kb in size. Scroll View -Absolute Layout -- 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 android-beginners%2bunsubscr...@googlegroups.comandroid-beginners%252bunsubscr...@googlegroups.com android-beginners%2bunsubscr...@googlegroups.comandroid-beginners%252bunsubscr...@googlegroups.com android-beginners%252bunsubscr...@googlegroups.comandroid-beginners%25252bunsubscr...@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
Re: [android-beginners] Re: Missing/Hidden/Dissappearing Button problem
Man... I am stumped here. I have no idea what the problem could be. Just out of curiosity (I can't imagine this would be the cause of the problem), is there a reason that your image is 8 pixels larger than the size of your button? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sat, Jun 5, 2010 at 12:50 AM, Tollas tolla...@gmail.com wrote: Ok. Tried switching to RelativeLayout and I'm still having the same problem. On May 30, 2:31 am, Justin Anderson janderson@gmail.com wrote: Why are you using AbsoluteLayout? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sat, May 29, 2010 at 8:14 PM, Tollas tolla...@gmail.com wrote: No. I have a single AbosoluteLayout nested in a single ScrollView. ScrollView android:id=@+id/scrollview android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical xmlns:android=http://schemas.android.com/apk/res/android; AbsoluteLayout android:id=@+id/mainlayout android:layout_width=fill_parent android:layout_height=fill_parent On May 29, 8:14 am, niko20 nikolatesl...@yahoo.com wrote: Hi, Are you using a relative layout at all? Relative layout has some bugs when you use forward references, and basically will disappear. -niko On May 28, 3:07 pm, Tollas tolla...@gmail.com wrote: Yes. (getResources().getDrawable(R.drawable.attack_any) != null) returns true. On May 28, 1:41 pm, Justin Anderson janderson@gmail.com wrote: Have you verified that getResources().getDrawable(R.drawable.attack_any) is not returning a null value? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, May 28, 2010 at 12:22 PM, Tollas tolla...@gmail.com wrote: The button is there. I can click on it and it behaves normally. I have a Spinner onItemSelected that updates the button's image. When I activate that set to any value but the default, the button updates properly and the new image is displayed. On May 28, 12:57 pm, Justin Anderson janderson@gmail.com wrote: Is it there and you just can't see it? Or is it not there period? What happens if you click where the button is supposed to be at? One other thing I noticed... You are using AbsoluteLayout. That has been deprecated and it will not play nice with phones that have different screen sizes. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, May 28, 2010 at 11:43 AM, Tollas tolla...@gmail.com wrote: Button android:id=@+id/attack_ability_button android:layout_width=52dp android:layout_height=52dp android:layout_x=10dp android:layout_y=70dp/ final Button attack_ability_button = (Button)findViewById(R.id.attack_ability_button); attack_ability_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.attack_any)); My problem is that when I use the attack_any drawable to create the button, it just isn't there. If I change to another image of the same size, the button shows up just fine. I've tried replacing the image file, renaming it, resizing it. Always with the same results. I tried using the attack_any drawable for another button and it disappears as well. I've also tried moving the button and changing its size, but the problem persists. I've even tried drawing the background in XML rather than java and it still will not show up. attack_any.png is a 60x60px image 1kb in size. Scroll View -Absolute Layout -- 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] Persistent disconnected emulator.
Hi, I use Eclipse and the ADT for android development.Recently when I try running a project,I get the error: # ... New emulator found: emulator-5554 # ... Waiting for HOME ('android.process.acore') to be launched... . emulator-5554 disconnected! Cancelling '[project name] activity launch'! At the emulator end, there is a [no service] displayed. I need help on how to resolve the problem. Thanks. -- 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] Regarding enter key on virtual keyboard
Set android:imeOptions=actionNext for username EditText and android:imeOptions=actionDone for password Check out http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptionsfor further reference 2010/6/3 ameya dandekar ameya...@gmail.com Hi, I am currently working on sdk 1.5, in which i want capture the Click event of Enter key on Virtual Keypad. My requirement is, for my Username/Password Login screen. Click on Username field. Cursor is displayed in Text entry box. Click on Enter key on Virtual Keypad. Cursor should be displayed in Password field. Take the cursor in Password field. Click on Enter key on Virtual Keypad. Virtual Keypad should be closed. I am testing the app on HTC Magic. Regards, Ameya. -- 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: Missing/Hidden/Dissappearing Button problem
I can't remember why. I tried changing the button size to 60x60 with the same results. On Jun 5, 4:06 am, Justin Anderson janderson@gmail.com wrote: Man... I am stumped here. I have no idea what the problem could be. Just out of curiosity (I can't imagine this would be the cause of the problem), is there a reason that your image is 8 pixels larger than the size of your button? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sat, Jun 5, 2010 at 12:50 AM, Tollas tolla...@gmail.com wrote: Ok. Tried switching to RelativeLayout and I'm still having the same problem. On May 30, 2:31 am, Justin Anderson janderson@gmail.com wrote: Why are you using AbsoluteLayout? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sat, May 29, 2010 at 8:14 PM, Tollas tolla...@gmail.com wrote: No. I have a single AbosoluteLayout nested in a single ScrollView. ScrollView android:id=@+id/scrollview android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical xmlns:android=http://schemas.android.com/apk/res/android; AbsoluteLayout android:id=@+id/mainlayout android:layout_width=fill_parent android:layout_height=fill_parent On May 29, 8:14 am, niko20 nikolatesl...@yahoo.com wrote: Hi, Are you using a relative layout at all? Relative layout has some bugs when you use forward references, and basically will disappear. -niko On May 28, 3:07 pm, Tollas tolla...@gmail.com wrote: Yes. (getResources().getDrawable(R.drawable.attack_any) != null) returns true. On May 28, 1:41 pm, Justin Anderson janderson@gmail.com wrote: Have you verified that getResources().getDrawable(R.drawable.attack_any) is not returning a null value? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, May 28, 2010 at 12:22 PM, Tollas tolla...@gmail.com wrote: The button is there. I can click on it and it behaves normally. I have a Spinner onItemSelected that updates the button's image. When I activate that set to any value but the default, the button updates properly and the new image is displayed. On May 28, 12:57 pm, Justin Anderson janderson@gmail.com wrote: Is it there and you just can't see it? Or is it not there period? What happens if you click where the button is supposed to be at? One other thing I noticed... You are using AbsoluteLayout. That has been deprecated and it will not play nice with phones that have different screen sizes. -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, May 28, 2010 at 11:43 AM, Tollas tolla...@gmail.com wrote: Button android:id=@+id/attack_ability_button android:layout_width=52dp android:layout_height=52dp android:layout_x=10dp android:layout_y=70dp/ final Button attack_ability_button = (Button)findViewById(R.id.attack_ability_button); attack_ability_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.attack_any)); My problem is that when I use the attack_any drawable to create the button, it just isn't there. If I change to another image of the same size, the button shows up just fine. I've tried replacing the image file, renaming it, resizing it. Always with the same results. I tried using the attack_any drawable for another button and it disappears as well. I've also tried moving the button and changing its size, but the problem persists. I've even tried drawing the background in XML rather than java and it still will not show up. attack_any.png is a 60x60px image 1kb in size. Scroll View -Absolute Layout -- You received this message because you are subscribed to the Google Groups
[android-beginners] Re: Missing/Hidden/Dissappearing Button problem
Did you try passing the drawable on the Button XML? ... android:background=@drawable/attack_any / or you can only obtain the drawable at runtime? (dynamic drawable) On May 28, 1:43 pm, Tollas tolla...@gmail.com wrote: Button android:id=@+id/attack_ability_button android:layout_width=52dp android:layout_height=52dp android:layout_x=10dp android:layout_y=70dp/ final Button attack_ability_button = (Button)findViewById(R.id.attack_ability_button); attack_ability_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.attack_any)); My problem is that when I use the attack_any drawable to create the button, it just isn't there. If I change to another image of the same size, the button shows up just fine. I've tried replacing the image file, renaming it, resizing it. Always with the same results. I tried using the attack_any drawable for another button and it disappears as well. I've also tried moving the button and changing its size, but the problem persists. I've even tried drawing the background in XML rather than java and it still will not show up. attack_any.png is a 60x60px image 1kb in size. Scroll View -Absolute Layout -- 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: Missing/Hidden/Dissappearing Button problem
Yes, I have tried that. Same result. I've also tried making it an ImageButton and ImageView with the same result. On Jun 5, 3:48 pm, Gubatron gubat...@gmail.com wrote: Did you try passing the drawable on the Button XML? ... android:background=@drawable/attack_any / or you can only obtain the drawable at runtime? (dynamic drawable) On May 28, 1:43 pm, Tollas tolla...@gmail.com wrote: Button android:id=@+id/attack_ability_button android:layout_width=52dp android:layout_height=52dp android:layout_x=10dp android:layout_y=70dp/ final Button attack_ability_button = (Button)findViewById(R.id.attack_ability_button); attack_ability_button.setBackgroundDrawable(getResources().getDrawable(R.drawable.attack_any)); My problem is that when I use the attack_any drawable to create the button, it just isn't there. If I change to another image of the same size, the button shows up just fine. I've tried replacing the image file, renaming it, resizing it. Always with the same results. I tried using the attack_any drawable for another button and it disappears as well. I've also tried moving the button and changing its size, but the problem persists. I've even tried drawing the background in XML rather than java and it still will not show up. attack_any.png is a 60x60px image 1kb in size. Scroll View -Absolute Layout -- 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] Database version is zero on initial install
I have released an app (World Time) with initial database. Now i want to update the app with a database upgrade. I have put in the upgrade code in OnUpgrade() and checking for the newVersion. But it was not being called in my local testing... So i put in the debug statement to get the database version and it is zero . Any idea why it is not being versioned ? Following is the code to copy the database from my Assets folder ... * InputStream myInput = myContext.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close();** * -- Mahesh http://android.maheshdixit.com -- 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: Can a full app (not widget) be postage stamp size?
Mark, et al Thanks for that. Perhaps not the best way, but I am still trying to get the Intent-Method to work. Aside: In experimenting, I can receive android.intent.action.PHONE_STATE (but not my broadcast). The app sends the Intent, but the widget never shows Log.d() in MyIntentReceiver.java. Q: Do I need the meta tag? Q: Do I need a permissions tag? Thanks for continued help. jp ---status bar app public class StatusBarNotifications extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.status_bar_notifications); Uri uri = Uri.parse(55); Intent intent = new Intent(org.jamesp.gpscruise.UpdateWidgetAction, uri); sendBroadcast(intent); --widget --(Manifest, MyIntentReceiver.java)- receiver android:name=.MyIntentReceiver android:label=@string/widget_name intent-filter action android:name=org.jamesp.gpscruise.UpdateWidgetAction / /intent-filter /receiver public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.d(TAG,MyIntentReceiver: onUpdate()); } @Override public void onReceive(Context context, Intent intent) { Log.d(TAG,MyIntentReceiver: onReceive); } } -- 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: Can a full app (not widget) be postage stamp size?
oops. last email missing this code.--- public class MyIntentReceiver extends BroadcastReceiver { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.d(TAG,MyIntentReceiver: onUpdate()); } @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub Log.d(TAG,MyIntentReceiver: onReceive); } } -- 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