[android-developers] Switching views
HI friends, In my Layout I have 2 views in which i have to keep switching . On click of a button a particular gridview1 has to be shown and the other gridview(2) next to it has to be partially hidden. Wheni click on the other button gridview1 has to be partially hidden and gridview2 has to be shown . How to acheive this?? Please reply with any clues or any links -- Regards, Vani Reddy -- 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] switching views
Hey, I dont want to show multiple activities in a screen i want to show multiple views in a single activity On Tue, Feb 28, 2012 at 11:39 AM, abhijeet tomar abhijeet...@gmail.comwrote: Hi...you have to try TabHost it is a better option for show multiple activities in one screen or as your requirementall the best -- 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 -- Regards, Vani Reddy -- 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] switching views
Hey Treking, I am developing apps for api level 10 onwards.How can I use Fragments in 2.3.5?? On Wed, Feb 29, 2012 at 6:41 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hey, I dont want to show multiple activities in a screen i want to show multiple views in a single activity On Tue, Feb 28, 2012 at 11:39 AM, abhijeet tomar abhijeet...@gmail.comwrote: Hi...you have to try TabHost it is a better option for show multiple activities in one screen or as your requirementall the best -- 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 -- Regards, Vani Reddy -- Regards, Vani Reddy -- 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] switching views
Hi Vani, Create own framework and try it. On Wed, Feb 29, 2012 at 6:43 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hey Treking, I am developing apps for api level 10 onwards.How can I use Fragments in 2.3.5?? On Wed, Feb 29, 2012 at 6:41 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hey, I dont want to show multiple activities in a screen i want to show multiple views in a single activity On Tue, Feb 28, 2012 at 11:39 AM, abhijeet tomar abhijeet...@gmail.comwrote: Hi...you have to try TabHost it is a better option for show multiple activities in one screen or as your requirementall the best -- 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 -- Regards, Vani Reddy -- Regards, Vani Reddy -- 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 -- - Thanks Regards, ThE MaSs -- 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] switching views using viewflipper
Hi , In the attached snapshot , i need to create that kind of view in viewfilpper , and need to switch views using viewflipper. How to acheive that? -- Regards, Vani Reddy -- 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=enattachment: device-2012-02-29-190755.png
Re: [android-developers] switching views
yes...u have to show multiple views withthe help of TabHostgenrally all the apps used TabHost... -- 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] switching views
On Wed, Feb 29, 2012 at 7:13 AM, vani reddy vani.reddy.bl...@gmail.comwrote: I am developing apps for api level 10 onwards.How can I use Fragments in 2.3.5?? Yes, there is a compatibility library in the SDK. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] switching views
try fragments... On Mon, Feb 27, 2012 at 4:26 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hi friends, How to create switching views in android in the same activity ,like the attached snapshot of iPad..Please give any clue or any links which will help me to proceed further. Thaanks -- Regards, Vani Reddy -- 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] switching views
No . I want to do in phone. On Mon, Feb 27, 2012 at 4:34 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: try fragments... On Mon, Feb 27, 2012 at 4:26 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hi friends, How to create switching views in android in the same activity ,like the attached snapshot of iPad..Please give any clue or any links which will help me to proceed further. Thaanks -- Regards, Vani Reddy -- 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 -- Regards, Vani Reddy -- 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] switching views
You can try with tabhost instead of Dialog. On Mon, Feb 27, 2012 at 4:48 PM, vani reddy vani.reddy.bl...@gmail.comwrote: No . I want to do in phone. On Mon, Feb 27, 2012 at 4:34 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: try fragments... On Mon, Feb 27, 2012 at 4:26 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hi friends, How to create switching views in android in the same activity ,like the attached snapshot of iPad..Please give any clue or any links which will help me to proceed further. Thaanks -- Regards, Vani Reddy -- 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 -- Regards, Vani Reddy -- 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 -- - Thanks Regards, T.M.S.VIJAYKUMARR BloG:http://iamvijayakumar.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] switching views
On Mon, Feb 27, 2012 at 5:18 AM, vani reddy vani.reddy.bl...@gmail.comwrote: No . I want to do in phone. On Mon, Feb 27, 2012 at 4:34 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: try fragments... You can use Fragments in phone. That's kind of the point of them. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] switching views
Hi...you have to try TabHost it is a better option for show multiple activities in one screen or as your requirementall the best -- 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] Switching Views/Popup Window
Hi there, I'm having a little trouble switching views and wondering anyone can help. Basically the initial view is a ListActivity. On this view the user can press the menu button which triggers a database call and when the result comes back (either a number or a null) I require the view to be altered to one of two views (a numberview and a nullview so to speak). I've had some success by doing - Intent myIntent = new Intent(this, numberview.class); this.startActivity(myIntent); Now this works however I can't see a way to pass the number retrieved from the database into the new view. I also tried to use the PopUpWindow class but to no avail, all the examples I found only had examples for the Activity (not ListActivity) and some of the mentioned methods don't exist. Can I get some help/ advice at all please? -- 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] Switching Views/Popup Window
You can pass data into a new activity by setting extras on the intent or by specifying a data URI. Both ways are documented under Intent. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 12.02.2011 1:07 пользователь David Lyons wireddot...@googlemail.com написал: Hi there, I'm having a little trouble switching views and wondering anyone can help. Basically the initial view is a ListActivity. On this view the user can press the menu button which triggers a database call and when the result comes back (either a number or a null) I require the view to be altered to one of two views (a numberview and a nullview so to speak). I've had some success by doing - Intent myIntent = new Intent(this, numberview.class); this.startActivity(myIntent); Now this works however I can't see a way to pass the number retrieved from the database into the new view. I also tried to use the PopUpWindow class but to no avail, all the examples I found only had examples for the Activity (not ListActivity) and some of the mentioned methods don't exist. Can I get some help/ advice at all please? -- 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] Switching views in ViewFlipper
Hi, Is there a way to switch views in a ViewFlipper just like on Home screen, where we have small dots at the bottom of the screen and on clicking on them we can switch views. Thanks, Farha -- 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] Switching views with RadioButton and saving views in Bundle
I have the following XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent RadioGroup android:orientation=horizontal android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentBottom=true RadioButton android:id=@+id/_2D android:layout_width=wrap_content android:layout_height=wrap_content android:text=2D/ RadioButton android:id=@+id/_3D android:layout_width=wrap_content android:layout_height=wrap_content android:text=3D/ /RadioGroup /RelativeLayout And I have the following Java code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); if (savedInstanceState == null) { RadioGroup.OnCheckedChangeListener buttonListener = new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { if (checkedId == R.id._2D) { main.removeView(findViewById(R.id._3D)); main.addView(_2D); } else if (checkedId == R.id._3D) { main.removeView(findViewById(R.id._2D)); main.addView(_3D); } } }; RadioGroup dimensions = (RadioGroup) findViewById(R.id.dimensions); dimensions.setOnCheckedChangeListener(buttonListener); } _2D = new _2DView(this); _3D = new _3DView(this); main = (RelativeLayout) findViewById(R.id.window); RadioGroup dimensions = (RadioGroup) findViewById(R.id.dimensions); if (dimensions.getCheckedRadioButtonId() == R.id._2D) { main.addView(_2D); } else if (dimensions.getCheckedRadioButtonId() == R.id._3D) { main.addView(_3D); } } The idea is to change the views, whenever I press one of the radio buttons. When I press a button the first time everything works out fine, but the second time I press a button, I get an IllegalStateException, and I can't quite see why I'm getting this. Also, the Activity seems to set all my global variables to null, which is why I have to create them every time I switch from portrait to landscape or vice versa. So I would like to know if there is a way I can save my views in the Bundle, or any other way in which I can permanently save my views, so I don't have to add or create them every time, I flip the phone. And whenever I flip the phone, it seems that it rereads the main XML file, causing the RadioGroup to be set to 2D even if the 3D button is checked. This is because I've said the 2D button to be checked from when the app is first created, but I would like to also save the state of that RadioGroup. -- 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] Switching views with RadioButton and saving views in Bundle
ThemePark wrote: The idea is to change the views, whenever I press one of the radio buttons. When I press a button the first time everything works out fine, but the second time I press a button, I get an IllegalStateException, and I can't quite see why I'm getting this. The full Java stack trace, from adb logcat, DDMS, or the DDMS perspective in Eclipse, may give you more clues. Also, the Activity seems to set all my global variables to null, which is why I have to create them every time I switch from portrait to landscape or vice versa. Java does not have global variables. So I would like to know if there is a way I can save my views in the Bundle, or any other way in which I can permanently save my views, so I don't have to add or create them every time, I flip the phone. No. Doing so would cause crashes at best and memory leaks at worst. If you do not want your activity destroyed when the orientation changes, you can set up a manifest entry for that: http://www.androidguys.com/2008/11/11/rotational-forces-part-three/ And whenever I flip the phone, it seems that it rereads the main XML file, causing the RadioGroup to be set to 2D even if the 3D button is checked. Correct. Your activity is being destroyed and recreated. This is because I've said the 2D button to be checked from when the app is first created, but I would like to also save the state of that RadioGroup. Assuming you do not go down the path I pointed you to above, you can save the state of your RadioButton in onSaveInstanceState() and re-apply it in either onCreate() or onRestoreInstanceState(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 2.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en