Re: [android-developers] Is it possible to have a static view common to various activities in the application?
It's possible. Create a Layout you would like to have in A,B and C. Then use include in each of the layouts. Example: include android:id=@+id/header layout=@layout/header android:layout_height=wrap_content android:layout_width=fill_parent/ On Nov 28, 2011, at 2:26 PM, B.Arunkumar wrote: Hi, I just had a question if it is possible to have a static view across different layouts in activities defined? What I mean is that I have a number of activities in a project: 1.Activity A 2.Activity B 3.Activity C I need a view which appears in each of these activities but I don't want to define the view separately in all the 3 layout xml. How do I do it? Thank you, B.Arunkumar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need Help in Options Menu
Several ways to do this. One solution is to have two XML files that defines the different menus. On Nov 25, 2011, at 9:19 AM, Kiran Kumar Kendole wrote: Hi Guys, I am trying to design a options menu. I tried it, working fine. But the problem , It is showing same options for all pages. My requriement is In Home Page ( I need only EDIT, DELETE,ATTACH options) Second Page ( I need only BACK , HOME , EXIT options). Like I want some of the options for some pages. Please suggest me. Thanks, KIRANKUMARKENDOLE -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need Help in Options Menu
How do you know what menu you want? You could start the activity by passing in some extra parameter with the intent. public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); if(getIntent.getBooleanExtra(second_menu,true)) inflater.inflate(R.menu.optionsmenu, menu); else inflater.inflate(R.meny.optonsSecondMenu, menu); return true; } On Nov 25, 2011, at 10:03 AM, Kiran Kumar Kendole wrote: Thanks for the reply. I have two XMLs. And One Activity Class. there I used one XML like this. public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.optionsmenu, menu); return true; } But it is showing the same options for all screens. Could you please let me know how to use the second XML. Thanks, KIRANKUMARKENDOLE On Fri, Nov 25, 2011 at 3:23 AM, Johan Rydenstam johanrydens...@googlemail.com wrote: Several ways to do this. One solution is to have two XML files that defines the different menus. On Nov 25, 2011, at 9:19 AM, Kiran Kumar Kendole wrote: Hi Guys, I am trying to design a options menu. I tried it, working fine. But the problem , It is showing same options for all pages. My requriement is In Home Page ( I need only EDIT, DELETE,ATTACH options) Second Page ( I need only BACK , HOME , EXIT options). Like I want some of the options for some pages. Please suggest me. Thanks, KIRANKUMARKENDOLE -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Need Help in Options Menu
You can add and remove buttons programatically. Don't how by heart. Google it :) On Nov 25, 2011, at 10:43 AM, Kiran Kumar Kendole wrote: Thanks. It worked after using Intent. Any other way.. with using one XML file. Thanks, KIRANKUMARKENDOLE On Fri, Nov 25, 2011 at 4:07 AM, Johan Rydenstam johanrydens...@googlemail.com wrote: How do you know what menu you want? You could start the activity by passing in some extra parameter with the intent. public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); if(getIntent.getBooleanExtra(second_menu,true)) inflater.inflate(R.menu.optionsmenu, menu); else inflater.inflate(R.meny.optonsSecondMenu, menu); return true; } On Nov 25, 2011, at 10:03 AM, Kiran Kumar Kendole wrote: Thanks for the reply. I have two XMLs. And One Activity Class. there I used one XML like this. public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.optionsmenu, menu); return true; } But it is showing the same options for all screens. Could you please let me know how to use the second XML. Thanks, KIRANKUMARKENDOLE On Fri, Nov 25, 2011 at 3:23 AM, Johan Rydenstam johanrydens...@googlemail.com wrote: Several ways to do this. One solution is to have two XML files that defines the different menus. On Nov 25, 2011, at 9:19 AM, Kiran Kumar Kendole wrote: Hi Guys, I am trying to design a options menu. I tried it, working fine. But the problem , It is showing same options for all pages. My requriement is In Home Page ( I need only EDIT, DELETE,ATTACH options) Second Page ( I need only BACK , HOME , EXIT options). Like I want some of the options for some pages. Please suggest me. Thanks, KIRANKUMARKENDOLE -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] OutOfMemoryError
Are you using different resources for the tablet (like hdpi?). I would check for memory leaks. There are tools you can use for this ( Eclipse memory analyzer) On Nov 24, 2011, at 9:51 AM, bob wrote: OutOfMemoryError I'm getting this OutOfMemoryError: 11-24 00:38:10.925: ERROR/dalvikvm-heap(1782): 144-byte external allocation too large for this process. 11-24 00:38:10.965: ERROR/GraphicsJNI(1782): VM won't let us allocate 144 bytes 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): FATAL EXCEPTION: main 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:447) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:520) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at com.youniversalideas.rockyartue.MyApp.getBitmap(MyApp.java:1047) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at com.youniversalideas.rockyartue.MyApp.loadImages(MyApp.java:1217) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at com.youniversalideas.rockyartue.Panel.onDraw(Panel.java:906) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.View.draw(View.java:6880) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewGroup.drawChild(ViewGroup.java:1646) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewGroup.drawChild(ViewGroup.java:1644) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.View.draw(View.java:6883) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.widget.FrameLayout.draw(FrameLayout.java:363) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewGroup.drawChild(ViewGroup.java:1646) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.View.draw(View.java:6883) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.widget.FrameLayout.draw(FrameLayout.java:363) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at com.android.internal.policy.impl.PhoneWindow $DecorView.draw(PhoneWindow.java:1862) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewRoot.draw(ViewRoot.java:1522) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewRoot.performTraversals(ViewRoot.java:1258) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.os.Handler.dispatchMessage(Handler.java:99) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.os.Looper.loop(Looper.java:123) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at android.app.ActivityThread.main(ActivityThread.java:3647) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at java.lang.reflect.Method.invokeNative(Native Method) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at java.lang.reflect.Method.invoke(Method.java:507) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 11-24 00:38:11.205: ERROR/AndroidRuntime(1782): at dalvik.system.NativeStart.main(Native Method) Is there any easy way around this, or do I just have to use less memory? This game works fine on my phone, but strangely the error shows up on my tablet. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Firewall rules. Subnets/IPs C2dm Alternativ
I have written a C2DM solution. However I need to setup firewall rules for the solution. In this case it is impossible to open up for URLs. And the service needs to access https://android.apis.google.com/c2dm/send and https://www.google.com/accounts/ClientLogin How can this be done? Are there any specific subnets for this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en