[android-developers] tabs and maps
hi, i am working from i week on map view based tutorial and finally got this done.What approach i have followed is that: 1. i have used the single activity in which user enters a location name in text box. 2.as soon as the search button is clicked location name is converted into lat and lan using geocoder class. 3.then passing this lan and lat to a method returning location on the map. Now i want to do some RD with this code through tabviews. MEANS: 1.i want initially a single tab consisting of only textbox and search button. 2.When user click on search button new tab should be open showing location that was entered into textbox. Please guide me ! Thanks, Alok upadhyay, -- 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] Fwd: on search button click in a tab, open a new tabview dynamically consisting mapview locating the location .
-- Forwarded message -- From: Alok Upadhyay maddy.luck...@gmail.com Date: Sat, Mar 5, 2011 at 11:40 PM Subject: on search button click in a tab, open a new tabview dynamically consisting mapview locating the location . To: Android Developers android-developers@googlegroups.com hi, i am working on a tabhost based application.i want initially only a single tabview consisting of a edittext box and a search button, in edittext box user enters a city or location to be search.As soon as user click the search button a new tab got opened with the mapview locating the location.I have coded this application without tabs, but how to do this in tabs. i can share my code if anybody needed it. any guidence would be appreciable . Thanks, Alok Upadhyay -- Thanks Regards, Alok Upadhyay, +91-9654158051 -- 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] on search button click in a tab, open a new tabview dynamically consisting mapview locating the location .
hi, i am working on a tabhost based application.i want initially only a single tabview consisting of a edittext box and a search button, in edittext box user enters a city or location to be search.As soon as user click the search button a new tab got opened with the mapview locating the location.I have coded this application without tabs, but how to do this in tabs. i can share my code if anybody needed it. any guidence would be appreciable . Thanks, Alok Upadhyay -- 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] on search button click in a tab, open a new tabview dynamically consisting mapview locating the location .
hi, i am working on a tabhost based application.i want initially only a single tabview consisting of a edittext box and a search button, in edittext box user enters a city or location to be search.As soon as user click the search button a new tab got opened with the mapview locating the location.I have coded this application without tabs, but how to do this in tabs. i can share my code if anybody needed it. any guidence would be appreciable . Thanks, Alok Upadhyay -- 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] Problem in loading image on the layout on clicking button.
thanks for the hint!! On Sat, Nov 20, 2010 at 12:54 AM, TreKing treking...@gmail.com wrote: On Wed, Nov 17, 2010 at 12:37 AM, Alok Upadhyay maddy.luck...@gmail.comwrote: Problem:i am able to load images in next button click but as i click on back button no image got loaded. Look at the code you posted: case R.id.next: Log.i(Tag,tag); if(imageCounter 25)//if(imageCounter arrayList.length()) { imageCounter++; imagePath = imageList[imageCounter]; } break; case R.id.back: if(imageCounter 0) { imagePath = imageList[imageCounter]; } break; Now ask yourself: What am I doing in case R.id.next that I'm not doing in case R.id.back? - 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] Re: to load image from drawable folder
ya that was my mistake but now images are loading properly in back and next clicking button.Thanks for reply On Fri, Nov 12, 2010 at 8:38 PM, Kumar Bibek coomar@gmail.com wrote: I am really really confused. How are you including the ImageView that you have in the activity. I can see that you have created a new ImageView through code, but haven't added it to the Activity anywhere. On Nov 12, 5:21 pm, Alok Upadhyay maddy.luck...@gmail.com wrote: i have thirty images in my drawable folder.a layout having back and next buttons and having an imageview.now on clicking next and back buttons different-2 images displayed.my xml code is: ?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 android:gravity=center ImageButton android:id=@+id/back android:src=@drawable/btn_back android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left / ImageButton android:id=@+id/next android:src=@drawable/btn_next android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=right / ImageView android:id=@+id/imageWoL0 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left / /LinearLayout java code as: private int imageCounter = 0; private ImageView imageView; private int[] imageArray = {R.drawable.image_w_lbl_0, R.drawable.image_w_lbl_1,}; @Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.parent_frame);//this one is the common parent layout for all imageviews super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); imageView = new ImageView(this); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageArray[imageCounter]); } @Override public void onClick(View v) { int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: Log.i(Tag,tag); if(imageCounter 25) { imagePath = imageArray[imageCounter]; } imageCounter++; break; case R.id.back: if(imageCounter 0) { //imagePath = } break; } this.loadImage(imagePath); } private void loadImage(int imagePath) { imageView.setImageResource(imagePath); //imageView.findViewById(R.id.imageWoL0); //imageView. } the problem is that i am not getting imageview means my first image R.drawable.image_w_lbl_0(see above array) is not being loaded. any help will be appreciated -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] Problem in loading image on the layout on clicking button.
hii, in my android application there are number of images in drawable folder. in my layout two buttons: back and forward button.on clicking next and back buttons different-2 image get loaded on the same layout(common for all images). Problem:i am able to load images in next button click but as i click on back button no image got loaded.my code is as: public class SequencerActivity extends Activity implements OnClickListener { private int imageCounter = 0; private ImageView imageLoader; private int[] imageList = {R.drawable.image_wo_lbl_0, R.drawable.image_wo_lbl_1, R.drawable.image_wo_lbl_2, R.drawable.image_wo_lbl_3, R.drawable.image_wo_lbl_4, R.drawable.image_wo_lbl_5, R.drawable.image_wo_lbl_6, R.drawable.image_wo_lbl_8, R.drawable.image_wo_lbl_9,R.drawable.image_wo_lbl_10, R.drawable.image_wo_lbl_11}; @Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.parent_frame);//this one is the common parent layout for all image views super.onCreate(savedInstanceState); imageLoader = (ImageView) findViewById(R.id.imageLoader); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageList[imageCounter]); } @Override public void onClick(View v) { int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: Log.i(Tag,tag); if(imageCounter 25)//if(imageCounter arrayList.length()) { imageCounter++; imagePath = imageList[imageCounter]; } break; case R.id.back: if(imageCounter 0) { imagePath = imageList[imageCounter]; } break; } this.loadImage(imagePath); } private void loadImage(int imagePath) { imageLoader.setImageResource(imagePath); } hii, in my android application there are number of images in drawable folder. in my layout two buttons: back and forward button.on clicking next and back buttons different-2 image get loaded on the same layout(common for all images). Problem:i am able to load images in next button click but as i click on back button no image got loaded.my code is as: public class SequencerActivity extends Activity implements OnClickListener { private int imageCounter = 0; private ImageView imageLoader; private int[] imageList = {R.drawable.image_wo_lbl_0, R.drawable.image_wo_lbl_1, R.drawable.image_wo_lbl_2, R.drawable.image_wo_lbl_3, R.drawable.image_wo_lbl_4, R.drawable.image_wo_lbl_5, R.drawable.image_wo_lbl_6, R.drawable.image_wo_lbl_8, R.drawable.image_wo_lbl_9,R.drawable.image_wo_lbl_10, R.drawable.image_wo_lbl_11}; @Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.parent_frame);//this one is the common parent layout for all image views super.onCreate(savedInstanceState); imageLoader = (ImageView) findViewById(R.id.imageLoader); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageList[imageCounter]); } @Override public void onClick(View v) { int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: Log.i(Tag,tag); if(imageCounter 25)//if(imageCounter arrayList.length()) { imageCounter++; imagePath = imageList[imageCounter]; } break; case R.id.back: if(imageCounter 0) { imagePath = imageList[imageCounter]; } break; } this.loadImage(imagePath); } private void loadImage(int imagePath) { imageLoader.setImageResource(imagePath); } } i am thinking there is some logical problem in couter increment / decrement.i have used hard code 25 but just for test.i will use ArrayList.length(). help please.Thanks. -- 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] alignment issue in top left and top right
hi !!i done it and using relativelay. i am facing a new problem ie, i want to fill whole screen with the background image.code i am trying is: requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FILL_PARENT,WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); xml code is: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/homepage_image android:gravity=center ImageButton android:id=@+id/btnSequence android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_sequence android:gravity=center_vertical / ImageButton android:id=@+id/btnVideo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_video android:gravity=center_vertical / ImageButton android:id=@+id/btnInfo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_info android:gravity=center_vertical / /LinearLayout Thanks Regards Alok Upadhyay 9555758721 -- 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] Re: alignment issue in top left and top right
hi thank for the reply!!i done it and using relativelay. i am facing a new problem ie, i want to fill whole screen with the background image.code i am trying is: requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FILL_PARENT,WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); xml code is: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/homepage_image android:gravity=center ImageButton android:id=@+id/btnSequence android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_sequence android:gravity=center_vertical / ImageButton android:id=@+id/btnVideo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_video android:gravity=center_vertical / ImageButton android:id=@+id/btnInfo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_info android:gravity=center_vertical / /LinearLayout On Nov 2, 4:02 pm, Kostya Vasilyev kmans...@gmail.com wrote: Alok, FrameLayout is not what you want to use in this case. http://developer.android.com/reference/android/widget/FrameLayout.html FrameLayout is designed to block out an area on the screen to display a single item. You can add multiple children to a FrameLayout, but all children are pegged to the top left of the screen. Children are drawn in a stack, with the most recently added child on top. I suggest you use RelativeLayout, it's really powerful, although takes some time to get used to. http://developer.android.com/reference/android/widget/RelativeLayout For back button, specify android:layout_alignParentLeft=true, for next, android:layout_alignParentRight=true. -- Kostya 02.11.2010 13:06, Alok Upadhyay пишет: i am trying to align my two image buttons (back and next) at the top of an image background and trying like below xml code.But both the images are overlapping on top left corner. FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=center_horizontal android:background=@drawable/image_wo_lbl_0 ImageView android:id=@+id/back android:src=@drawable/btn_back android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentLeft=true / ImageView android:id=@+id/next android:src=@drawable/btn_next android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentRight=true / /FrameLayout Thanks!! -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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
[android-developers] to load image from drawable folder
i have thirty images in my drawable folder.a layout having back and next buttons and having an imageview.now on clicking next and back buttons different-2 images displayed.my xml code is: ?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 android:gravity=center ImageButton android:id=@+id/back android:src=@drawable/btn_back android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left / ImageButton android:id=@+id/next android:src=@drawable/btn_next android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=right / ImageView android:id=@+id/imageWoL0 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left / /LinearLayout java code as: private int imageCounter = 0; private ImageView imageView; private int[] imageArray = {R.drawable.image_w_lbl_0, R.drawable.image_w_lbl_1,}; @Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.parent_frame);//this one is the common parent layout for all imageviews super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); imageView = new ImageView(this); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageArray[imageCounter]); } @Override public void onClick(View v) { int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: Log.i(Tag,tag); if(imageCounter 25) { imagePath = imageArray[imageCounter]; } imageCounter++; break; case R.id.back: if(imageCounter 0) { //imagePath = } break; } this.loadImage(imagePath); } private void loadImage(int imagePath) { imageView.setImageResource(imagePath); //imageView.findViewById(R.id.imageWoL0); //imageView. } the problem is that i am not getting imageview means my first image R.drawable.image_w_lbl_0(see above array) is not being loaded. any help will be appreciated -- 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] to use only a single frame layout for oading different-2 images from drawable folder
hi, i am working on a image based yoga project.In which i am thinking to use a single framelayout. In each screen there are different-2 yoga steps/images.And on each screen back and next buttons.I have done this using number of xmls and .java files as intent,set class and start activity(bad approach).Means on clicking next buttons(using intents and setclass) a new class file is called with new layout and so on this cause 26 .java files/classes. In new approach just want to use single framrlayout(a common layout for all images having back/next buttons) and on clicking next and back buttons different-2 yoga steps/images get uploaded from drawable folder. How to do this ?please guide! -- 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] internal error
Hi,i am getting error as below and what i seem that there is no gen folder.but i check my folders there is gen folder with r.java file then why i am not able to run my project.see 1st line of stack trace [gen [in MagicYoga] does not exist] stack trace is as: Java Model Exception: Java Model Status [gen [in MagicYoga] does not exist] at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java: 502) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java: 246) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java: 515) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java: 252) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java: 238) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getKind(PackageFragmentRoot.java: 477) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java: 645) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java: 791) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java: 734) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java: 791) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java: 734) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.elementChanged(PackageExplorerContentProvider.java: 124) at org.eclipse.jdt.internal.core.DeltaProcessor $3.run(DeltaProcessor.java:1557) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java: 1547) at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java: 1381) at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java: 1357) at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java: 1958) at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java: 470) at org.eclipse.core.internal.events.NotificationManager $2.run(NotificationManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java: 285) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java: 149) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java: 313) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java: 1022) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java: 45) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -- 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] how to count number of images in my drawable folder
can anybody provide some script for getting image count in my drawable folder -- 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] internal error
its amazing as soon as i am cleaning my project my gen folder automatically got deleted.Something wrong going on internally i already have worked on a project previously so this error stunning me On Wed, Nov 10, 2010 at 6:23 PM, A N K ! T ankit.awasth...@gmail.comwrote: try cleanin the project then build it again On Wed, Nov 10, 2010 at 6:15 PM, Alok Upadhyay maddy.luck...@gmail.comwrote: Hi,i am getting error as below and what i seem that there is no gen folder.but i check my folders there is gen folder with r.java file then why i am not able to run my project.see 1st line of stack trace [gen [in MagicYoga] does not exist] stack trace is as: Java Model Exception: Java Model Status [gen [in MagicYoga] does not exist] at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java: 502) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java: 246) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java: 515) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java: 252) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java: 238) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getKind(PackageFragmentRoot.java: 477) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java: 645) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java: 791) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java: 734) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.handleAffectedChildren(PackageExplorerContentProvider.java: 791) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.processDelta(PackageExplorerContentProvider.java: 734) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.elementChanged(PackageExplorerContentProvider.java: 124) at org.eclipse.jdt.internal.core.DeltaProcessor $3.run(DeltaProcessor.java:1557) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java: 1547) at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java: 1381) at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java: 1357) at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java: 1958) at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java: 470) at org.eclipse.core.internal.events.NotificationManager $2.run(NotificationManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java: 285) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java: 149) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java: 313) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java: 1022) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java: 45) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- A N K ! T.. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] need help in setting image path from drawable folder
I am working on image based project in which clicking next/back buttons new images got loaded.ow how to give path dynamically. private int imageCounter = 0; private ImageView imageView; @Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.frame0);//this one is the common parent layout for all imageviews super.onCreate(savedInstanceState); imageView = new ImageView(this); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(R.drawable.image_wo_lbl_0); } @Override public void onClick(View v) { int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: if(imageCounter 25) { //imagePath = //need dynamic path to access image from drawable folder } break; case R.id.back: if(imageCounter 0) { //imagePath =need help here } break; } this.loadImage(imagePath); } private void loadImage(int imagePath) { imageView.setImageResource(imagePath); -- 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
Fwd: [android-developers] to use only a single frame layout for oading different-2 images from drawable folder
-- Forwarded message -- From: Alok Upadhyay maddy.luck...@gmail.com Date: Wed, Nov 10, 2010 at 1:35 PM Subject: [android-developers] to use only a single frame layout for oading different-2 images from drawable folder To: Android Developers android-developers@googlegroups.com hi, i am working on a image based yoga project.In which i am thinking to use a single framelayout. In each screen there are different-2 yoga steps/images.And on each screen back and next buttons.I have done this using number of xmls and .java files as intent,set class and start activity(bad approach).Means on clicking next buttons(using intents and setclass) a new class file is called with new layout and so on this cause 26 .java files/classes. In new approach just want to use single framrlayout(a common layout for all images having back/next buttons) and on clicking next and back buttons different-2 yoga steps/images get uploaded from drawable folder. How to do this ?please guide! -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] not getting next image on clicking next button
Hi, i have a nest button on clicking which a new image should be displayed.But not happening so i have taken an integer array as: private int imageCounter = 0; private int index_count = 0; private ImageView imageView; private int[] imageArray = {R.drawable.image_w_lbl_0, R.drawable.image_w_lbl_1,}; //in oncreate i have done something like this: public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.frame0);//this one is the common parent layout for all imageviews super.onCreate(savedInstanceState); imageView = new ImageView(this); ImageButton next = (ImageButton) findViewById(R.id.next); ImageButton back = (ImageButton) findViewById(R.id.back); next.setOnClickListener(this); back.setOnClickListener(this); //show the default image this.loadImage(imageArray[0]); } in onclick something like this: int imagePath = 0; // TODO Auto-generated method stub switch (v.getId()) { case R.id.next: if(imageCounter 25) { imagePath = imageArray[index_count]; } index_count++; imageCounter++; break; case R.id.back: if(imageCounter 0) { //imagePath = } break; } this.loadImage(imagePath); //now i have loadImage method to load image into imageview -- 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] want to align an image button bottom right
Hii, how to align an imagebutton bottom right.My code is as follows: FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=center_horizontal android:background=@drawable/help ImageButton android:id=@+id/done android:src=@drawable/btn_done android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=bottom / i am getting my image left side in the bottom but i want the imagebutton right at the bottom! -- 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] Re: The application has stopped unexpectedly
thanks, i was doing wrong actually in xml i had taken imageview while on code i have taken imagebutton, thats why classcaste exception was there. Resolved now On Mon, Nov 8, 2010 at 5:33 PM, Sarwar Erfan erfanonl...@gmail.com wrote: puty try catch around ImageButton o1 = (ImageButton) findViewById(R.id.next); o1.setOnClickListener(this); R.id.next : is it really an ImageButton? You have got ClassCastException. Regards Sarwar Erfan On Nov 8, 1:27 pm, Alok Upadhyay maddy.luck...@gmail.com wrote: i have two class as trial.java and ImageWoLab0.java(Image without lable 0).When i run my application i am getting error as : The application has stopped unexpectedly!! public void onClick(View v) { switch (v.getId()) { case R.id.btnSequence: Intent intent1 = new Intent(); intent1.setClass(this,ImageWoLab0.class); /*To open new Screen/Activity */ / *Passing a key/value(Condition) to Activity2.class*/ startActivity(intent1); /*open the new screen/Activity*/ break; case R.id.btnVideo: Intent intent2 = new Intent(); intent2.setClass(this,Activity2.class); intent2.putExtra(String_key, value1); startActivity(intent2); break; case R.id.btnInfo: Intent intent3 = new Intent(); intent3.setClass(this,Activity2.class); intent3.putExtra(String_key, value2); startActivity(intent3); break; } othar class as: public class ImageWoLab0 extends Activity implements OnClickListener { private static String TAG = tag; @Override public void onCreate(Bundle savedInstanceState) { Log.i(TAG, abc); super.onCreate(savedInstanceState); setContentView(R.layout.image0); ImageButton o1 = (ImageButton) findViewById(R.id.next); o1.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.next: Intent intent1 = new Intent(); intent1.setClass(this,ImageWoLab1.class); startActivity(intent1); break; } } } i have check image in drawable folder,manifest file(activity entry),layout file properly.i have clean again and again even rebuild again still the same messageis displaying.i am getting log as:sorry if i have not send log in right format(first time i am using logcat): 11-08 12:48:55.084: INFO/tag(334): abc 11-08 12:48:55.154: WARN/dalvikvm(334): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): FATAL EXCEPTION: main 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.Trial/ com.example.Trial.ImageWoLab0}: java.lang.ClassCastException: android.widget.ImageView 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:2033) 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at android.os.Handler.dispatchMessage(Handler.java:99) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.os.Looper.loop(Looper.java:123) 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at android.app.ActivityThread.main(ActivityThread.java:4627) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at java.lang.reflect.Method.invokeNative(Native Method) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at java.lang.reflect.Method.invoke(Method.java:521) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at dalvik.system.NativeStart.main(Native Method) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): Caused by: java.lang.ClassCastException: android.widget.ImageView 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at com.example.Trial.ImageWoLab0.onCreate(ImageWoLab0.java:21) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): ... 11 more 11-08 12:48:55.264: WARN/ActivityManager(61): Force finishing activity com.example.Trial/.ImageWoLab0 11-08 12:48:55.274
[android-developers] The application has stopped unexpectedly
i have two class as trial.java and ImageWoLab0.java(Image without lable 0).When i run my application i am getting error as : The application has stopped unexpectedly!! public void onClick(View v) { switch (v.getId()) { case R.id.btnSequence: Intent intent1 = new Intent(); intent1.setClass(this,ImageWoLab0.class); /*To open new Screen/Activity */ / *Passing a key/value(Condition) to Activity2.class*/ startActivity(intent1); /*open the new screen/Activity*/ break; case R.id.btnVideo: Intent intent2 = new Intent(); intent2.setClass(this,Activity2.class); intent2.putExtra(String_key, value1); startActivity(intent2); break; case R.id.btnInfo: Intent intent3 = new Intent(); intent3.setClass(this,Activity2.class); intent3.putExtra(String_key, value2); startActivity(intent3); break; } othar class as: public class ImageWoLab0 extends Activity implements OnClickListener { private static String TAG = tag; @Override public void onCreate(Bundle savedInstanceState) { Log.i(TAG, abc); super.onCreate(savedInstanceState); setContentView(R.layout.image0); ImageButton o1 = (ImageButton) findViewById(R.id.next); o1.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.next: Intent intent1 = new Intent(); intent1.setClass(this,ImageWoLab1.class); startActivity(intent1); break; } } } i have check image in drawable folder,manifest file(activity entry),layout file properly.i have clean again and again even rebuild again still the same messageis displaying.i am getting log as:sorry if i have not send log in right format(first time i am using logcat): 11-08 12:48:55.084: INFO/tag(334): abc 11-08 12:48:55.154: WARN/dalvikvm(334): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): FATAL EXCEPTION: main 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.Trial/ com.example.Trial.ImageWoLab0}: java.lang.ClassCastException: android.widget.ImageView 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:2033) 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at android.os.Handler.dispatchMessage(Handler.java:99) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.os.Looper.loop(Looper.java:123) 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at android.app.ActivityThread.main(ActivityThread.java:4627) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at java.lang.reflect.Method.invokeNative(Native Method) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at java.lang.reflect.Method.invoke(Method.java:521) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at dalvik.system.NativeStart.main(Native Method) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): Caused by: java.lang.ClassCastException: android.widget.ImageView 11-08 12:48:55.204: ERROR/ AndroidRuntime(334): at com.example.Trial.ImageWoLab0.onCreate(ImageWoLab0.java:21) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) 11-08 12:48:55.204: ERROR/AndroidRuntime(334): ... 11 more 11-08 12:48:55.264: WARN/ActivityManager(61): Force finishing activity com.example.Trial/.ImageWoLab0 11-08 12:48:55.274: WARN/ ActivityManager(61): Force finishing activity com.example.Trial/.Trial -- 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] alignment of imagebuttons in the image background
Hii, I have three image buttons which i want to aligne center vertically.i have layout something like this: ?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 android:background=@drawable/homepage_image android:gravity=center_horizontal ImageButton android:id=@+id/btnSequence android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_sequence android:scaleType=center / ImageButton android:id=@+id/btnVideo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_video android:scaleType=center / ImageButton android:id=@+id/btnInfo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_info android:scaleType=center / /LinearLayout although i have tried frame and relative but then image are overlapping each other. -- 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] alignment of imagebuttons in the image background
Thank you very much!!! i solved this [?] On Tue, Nov 2, 2010 at 12:34 PM, Renuka Deshpande renukanil.deshpa...@gmail.com wrote: set gravity of image button as center_horizontal and center_vertical On Tue, Nov 2, 2010 at 12:19 PM, Alok Upadhyay maddy.luck...@gmail.comwrote: Hii, I have three image buttons which i want to aligne center vertically.i have layout something like this: ?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 android:background=@drawable/homepage_image android:gravity=center_horizontal ImageButton android:id=@+id/btnSequence android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_sequence android:scaleType=center / ImageButton android:id=@+id/btnVideo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_video android:scaleType=center / ImageButton android:id=@+id/btnInfo android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/btn_info android:scaleType=center / /LinearLayout although i have tried frame and relative but then image are overlapping each other. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards, Renuka -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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=en360.gif
[android-developers] Splash screen | warning: Activity not started, its current task has been brought to the front
Hii, i want to display a splash screen followed by my trial.class.I am not getting any error but warning as: Warning: Activity not started, its current task has been brought to the front i have different-2 approches for this each time this warning is being displayed. public class Splash extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); Thread splashThread = new Thread() { @Override public void run() { try { int waited = 0; while (waited 5000) { sleep(100); waited += 100; } } catch (InterruptedException e) { // do nothing } finally { finish(); Intent i = new Intent(); i.setClass(Splash.this,Trial.class); startActivity(i); } } }; splashThread.start(); } } Thanks -- 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] alignment issue in top left and top right
i am trying to align my two image buttons (back and next) at the top of an image background and trying like below xml code.But both the images are overlapping on top left corner. FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=center_horizontal android:background=@drawable/image_wo_lbl_0 ImageView android:id=@+id/back android:src=@drawable/btn_back android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentLeft=true / ImageView android:id=@+id/next android:src=@drawable/btn_next android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentRight=true / /FrameLayout Thanks!! -- 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] Re: Splash screen | warning: Activity not started, its current task has been brought to the front
THANKS FOR REPLY!! I HAVE TRIED ALL CLOSING,CLEANING NO WORK. I THINK I HAVE TO WORK ON HANDLER APPROACH.. AS WELL WHILE WORKING ON PROJECT I AM IN NEED OF HOW TO USE LOG/LOGCAT/DDMS.ACTUALLY I AM VERY NEW ON ANDROID.CAN YOU PLEASE SEND SOME STEPS ON HOW TO USE LOGCAT.EVEN I CANT FIND SUCH DEBUGGING OPTION IN MY ECLIPSE(MY THICK HEAD[?]). THANKS On Tue, Nov 2, 2010 at 6:46 PM, tanmay@gmail.com tanmay@gmail.comwrote: Please close the currently open application on emulator On Nov 2, 1:21 pm, Alok Upadhyay maddy.luck...@gmail.com wrote: Hii, i want to display a splash screen followed by my trial.class.I am not getting any error but warning as: Warning: Activity not started, its current task has been brought to the front i have different-2 approches for this each time this warning is being displayed. public class Splash extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); Thread splashThread = new Thread() { @Override public void run() { try { int waited = 0; while (waited 5000) { sleep(100); waited += 100; } } catch (InterruptedException e) { // do nothing } finally { finish(); Intent i = new Intent(); i.setClass(Splash.this,Trial.class); startActivity(i); } } }; splashThread.start(); } } Thanks -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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=en361.gif
Re: [android-developers] Splash screen | warning: Activity not started, its current task has been brought to the front
Thanks! i am just going on handler tutorial and try what you have suggest.I also want to ask one thing: if i simply create a splash.java class and do some stuff like : not code but algorithm like this application end (time in ms)( my splash application) and then open new activity as: intentobj.setclass(this,Trial.class) can it be done so? On Tue, Nov 2, 2010 at 4:29 PM, Kostya Vasilyev kmans...@gmail.com wrote: Alok, Using a thread for this is wrong - calling UI methods is only allowed from the UI thread (main application thread, which is where onCreate and other callbacks is called). Do something like this instead: http://developer.android.com/resources/articles/timed-ui-updates.html private Handler mHandler = new Handler(); private Runnable mSplashTask = new Runnable() { public void run() { finish(); Intent i = new Intent(); i.setClass(Splash.this,Trial.class); startActivity(i); } }; mHandler.postDelayed(mSplashTask, 5000); -- Kostya 02.11.2010 11:21, Alok Upadhyay пишет: Hii, i want to display a splash screen followed by my trial.class.I am not getting any error but warning as: Warning: Activity not started, its current task has been brought to the front i have different-2 approches for this each time this warning is being displayed. public class Splash extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); Thread splashThread = new Thread() { @Override public void run() { try { int waited = 0; while (waited 5000) { sleep(100); waited += 100; } } catch (InterruptedException e) { // do nothing } finally { finish(); Intent i = new Intent(); i.setClass(Splash.this,Trial.class); startActivity(i); } } }; splashThread.start(); } } Thanks -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] putExtra and getExtra
i have trial.java as: public void onClick(View v) { switch (v.getId()) { case R.id.btnSequence: Intent intent1 = new Intent(); intent1.setClass(this,CommonActivity .class); String val1 = null; intent1.putExtra(Value, val1);//passing val1 to CommonActivity.java startActivity(intent1); break; case R.id.btnVideo: Intent intent2 = new Intent(); intent2.setClass(this,CommonActivity .class); String val2 = null; intent2.putExtra(Value, val2););//passing val2 to CommonActivity.java startActivity(intent2); break; case R.id.btnInfo: Intent intent3 = new Intent(); intent3.setClass(this,CommonActivity .class); String val3 = null; intent3.putExtra(Value, val3););//passing val3 to CommonActivity.java startActivity(intent3); break; } } and in CommonActivity.java i want to do something like this: public class CommonActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent getIntent = new Intent(); getIntent.getExtra(Value); //confusion with **getExtras** //here i want something like this: //if(getExtra.equals(val1)) //confusion with **getExtras** { //some stuff } //if(getExtra.equals(val2)) //confusion with **getExtras** { //some stuff } } } also while searching on net i got confused with getExtras and getextra.can anybody please example the scenario of using getExtra vs getExtras!so that i can decide to use better one in my application -- 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] to call only a single activity on different button clicks
i have three imagebuttons.and on clicking each buttons a new image with new screen opens.means three imagebuttons calls three different activities. it means if you have ten buttons we have to call 10 activities. i want to call the common activity on each button clicked using if else construct switch (v.getId()) { case R.id.btnSequence: Intent intent1 = new Intent(); intent1.setClass(this,Activity1.class); startActivity(intent1); break; case R.id.btnVideo: Intent intent2 = new Intent(); intent2 .setClass(this,Activity2.class); startActivity(intent2); break; case R.id.btnInfo: Intent intent3 = new Intent(); intent3 .setClass(this,Activity3.class); startActivity(intent3); break; } is there any way to call the different instance of common activity(say CommonActivity.class) for all three buttons. -- 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] Re: trying to open new image on clicking a image button
hii i have stuff a lot and find a new way something like below code: there are three imagebuttons and onclicking each imagebutton a new activity should be opened. in the new activity/screen how to open the imagepackage com.example.Activity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageButton; public class Activit1 extends Activity implements OnClickListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ImageButton o1 = (ImageButton) findViewById(R.id.btnSequence); o1.setOnClickListener(this); ImageButton o2 = (ImageButton) findViewById(R.id.btnVideo); o2.setOnClickListener(this); ImageButton o3 = (ImageButton) findViewById(R.id.btnInfo); o3.setOnClickListener(this); } @Override public void onClick(View v) { switch(v.getId()){ case R.id.btnSequence: // action to preform on button 1 Intent i1 = new Intent(); startActivityForResult(i1, 0); break; case R.id.btnVideo: // action to preform on button 1 Intent i2 = new Intent(); startActivityForResult(i2, 0); break; case R.id.btnInfo: // action to preform on button 1 Intent i3 = new Intent(); startActivityForResult(i3, 0); break; } } } On Thu, Oct 28, 2010 at 1:42 AM, Kumar Bibek coomar@gmail.com wrote: If you have the Uri to the media, you can trigger an intent with ACTION_VIEW. That should work. On Oct 27, 1:52 pm, Alok Upadhyay maddy.luck...@gmail.com wrote: hii, can anybody please guide me how to write the code for opening the new image after clicking the imagebutton in android. I have tried something like this: package com.example.imageButton; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; public class imageButton extends Activity { private static ImageButton seqIBtn;//these are the three imageButton private static ImageButton vidIBtn; private static ImageButton infoIBtn; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); seqIBtn = (ImageButton) findViewById(R.id.btnSequence); vidIBtn = (ImageButton) findViewById(R.id.btnVideo); infoIBtn = (ImageButton) findViewById(R.id.btnInfo); } seqIBtn.OnClickListener(new ImageButton.OnClickListener() { public void onClick(View v) { //1.how to code to open new image after clicking imagebutton seqIBtn //2.how to code to open video after clicking imagebutton vidIBtn //3.how to code to open another image after clicking imagebutton infoIBtn } } }); } please guide i am very new in android/java .thankss -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] images in android
hi nena!!! i am also trying to do something like this i am also having three images and i am trying something like this i have all the images in my drawable folder.till now i am successful to get all three imagebuttons on the screen. my code is something like this: package com.example.Trial; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageButton; public class Trial extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ImageButton o1 = (ImageButton) findViewById(R.id.btnSequence); o1.setOnClickListener(this); ImageButton o2 = (ImageButton) findViewById(R.id.btnVideo); o2.setOnClickListener(this); ImageButton o3 = (ImageButton) findViewById(R.id.btnInfo); o3.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btnSequence: //here i want to write code so that a new intent open and on clicking this imagebutton a new image got opened //means on clicking this button a new image should be open in new screen break; case R.id.btnVideo: //here i want to write code so that a new intent open and on clicking this imagebutton a new video got opened break; case R.id.btnInfo: here i want to write code so that a new intent open and on clicking this imagebutton a new video got opened break; } } } i am thinking something like i have to call seperate activities after clicking on each button ! is it so??please correct me if i am wrong any kind of help will be appreciated!!! thanks On Fri, Oct 29, 2010 at 9:55 AM, nena joy nenaj...@gmail.com wrote: Hello, I want to display 3 images one by one from drawable folder. I did it using seperate intents.Means when click the first image,itwill go the next intent and that loads second image and so on. As the no of images increasing it should be very complecated. So I want to show it in single intent. Any one have an idea please help. Thank you -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Alok Upadhyay 9555758721 -- 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] trying to open new image on clicking a image button
hii, can anybody please guide me how to write the code for opening the new image after clicking the imagebutton in android. I have tried something like this: package com.example.imageButton; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; public class imageButton extends Activity { private static ImageButton seqIBtn;//these are the three imageButton private static ImageButton vidIBtn; private static ImageButton infoIBtn; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); seqIBtn = (ImageButton) findViewById(R.id.btnSequence); vidIBtn = (ImageButton) findViewById(R.id.btnVideo); infoIBtn = (ImageButton) findViewById(R.id.btnInfo); } seqIBtn.OnClickListener(new ImageButton.OnClickListener() { public void onClick(View v) { //1.how to code to open new image after clicking imagebutton seqIBtn //2.how to code to open video after clicking imagebutton vidIBtn //3.how to code to open another image after clicking imagebutton infoIBtn } } }); } please guide i am very new in android/java .thankss -- 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] To open a new image after clicking a imageButton/how to use onclick
Hii all, I have three Image buttons as: 1.Sequences(This is an image having) 2.Videos(a video file) 3.Information(this is an image file) Now what i want is that as user clicks on the imageButton Sequences a new image should be open .when clicks on Videos, a new video shoul be open and when clicks on Information An information image opens. i have tried to code something like: package com.example.imageButton; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; public class imageButton extends Activity { private static ImageButton seqIBtn; private static ImageButton vidIBtn; private static ImageButton infoIBtn; // Create a button click listener for the Done button. private final ImageButton.OnClickListener btnDoneOnClick = new ImageButton.OnClickListener() { public void onClick(View v) { //now how to open new images after clicking here } }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //Get pointers to the Views defined in main.xml seqIBtn = (ImageButton) findViewById(R.id.btnSequence); vidIBtn = (ImageButton) findViewById(R.id.btnVideo); infoIBtn = (ImageButton) findViewById(R.id.btnInfo); seqIBtn.setOnClickListener(btnDoneOnClick); vidIBtn.setOnClickListener(btnDoneOnClick); infoIBtn.setOnClickListener(btnDoneOnClick); } } i am able to see my all the three images in my simulator. Please help me -- 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] unable to delete all references
Hi all, It is my very first mail to and dev. sorry it may be a silly question, i am getting frustated by this. i am very new on android however have worked on pl/sql. I have created two projects as helloWorld and helloAndroid(with some customization). I have deleted HelloWorld project from my workspace .Again start eclipse and as i run(Launch) my helloAndroid ,the deleted application is still visible, while there should be no visibility of HelloWorld. Also, when i am trying to navigate to HelloWorld(the deleted one) through fileopen file in eclipse i am not getting my deleted project which is fine.Then why it is appearing when i am trying to run only helloAndroid. -- 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] image
Hii All, i have successfully make two applications as : 1.halloworld 2.tabhost now what i want is to use png/jpeg images for my application. I my tab host application, i have three tabs, named as tab1,tab2,tab3. now what i want is as soon as user click tab1 an image should be visible,when clicks on tab2 another image should be visible and on on third so on... Actually basic thing i want to learn through this is how to play with images,resolution etc... Where to store images in Android application and how to process(bind) them.i want to continue through my tabs application.The whole code of that one is as follows: package com.example.tabHello; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.TabHost; import android.widget.TabHost.TabSpec; public class tabHello extends Activity { private int ADD_NEW_TAB = Menu.FIRST; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); TabHost tabs = (TabHost) this.findViewById(R.id.my_tabhost); tabs.setup(); TabSpec tspec1 = tabs.newTabSpec(First Tab); tspec1.setIndicator(One); tspec1.setContent(R.id.content); tabs.addTab(tspec1); TabSpec tspec2 = tabs.newTabSpec(Second Tab); tspec2.setIndicator(Two); tspec2.setContent(R.id.content); tabs.addTab(tspec2); TabSpec tspec3 = tabs.newTabSpec(Third Tab); tspec3.setIndicator(Three); tspec3.setContent(R.id.content); tabs.addTab(tspec3); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.add(0, ADD_NEW_TAB, 0, New Tabs); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { TabHost tabs = (TabHost) this.findViewById(R.id.my_tabhost); tabs.clearAllTabs(); tabs.setup(); TabSpec tspec1 = tabs.newTabSpec(New Tab); tspec1.setIndicator(NEWTAB, this.getResources().getDrawable(R.drawable.icon)); tspec1.setContent(R.id.content); tabs.addTab(tspec1); return super.onOptionsItemSelected(item); } the output of above code consist of three tabs...now i want to show different images on clicking on different tabs.. Please help -- 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