[android-beginners] Two Problems with ExpandableListView
Very pleased :) with the way ExpandableListView works but am unclear how to set the clicked view as invalid in OnDismiss. Problem One --- In the onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { I call the Dialog Enter and wait for dismiss so:- Value = new Value_Input(test2.this,0, custno, itemno, day); Value.show(); Value.setOnDismissListener(new OnDismissListener() { public void onDismiss(DialogInterface arg0) { getExpandableListView().invalidateViews(); } }); } the invalidateViews() seems a bit heavyweight when I only want to redraw the clicked view. the other options are:- getExpandableListView().invalidate(); getExpandableListView().invalidate(dirty); getExpandableListView().invalidate(l, t, r, b) getExpandableListView().invalidateChild(child, dirty) getExpandableListView().invalidateChildInParent(location, dirty) getExpandableListView().invalidateDrawable(drawable) basically how do I get from groupPosition, childPosition to the View after the event?? or how to use one of the above?? What I need is:- getExpandableListView().invalidateChild ( groupPosition, childPosition) Problem Two -- How do I get the adapter not to draw GONE views. I have tried the trick I used in the simple BaseAdapter in both getGroupView and getChildView but it does not work :- boolean found=false; int count = getExpandableListView().getChildCount(); for(int i=0;icount;i++){ View block2 = (View)getExpandableListView().getChildAt(i); if (block2.getVisibility()==View.GONE){ found=true; } } if (found){ getExpandableListView().forceLayout(); getExpandableListView().getParent().requestLayout(); getExpandableListView().invalidateViews(); } What do I do??? Why doesn't the adapter look after this for me?? I would argue that both of the above problems currently require the user to have an understanding of what is going on inside the adapter other than the basics. (dangerous) Or am I missing something basic?? Many thanks in advance Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] SimpleAdapter onClick event catching. How to?
Hi, Maide! Maide! I'm in trouble with selecting an item in a ListView when I use a SimpleAdapter with my own Item display: here's my code setListAdapter(categoriesAdapter); categoriesAdapter.notifyDataSetChanged(); int count = categoriesAdapter.getCount(); final ListView listView = getListView(); for (int i = 0; i count; i++) { final View view = listView.getChildAt(i); View categoryLabel = view.findViewById(R.id.category); final int index = i; categoryLabel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onListItemClick(listView, view, index, /* unused */-1); } }); } ... The problem is that final View view = listView.getChildAt(i); returns null for every child: seams categoriesAdapter.notifyDataSetChanged() is not a sufficient call to inflate the childs immediately... What is the solution then? do I have to wait until the draw method is called? How is it that SimpleAdapter doesn't include a method shortcut getChildAt(i) ? Please, if I'm totally in the wrong direction, just notify me about it :-) For more details: my item layout is the following: ?xml version=1.0 encoding=utf-8? LinearLayout android:id=@+id/categories_view_item android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; android:gravity=top android:orientation=horizontal TextView android:text=err android:id=@+id/category android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 android:textAppearance=?android:attr/ textAppearanceLarge android:layout_gravity=center_vertical/ TextView ImageButton android:id=@+id/more android:layout_width=wrap_content android:layout_height=wrap_content style=@style/PlusButton/ /LinearLayout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: SimpleAdapter onClick event catching. How to?
I found a way but i don't know if it's the one thought by the design: override SimpleAdapter.getView() then call the super class implementation to get the view, then do your specific stuff on it before returning it. Best Regards, Zied Hamdi On Aug 3, 12:07 pm, Zied Hamdi zhamdi.i...@gmail.com wrote: Hi, Maide! Maide! I'm in trouble with selecting an item in a ListView when I use a SimpleAdapter with my own Item display: here's my code setListAdapter(categoriesAdapter); categoriesAdapter.notifyDataSetChanged(); int count = categoriesAdapter.getCount(); final ListView listView = getListView(); for (int i = 0; i count; i++) { final View view = listView.getChildAt(i); View categoryLabel = view.findViewById(R.id.category); final int index = i; categoryLabel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onListItemClick(listView, view, index, /* unused */-1); } }); } ... The problem is that final View view = listView.getChildAt(i); returns null for every child: seams categoriesAdapter.notifyDataSetChanged() is not a sufficient call to inflate the childs immediately... What is the solution then? do I have to wait until the draw method is called? How is it that SimpleAdapter doesn't include a method shortcut getChildAt(i) ? Please, if I'm totally in the wrong direction, just notify me about it :-) For more details: my item layout is the following: ?xml version=1.0 encoding=utf-8? LinearLayout android:id=@+id/categories_view_item android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; android:gravity=top android:orientation=horizontal TextView android:text=err android:id=@+id/category android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 android:textAppearance=?android:attr/ textAppearanceLarge android:layout_gravity=center_vertical/ TextView ImageButton android:id=@+id/more android:layout_width=wrap_content android:layout_height=wrap_content style=@style/PlusButton/ /LinearLayout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners]
I need networking example in android --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android and webservices
Thanks Holden, some good info there. I'll report back when I have got somewhere with it. On Aug 3, 10:32 am, Holden Karau holden.ka...@gmail.com wrote: This threadhttp://groups.google.com/group/android-developers/browse_thread/threa... seems like it might be of use to you (they are talking about interfacing with SOAP webservices). Did you have a specific webservice in mind? I've also been considering writing an android app that consumes a webservice, so let me know how it goes :) Best of luck :) On Aug 1, 1:03 pm, Grubber gra...@onemansweightloss.co.uk wrote: Hi All, Sorry if this appears twice, but my messages from yesterday didn't get posted? A couple of Android development questions... 1. Can you consume a webservice from android and if so are there any good examples? 2. Is android a good platform to develop private apps for customers, i.e ones which are not for general public use? Cheers Grubber --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: camera preview problem
It works! Thanks, Jack. On Aug 2, 4:12 pm, Jack Ha jack...@t-mobile.com wrote: Remove the 'android:permission=android.permission.CAMERA' attribute from the application tag and add the following line in your manifest file: uses-permission android:name=android.permission.CAMERA/uses- permission -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 30, 3:29 pm, chuu chuuw...@gmail.com wrote: Hi, I would like to try the camera preview function. I create a new project, copy the sample code (CameraPreview.java) from ApiDemo, and run on HTC G1. Nothing appear. The logcat shows: I/ActivityManager( 56): Starting activity: Intent { flags=0x1000 comp={com.example.camerapreview/ com.example.camerapreview.CameraPreview} } W/ActivityManager( 56): Permission Denial: starting Intent { flags=0x1000 comp={com.example.camerapreview/ com.example.camerapreview.CameraPreview} } from null (pid=-1, uid=-1) requires android.permission.CAMERA D/AndroidRuntime( 9049): Shutting down VM W/dalvikvm( 9049): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 9049): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 9049): *** EXCEPTION IN SYSTEM PROCESS. System will crash. My manifest is ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.example.camerapreview android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name android:debuggable=true android:permission=android.permission.CAMERA activity android:name=.CameraPreview android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / /manifest Could anyone give me a hint what's wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Follow up on my Acitivty Lifecycle Question
So I think I have a related question about the Lifecycle, but this is more having to do with the application itself. While I think I understand how the whole Tasks/Stack paradigm is supposed to work, I'm not really seeing that sort of behavior with my application when someone exits then comes back. So if I'm running my application and press 'Home', then go to the tray and select my application again, it ALWAYS starts me up at the (intent.action.MAIN, intent.category.LAUNCHER) Activity. I would expect it to just pick the application up from where it was. Is this not the case? Am I missing some sort of parameters or methods that I need to implement to let the application pickup where it was? Thanks! Evan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Start Activity With Long Press of Home Key
Ok, when I said replacement I really meant alternative... I don't think my expectations were unrealistic, though I can see how you can think they were when I said replacement. I was expecting to be able to long press the home key and have the activity chooser dialog (or whatever its official name is) ask me whether I wanted to use the alternative application or the default one. Seeing as how the default behavior is not an app I now understand that it is not possible. I still think that not allowing alternative actions when long pressing the home key is too restrictive. I mean, how hard would it have been to make long-pressing the home key use an intent and launch an actual app using a dialog theme instead of an internal dialog? Especially when this is the exact behavior of the short press of the home key... it launches an app based on intents and intent-filters. Thanks for your information. Though I don't agree with your opinions and it the tone of your response seemed a bit condescending (which may have just been misread), the information you provided did help me understand a little more about how Android is set up. On Aug 1, 5:05 am, Mark Murphy mmur...@commonsware.com wrote: Everything I read said that essentially any part of the phone could be replaced. First, most likely what you read refers to the fact that Android is open source, and so you can build your own firmware and deploy it on your own devices with whatever changes/replacements you want. Even beyond that, SDK applications have a fair bit of control to provide alternatives for built-in capabilities, though there it is providing *alternatives*, not usually outright replacements, and also only where there are appropriate hooks. What you're trying to do is say that, from an end-user application, you want to replace the right-mouse menu when you click on the desktop background of Windows or Linux. Or you're trying to replace the font-picker drop-down list in Microsoft Word or OpenOffice.org. Fine-grained features like that are not necessarily designed to be replaced in isolation without replacing more of the product. You see this with all sorts of applications and platforms. you can't control what happens when you long press? If you are willing to modify the firmware and distribute those modifications, you can change whatever you want. By my reading of the Android source code, you cannot change what happens on a long-press from an SDK application. Since you are on [android-beginners], my assumption is that you are trying to build an SDK application. That is a very poor/disappointing decision by OS designers that really limits the possibilities of the phone You are certainly welcome to your opinion, just as I am welcome to my opinion that your expectations are unrealistic, even for the most open source of projects. Is there anywhere to request changes and/or bugs? http://b.android.com -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Change an app
You are right, activity takes more resources than view. But the difference between them is not significant enough for it to be your primary concern. If you only have two screens, then rather than focusing on optimizing memory and CPU, I suggest you make the code as simple as possible. So instead of two views in one activity, your code will be cleaner if your two screens are separated into two activities. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 1, 3:04 am, Michael Leung michaelchi...@gmail.com wrote: Thanks for that. Previously, I got some misunderstand. I think Activity will use more resources , so that is more prefer to switch view rather than Activity. On Sat, Aug 1, 2009 at 12:34 AM, Balwinder Kaur (T-Mobile) balwinder.k...@t-mobile.com wrote: It should be just fine to create a separate Activity for each screen and use Intents to invoke each Activity. From the official documentation http://developer.android.com/guide/topics/fundamentals.html : An activity presents a visual user interface for one focused endeavor the user can undertake. For example, an activity might present a list of menu items users can choose from or it might display photographs along with their captions. A text messaging application might have one activity that shows a list of contacts to send messages to, a second activity to write the message to the chosen contact, and other activities to review old messages or change settings. Though they work together to form a cohesive user interface, each activity is independent of the others. Each one is implemented as a subclass of the Activity base class. Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 30, 9:03 pm, Michael Leung michaelchi...@gmail.com wrote: I am a new to Android as well, but as far as I know, changing the view is lighter than an activity. On Fri, Jul 31, 2009 at 12:41 PM, tinyang tiny...@earthlink.net wrote: Well, I was hoping to make the only existing activity one of many activities the user could choose from the main menu screen eventually. That is why I was thinking to add a main menu screen from which I could use buttond to add sccess to the other activity choices for the app. I'm open to suggestions though. -- *From:* android-beginners@googlegroups.com [mailto: android-beginn...@googlegroups.com] *On Behalf Of *Michael Leung *Sent:* Thursday, July 30, 2009 9:29 PM *To:* android-beginners@googlegroups.com *Subject:* [android-beginners] Re: Change an app should you change the view? instead of changing to another activity On Fri, Jul 31, 2009 at 11:51 AM, tinyang tiny...@earthlink.net wrote: I have an app I wrote for Android. It has only one activity (one java file) which is the only screen. I would like to add a main menu screen which has a button that can take the user to the already existing activity. What is the best way to do that? Thanks. -- J P Please don't print this e-mail unless you really need to. http://www.crossloop.com/Teenah -- Regards, Michael Leung http://www.itblogs.info http://www.michaelleung.info No virus found in this incoming message. Checked by AVG -http://www.avg.com Version: 8.0.169 / Virus Database: 270.13.24/2255 - Release Date: 7/30/2009 6:09 PM -- Regards, Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info -- Regards, Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Hello every body, I'm new here.
Hi all! I'm new here. Now I've met a problem: when my program using too much memory, it die. Is there an exception or something else? And how to get it? Thank you very much! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Development Phone
I'm nearing completion of an app and need to begin testing on a real device. G1s are going for quite a bit less than the official development phone on ebay. I'm wondering if its possible to use the G1 without a sim card? Can you still use the WIFI and the rest of the phone functionality? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: [android-beginners]
I think that would be the notepad tutorial on the android website: http://developer.android.com/guide/tutorials/notepad/index.html On Sun, Aug 2, 2009 at 8:45 PM, saurabh sinha saurso...@gmail.com wrote: I need a example which is used to insert,update,delete in database sqlitedatabase in android -- Abhiram Alamuru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Adding objects to a canvas
Hi, I am new to the android developing world and have what I think is a very simple question. I have created a circle on a canvas and drawn it successfully. I now wish to add another circle to this already existing canvas in a different position. I have defined my x and y as arguments I pass to custom drawable view but when I try and get another circle drawn it just replaces the one that was already present. How do I keep the first circle and add on a second? (My code below does not show trying to add another circle, it is simply what works with creating a single colour circle). Thanks G package com.image; import android.app.Activity; import android.os.Bundle; public class image extends Activity { /** Called when the activity is first created. */ private CustomDrawableView mCustomDrawableView; //private CustomDrawableView mCustomDrawableView2; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //last argument 1 = green, all others = red mCustomDrawableView = new CustomDrawableView(this, 150, 40, green); setContentView(mCustomDrawableView); } } package com.image; import android.content.Context; import android.graphics.Canvas; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.view.View; public class CustomDrawableView extends View { private ShapeDrawable mDrawable; public CustomDrawableView(Context context, int x, int y, String Colour) { super(context); //int x = 80; //int y = 90; int width = 50; int height = 50; mDrawable = new ShapeDrawable(new OvalShape()); if (Colour == green){ mDrawable.getPaint().setColor(0xff74AC23);//green } else if (Colour == red) { mDrawable.getPaint().setColor(0x);//red } mDrawable.setBounds(x, y, x + width, y + height); } protected void onDraw(Canvas canvas) { mDrawable.draw(canvas); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Custom View blocking other views in layout
I have my own custom view and a few buttons/textviews in a single relativetlayout as follows: /relativelayout textview / customView / /relativelayout The custom view's width and height are set to wrap_content, and I draw my image onto the canvas returned by onDraw. The problem is I see only the image of my custom view and not the textview. I guess it's because the canvas is the size of the whole screen, so even though the view is set to wrap content, it actually takes up the whole screen, thus blocking any other views. How can I make it so custom view takes only as much space as my image? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Start Activity With Long Press of Home Key
Tikoze wrote: I was expecting to be able to long press the home key and have the activity chooser dialog (or whatever its official name is) ask me whether I wanted to use the alternative application or the default one. That's certainly a fine concept; it's just not implemented that way at present, AFAICT. You can file an enhancement request on http://b.android.com, where it will be added to a large pile of enhancement requests, bug reports, and the like, that slowly get worked through. In fact, it is the size of that pile, and many of the items on that pile, that caused me to react as described below. Though I don't agree with your opinions and it the tone of your response seemed a bit condescending (which may have just been misread), the information you provided did help me understand a little more about how Android is set up. Bear in mind that I was replying to: That is a very poor/disappointing decision by OS designers that really limits the possibilities of the phone That is, IMHO, a completely over-the-top depiction of the situation. That being said, I apologize for any condescension. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Accessing images using content provider
The MediaStore content provider might be what your looking for. There are a number of tutorials that use it, for example this one: http://androidsamples.blogspot.com/2009/06/how-to-display-thumbnails-of-images.html Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 2, 1:06 pm, graphiko pickup.da...@gmail.com wrote: How do I find the images stored on a phone and open them in my own application? I've used a content provider for another task before, but don't understand how to use the content provider provided for accessing stored images. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Development Phone
Yes you can use the dev phone without a sim but you need to hack it. But its simple comand line hack. Android Apps Developer On Aug 3, 2009 1:34 PM, Greg ghoo...@barereef.com wrote: I'm nearing completion of an app and need to begin testing on a real device. G1s are going for quite a bit less than the official development phone on ebay. I'm wondering if its possible to use the G1 without a sim card? Can you still use the WIFI and the rest of the phone functionality? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Writing specific apps for clients
1. Yes. 2. You can consume web services with Android, which has built-in webkit, JSON, XML, etc., and for which you can get third-party libraries for protocols like SOAP. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 2, 3:09 pm, Roman roman.baumgaert...@t-mobile.com wrote: Android is a very powerful platform which supports several radio interfaces. For your communication to a backend server Wifi as well as 3G are pretty fast. Regarding the communication to the server in the backend you might have to resolve NAT traversal problems but otherwise than this I don't see any limitations (besides that you are running on an embedded device). -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 1, 3:03 am, Grubber gra...@onemansweightloss.co.uk wrote: Hi all, I am new to android development and mobile development in general. I am interested in writing an application for a private client (not for public release). In brief the application will be used by feild staff and will communicate with a webservice back at base. My questions are as follows... 1. Is Android a suitable platform for this kind of work. 2. Can you consume web services from Android this way? Thanks in advance Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Adding objects to a canvas
The onDraw() function is the phone's way of asking you so how do you want me to draw this canvas, from scratch? If you say draw a circle there!, you get one circle. If you want it to draw two circles, your CustomDrawableView needs to tell it to draw two different circles every time onDraw() is called, for example with two different drawables. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 3, 6:30 am, Graham gxt...@gmail.com wrote: Hi, I am new to the android developing world and have what I think is a very simple question. I have created a circle on a canvas and drawn it successfully. I now wish to add another circle to this already existing canvas in a different position. I have defined my x and y as arguments I pass to custom drawable view but when I try and get another circle drawn it just replaces the one that was already present. How do I keep the first circle and add on a second? (My code below does not show trying to add another circle, it is simply what works with creating a single colour circle). Thanks G package com.image; import android.app.Activity; import android.os.Bundle; public class image extends Activity { /** Called when the activity is first created. */ private CustomDrawableView mCustomDrawableView; //private CustomDrawableView mCustomDrawableView2; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //last argument 1 = green, all others = red mCustomDrawableView = new CustomDrawableView(this, 150, 40, green); setContentView(mCustomDrawableView); } } package com.image; import android.content.Context; import android.graphics.Canvas; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.view.View; public class CustomDrawableView extends View { private ShapeDrawable mDrawable; public CustomDrawableView(Context context, int x, int y, String Colour) { super(context); //int x = 80; //int y = 90; int width = 50; int height = 50; mDrawable = new ShapeDrawable(new OvalShape()); if (Colour == green){ mDrawable.getPaint().setColor(0xff74AC23);//green } else if (Colour == red) { mDrawable.getPaint().setColor(0x);//red } mDrawable.setBounds(x, y, x + width, y + height); } protected void onDraw(Canvas canvas) { mDrawable.draw(canvas); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android and webservices
Find a pretty good blog about this topic at http://www.anddev.org/web_services_-_an_xml-rpc_client_for_android-t646.html -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 3, 8:40 am, Grubber gra...@onemansweightloss.co.uk wrote: Thanks Holden, some good info there. I'll report back when I have got somewhere with it. On Aug 3, 10:32 am, Holden Karau holden.ka...@gmail.com wrote: This threadhttp://groups.google.com/group/android-developers/browse_thread/threa... seems like it might be of use to you (they are talking about interfacing with SOAP webservices). Did you have a specific webservice in mind? I've also been considering writing an android app that consumes a webservice, so let me know how it goes :) Best of luck :) On Aug 1, 1:03 pm, Grubber gra...@onemansweightloss.co.uk wrote: Hi All, Sorry if this appears twice, but my messages from yesterday didn't get posted? A couple of Android development questions... 1. Can you consume a webservice from android and if so are there any good examples? 2. Is android a good platform to develop private apps for customers, i.e ones which are not for general public use? Cheers Grubber --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Porting A Game from Java2d...
I recommend you look at the Canvas class, and port your calls to Java2D to use Canvas on Android. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 3, 9:29 am, ExO_PoLiTiX sumbody_told...@hotmail.com wrote: Hi, I am completely new to programming on mobile devices. I have a basic game which I created using eclipse and java, mainly using Java2D to create the game. Does anyone know how I would go about porting this to be able to be used with android? Should it be reasonably simple? I tried copy and pasting the majority of it but it said I couldnt use java2d with the android plug in. Any help is much appreciated, ExO --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: text colour
Do you want to change the color of the TextView items in the list view? In that case use: http://developer.android.com/reference/android/widget/TextView.html#attr_android:textColor To change the divider color use http://developer.android.com/reference/android/widget/ListView.html#attr_android:divider There are programmatic alternatives to these if you want to change colors at runtime. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 3, 8:10 am, W QX wong@gmail.com wrote: How do I change the text colour of list view and the space between each item? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Using Intent on default Google Map
I launch the default google map apk from my application, by starting the intent new Intent(Intent.ACTION_VIEW, Uri.parse(geo:+lon+,+lat)), 3); What I want is to start the map with menu option my location clicked and the current address displayed on the sign (user normally can bring up the sign with its address with a long click on the map.) There is a Google application called places directory which can trigger a similar function on Google map, i.e. start the google map with my location with a sign that says You are here The source code for this application is not available, so I can't check what intent it uses to trigger this action. Any suggestions are welcome. If possible tell me where i can get the source code for default google maps... because i cant find out from git repository Thanks, Guna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Development Phone
I've got an unlocked t-mobile g1 and it works fine without the sim. I can use wifi, browse, play games, download from market etc. I haven't tried installing apps on it but I don't see why it won't work. I got it unlocked directly from t-mobile (a friend sold it to me since he was getting the new g2), if you like I can try installing an app into it using eclipse and let you know. On Mon, Aug 3, 2009 at 1:03 PM, Oliver Rennfort anubis...@gmail.com wrote: Yes you can use the dev phone without a sim but you need to hack it. But its simple comand line hack. Android Apps Developer On Aug 3, 2009 1:34 PM, Greg ghoo...@barereef.com wrote: I'm nearing completion of an app and need to begin testing on a real device. G1s are going for quite a bit less than the official development phone on ebay. I'm wondering if its possible to use the G1 without a sim card? Can you still use the WIFI and the rest of the phone functionality? -- Abhiram Alamuru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Hello every body, I'm new here.
Thank, I think that's an java.lang.OutOfMemoryError, but when I use try-catch statement at the new statement, I can't catch anything. Is there another way to catch the error? On 8月4日, 上午2时15分, Yusuf T. Mobile yusuf.s...@t-mobile.com wrote: Hello, to see the exception, look at logcat. You can do that from either the command line, or from the DDMS tab in Eclipse. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 2, 7:55 pm,whitechwhit...@163.com wrote: Hi all! I'm new here. Now I've met a problem: when my program using too much memory, it die. Is there an exception or something else? And how to get it? Thank you very much! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android and webservices
Hi I would suggest using the Hessian protocol, if you have the choice. it is a very light-weight binary web service protocol, optimized for mobile clients - see http://hessian.caucho.com/. I am currently testing an Android port of Coucho's open-source Java library - going to put it on google code when it's done. cheers, andre On Aug 1, 7:03 pm, Grubber gra...@onemansweightloss.co.uk wrote: Hi All, Sorry if this appears twice, but my messages from yesterday didn't get posted? A couple of Android development questions... 1. Can you consume a webservice from android and if so are there any good examples? 2. Is android a good platform to develop private apps for customers, i.e ones which are not for general public use? Cheers Grubber --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android and webservices
or you could take a look at http://code.google.com/apis/protocolbuffers/ - as far as i have seen similiar to Hessian. On Aug 1, 7:03 pm, Grubber gra...@onemansweightloss.co.uk wrote: Hi All, Sorry if this appears twice, but my messages from yesterday didn't get posted? A couple ofAndroiddevelopment questions... 1. Can you consume a webservice fromandroidand if so are there any good examples? 2. Isandroida good platform to develop private apps for customers, i.e ones which are not for general public use? Cheers Grubber --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---