[android-developers] Re: Is Zoom in And Zoom out is Possible for Image View In android............
Hi there! I had to write a duplicate of the image viewer last week. And I couldn't find the Image View source code. For those wondering why I didn't use the intents, it's just because my images are dynamically loaded from the web... Since I did it for my company, I can't publish the source code. But I can give you some tips. First of all, you should read this: http://groups.google.com/group/android-developers/browse_thread/thread/13fafedb71ccc296/0c0bc0830a20ee82 The whole tip is about using an ImageView with a Matrix. The Matrix enables you to translate / scale / rotate the image, so basically, zooming is just a question of scale + translate (to zoom to the center: when you scale, the fix point is the top left corner, so you need some translates so that the center is the fix point). Good luck with that. Regards, Piwaï On Jul 15, 2:06 pm, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI u have Source code for ImageViewer app if u have that can u plz attach that i am not getting it. On Wed, Jul 15, 2009 at 5:28 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: It is very simple, i would recommend u to read the documentation the try exploring ur self... the zoom controls widget actually displays 2 button like images one for zoom in 1 for zoom out. it is similar to the one used by maps app... or the image viewer app... On Wed, Jul 15, 2009 at 5:22 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote: HI i want to use it by touch events not by key events for Zoomcontrol widget is it possibe ... can u tell me where will get the tutorials or examples regarding this? On Wed, Jul 15, 2009 at 5:17 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: desu, plz make use of the zoomcontrols widget available... it will make things easier for u... On Wed, Jul 15, 2009 at 5:12 PM, hanged_man majd...@gmail.com wrote: Hi Desu, i thought you were trying to implement your own image viewer and implementing your own Zoom in out buttons, therefore i recommended to you to use the default image viewer as you can see in my previous post but it turned out that what you're looking for is zoom in and out on touching the image/screen and i dont think is going to be useable or useful for the user, what if the user wished to drag around and view different parts of it ? any touch on the screen would cause a zoom in/out and as i said before he wouldn't be able to move the screen and view different parts of the image. On Jul 15, 10:48 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: HI U told that will send the code in a short hours i didn't get the code for zooming . On Tue, Jul 14, 2009 at 5:09 PM, hanged_man majd...@gmail.com wrote: you can use the default image viewer using intents (you dont have to implement your own), i don't remember exactly how it is done but ill send you the code in a few hours. On Jul 14, 8:37 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi One More thing I need to Specify I need to zoom in and Zoom out with Touch ... not with key events On Tue, Jul 14, 2009 at 10:50 AM, android.vinny vinny.s...@gmail.com wrote: Hi Is Zooming is possible to do in android for Image view . I have a images in full screen view, i need to zoom in and zoom out for that images present in image view . Can any body give me suggestions regarding this Thanks in advance. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Milton Berlehttp://www.brainyquote.com/quotes/authors/m/milton_berle.html - If opportunity doesn't knock, build a door. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 -- Regards, Sujay Spike Milliganhttp://www.brainyquote.com/quotes/authors/s/spike_milligan.html - All I ask is the chance to prove that money can't make me happy. -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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] ItemizedOverlay ArrayIndexOutOfBoundsException explanation AND solution !!
); } @Override public int size() { return faultStations.size(); } } Regards, Piwaï --~--~-~--~~~---~--~~ 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: ItemizedOverlays Complications
This post might be of some help: http://groups.google.com/group/android-developers/browse_thread/thread/38b11314e34714c3 On Jul 9, 9:09 pm, aspekt9 aspe...@gmail.com wrote: I have a MapView which utilizes andItemizedOverlayto draw map markers to the map. The application stores the markers for later use in a database and in the mOverlays OverlayItem ArrayList. This works fine for adding new items, but removing items from the ArrayList shrinks the arraylist and throws off the indexes.. I tried to circumvent this by using a regular OverlayItem Array but then I run into the issue of not being able to create a dynamic array to support the ever changing amount of items. How can I get around this so the indexes are always constant and the onTap method works properly when adding AND removing items? --~--~-~--~~~---~--~~ 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: Automated Functional Testing
Err... nice ! But, this is an Android mailing list. Writing such a long text in the wrong place, I feel sorry for you ;-) . On Jul 9, 7:59 am, Software Testing Training qacampu...@gmail.com wrote: Automated Functional Testing By Bhrigu Malhotra (http://www.qacampus.com) First of all let me make you all aware that I’m a developer and what you are going to read further is a developer’s account, so it may sound to you like a layman tester. But what I’m going to share is something which has been very helpful to me to ‘functionally’ test the web application our team has been building and I thought this may help you as well. So even if you are a tester, try to think the way developer’s think for some time, I’m sure this would be useful to you too. Before I go ahead, I think we all understand that Functional Testing is testing the functionality of our application which means you’d probably be going through a login using some credentials, clicking some links, verifying some outputs - in simplest terms. Now just give it a thought that if you can automate these i.e. invest some time for once and then while you are sipping a cup of coffee, someone is testing what you coded. Change your code 10 times and run your test 10 times to ensure nothing breaks, so easy. Not just this if you have continuous integration server setup which runs your tests, you’d come to know immediately if and when someone else broke your code. Believe me ones who have used it, feel it is fantastic. There are a variety of tools available for this over internet each with pros/cons but I’m going to share some info here about one which I liked very much and have been using for a while now. I’d also share why I preferred it over others. Ok, no longer prolonging the suspense the tool I’m talking about is called Canoo WebTest (webtest.canoo.com) which is a free Open Source tool for automated testing of web applications in a very effective way. The primary reason why I liked it is that it is FAST; very fast … most of the test cases that I’ve written are executed in less than a minute and that too over remote applications deployed on servers on the other side of globe. Second reason for liking it so much is the ease of writing; very quickly you can build up your tests. Though they have released a WebTest recorder plug-in which when installed in Mozilla Firefox can record the script for you, but believe me the more you start writing there test cases, the less reliant you will become on the recorder. Third thing is these tests do not use a browser so that completely eliminated browser-specific issues which some tools are plagued with. Now some things about WebTest which some people don’t like is you actually do not see the tests being executed i.e. loading of a browser window, automatic clicking on buttons and errors on the screen (if any). But that I feel that it is so by design …. Doing all this takes time and then browser issues too creep in, so I’m happy like this way only. I agree they can improve on reporting of errors but again the objective of this tool is to test and just to test, if you want to report issues manual intervention is needed. At last I’ll just say go give it a try, I’m sure once past initial hiccups, you’ll start liking it the way I am. --~--~-~--~~~---~--~~ 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: Canvas Scaling issues
Hi ! Thanks for the link, the GestureDetector is nice. I started working on this today, and found another way to zoom move, which I think may be simpler. All you need is to set a specific Matrix on an ImageView. The matrix will apply transformations on the image (here we just want to scale and translate). In your layout, just put an ImageView: ImageView android:id=@+id/zoom_test android:adjustViewBounds=false android:cropToPadding=false android:scaleType=matrix android:src=@drawable/some_drawable android:layout_width=fill_parent android:layout_height=fill_parent / In your activity code: ImageView zoomTest = (ImageView) findViewById(R.id.zoom_test); Matrix mtrx = new Matrix(); mtrx.postScale(1.5f, 1.5f); mtrx.postTranslate(-120f, -120f); zoomTest.setImageMatrix(mtrx); zoomTest.invalidate(); I still need to find the appropriate values, and let the user manipulate the GestureDetector and press the zoom button, but I think I will go that way. I found this solution by reading ImageView source code, and reading this: http://groups.google.com/group/android-developers/browse_thread/thread/bdc4998a70f310c7 More on this topic when I'll have done the whole stuff. On Jul 4, 8:13 pm, Tane Piper t...@digitalspaghetti.me.uk wrote: Hey Piawi, Actually I've found this: http://groups.google.com/group/android-developers/browse_thread/threa... I've managed to modify it a little bit and it works reasonably well. It's not perfect, but I'm sure any issues can be ironed out. Regards, Tane On Jul 4, 2:11 pm,Piwaïpy.ri...@gmail.com wrote: Hi, I am sorry I won't be of any help on this topic. But I will have to develop exactly that functionnality (an image viewer being part of an Android application) starting on tuesday. So if you find any solution to your problem, please do not hesitate to post it. And if I find a solution (but I won't work on this before tuesday), I promess I'll post it ;-). Best Regards, Piwaï On Jul 4, 12:50 am, Tane Piper t...@digitalspaghetti.me.uk wrote: Hey folks, A few weeks ago I posted a view I was working on and in that time I have improved the view a lot, but I've been asked to add a new features of zooming into the image. The view is a custom image viewer that allows large images (such as 640x1000) to be loaded, and the user to scroll around using either the touchscreen or trackball on the device. The code below is reasonably succesful in that it works at the default scale level of 1. But with addign zooming, instead of zooming into the 'centre' of the location the user is looking at, and allowing the user to move around the whole of the image at this level it instead zooms into the top and left of the location, and in doing so it starts to cut off the bottom and right of the image whole, so while zoomed in you cannot go any ruther right or down in the image, but you can go to the top and left easily enough. The best example of what I am trying to achive is the Image viewer in the camera application. So my two questions are: 1) Can anyone suggest how I can fix this in the canvas or 2) Is there a better way to do this with an existing feature in the framework? I'm probably thinking it's something to do with the modifierValue when scrolling around that I somehow need to increase this, but trying this causes my activity to crash. Code: public class ZN5ScrollView extends View { public ZN5ScrollView(Context context, AttributeSet attrs) { super(context, attrs); scrollX = 0; scrollY = 0; scale = 1.0f; modifierValue = 50; ViewPaint = new Paint(); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ZN5ScrollView); LoadedBitmap = BitmapFactory.decodeResource(context.getResources(), a.getResourceId(R.styleable.ZN5ScrollView_src, R.drawable.icon)); IMAGE_WIDTH = LoadedBitmap.getWidth(); IMAGE_HEIGHT = LoadedBitmap.getHeight(); ViewBitmap = Bitmap.createBitmap(LoadedBitmap); } protected void onSizeChanged (int w, int h, int oldw, int oldh) { SCREEN_WIDTH = w; SCREEN_HEIGHT = h; if (IMAGE_WIDTH SCREEN_WIDTH) { IMAGE_WIDTH = SCREEN_WIDTH - scrollX; } if (IMAGE_HEIGHT SCREEN_HEIGHT) { IMAGE_HEIGHT = SCREEN_HEIGHT - scrollY; } } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.scale(scale, scale); canvas.drawBitmap(ViewBitmap, 0f, 0f, ViewPaint); } public void handleView(int zoomType) { switch (zoomType) { case ZOOM_IN
[android-developers] Re: Parsing SOAP request
Maybe you should read some KSoap2 usage examples first ? You are asking quite basic questions which probably means that you didn't find any tutorial or documentation... There are many ways to use KSoap2. You may find one here: http://code.google.com/p/sugadroid/ (and Android project that calls SugarCRM SOAP Web Services) KSoap2 usage examples in those classes: http://code.google.com/p/sugadroid/source/browse/trunk/code/src/com/excilys/sugadroid/services/impl/ksoap2/ServiceClientKsoap2Impl.java http://code.google.com/p/sugadroid/source/browse/trunk/code/src/com/excilys/sugadroid/services/impl/ksoap2/LoginServicesKsoap2Impl.java On Jul 3, 9:55 pm, feda al-shahwan fa.alshah...@gmail.com wrote: How if I want to parse soap request for adding two integers. And the value of the integers are provided by the client. On Tue, Jun 23, 2009 at 7:25 AM, sagar.indianic sagar.india...@gmail.comwrote: You dont need to parse manually... First get the ksoap2-j2se-full-2.1.2.jar.. Search you will get it.. then use the following code.. private static String SOAP_ACTION = namespace/FunName; private static String METHOD_NAME = method_name; private static final String NAMESPACE = namespace; private static final String URL = Url of web service; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty(field of web service, variable); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); // same as envelope.bodyOut = request; HttpTransportSE httpTransport = new HttpTransportSE(URL); httpTransport.call(SOAP_ACTION, envelope); //This sends a soap request and response will be in envelope only. Now check for envelope.bodyIn will give you response from webservice. This will give you SoapObject. Retrieve response strings from the SoapObject method. On Jun 22, 10:17 am, Desu Vinod Kumar vinny.s...@gmail.com wrote: Hi everyone i am looking for soap web services in android. my hand also will help to u actually i need to connect the PHP soap web services in android i need to get the response from the PHP server and should return it in xml format. can any body give me suggestions regarding this i have tried some small code but it is unexpectedly quiting if any android runtime errors in log cat is any problem how can i clear that android runtime errors in log cat what i am getting ... Here is my code protected void onCreate(Bundle icicle) { super.onCreate(icicle); // SOAP Request for the FindServiceSOAP.GetRatingInfo web service String soapRequestXML = ?xml version=\1.0\ encoding=\utf-8\?\n + soap:Envelope xmlns:soap=\ http://schemas.xmlsoap.org/soap/envelope/\; + xmlns:xsi=\ http://www.w3.org/2001/XMLSchema-instance\; + xmlns:xsd=\ http://www.w3.org/2001/XMLSchema\;\n + getRating xmlns=\http://tempuri.org \\n + /getRating\n + /soap:Body\n + /soap:Envelope; String url = http://www.hasdhs.com/ask.php;; HttpClient client = new HttpClient(); PostMethod postMethod = new PostMethod(url); // Construct a SOAP request by hand StringBuffer request = new StringBuffer(); request.append(soapRequestXML); postMethod.setRequestBody(request.toString()); postMethod.setRequestHeader(Content-Type,text/xml; charset=utf-8); postMethod.setRequestHeader(SOAPAction, \http://tempuri.org\;); int statusCode = 0; try { statusCode = client.executeMethod(postMethod); } catch (IOException e) { Log.d(ReverseGeoCoder, e.toString(), e); } // Parse the SOAP Response MyContentHandler myContentHandler = new MyContentHandler(); try { SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); } catch (Exception e) { Log.d(ISizzle, e.toString(), e); } // Display the response details. List list = myContentHandler.getRating(); String[] items = new String[list.size()]; for (int i = 0; i list.size(); i++) { MyContentHandler.GetRating rating = (MyContentHandler.GetRating) list.get(i); } // Show the data in the list view ListView listView = (ListView) findViewById(R.id.data); listView.setAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_1, items)); postMethod.releaseConnection(); } } thanks in advance On Sat, Jun 20, 2009 at 8:08 PM, fifi fa.alshah...@gmail.com
[android-developers] Re: Canvas Scaling issues
Hi, I am sorry I won't be of any help on this topic. But I will have to develop exactly that functionnality (an image viewer being part of an Android application) starting on tuesday. So if you find any solution to your problem, please do not hesitate to post it. And if I find a solution (but I won't work on this before tuesday), I promess I'll post it ;-). Best Regards, Piwaï On Jul 4, 12:50 am, Tane Piper t...@digitalspaghetti.me.uk wrote: Hey folks, A few weeks ago I posted a view I was working on and in that time I have improved the view a lot, but I've been asked to add a new features of zooming into the image. The view is a custom image viewer that allows large images (such as 640x1000) to be loaded, and the user to scroll around using either the touchscreen or trackball on the device. The code below is reasonably succesful in that it works at the default scale level of 1. But with addign zooming, instead of zooming into the 'centre' of the location the user is looking at, and allowing the user to move around the whole of the image at this level it instead zooms into the top and left of the location, and in doing so it starts to cut off the bottom and right of the image whole, so while zoomed in you cannot go any ruther right or down in the image, but you can go to the top and left easily enough. The best example of what I am trying to achive is the Image viewer in the camera application. So my two questions are: 1) Can anyone suggest how I can fix this in the canvas or 2) Is there a better way to do this with an existing feature in the framework? I'm probably thinking it's something to do with the modifierValue when scrolling around that I somehow need to increase this, but trying this causes my activity to crash. Code: public class ZN5ScrollView extends View { public ZN5ScrollView(Context context, AttributeSet attrs) { super(context, attrs); scrollX = 0; scrollY = 0; scale = 1.0f; modifierValue = 50; ViewPaint = new Paint(); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ZN5ScrollView); LoadedBitmap = BitmapFactory.decodeResource(context.getResources(), a.getResourceId(R.styleable.ZN5ScrollView_src, R.drawable.icon)); IMAGE_WIDTH = LoadedBitmap.getWidth(); IMAGE_HEIGHT = LoadedBitmap.getHeight(); ViewBitmap = Bitmap.createBitmap(LoadedBitmap); } protected void onSizeChanged (int w, int h, int oldw, int oldh) { SCREEN_WIDTH = w; SCREEN_HEIGHT = h; if (IMAGE_WIDTH SCREEN_WIDTH) { IMAGE_WIDTH = SCREEN_WIDTH - scrollX; } if (IMAGE_HEIGHT SCREEN_HEIGHT) { IMAGE_HEIGHT = SCREEN_HEIGHT - scrollY; } } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.scale(scale, scale); canvas.drawBitmap(ViewBitmap, 0f, 0f, ViewPaint); } public void handleView(int zoomType) { switch (zoomType) { case ZOOM_IN: if (scale = 1.5f) { scale = scale + 0.1f; } break; case ZOOM_OUT: if (scale 1.0f) { scale = scale -0.1f; } break; } invalidate(); } public void handleScroll(float distX, float distY) { /* X-Axis */ if(distX 6.0) { if(scrollX IMAGE_WIDTH) { scrollX = Math.min(IMAGE_WIDTH - SCREEN_WIDTH, scrollX + modifierValue); } } else if(distX -6.0) { if(scrollX = 50) { scrollX = Math.min(IMAGE_WIDTH + SCREEN_WIDTH, scrollX - modifierValue); } else { scrollX = 0; } } /* Y-Axis*/ if(distY 6.0) { if(scrollY IMAGE_HEIGHT) { scrollY = Math.min(IMAGE_HEIGHT - SCREEN_HEIGHT, scrollY + modifierValue); } } else if(distY -6.0) { if(scrollY = 50) { scrollY = Math.min(IMAGE_HEIGHT + SCREEN_HEIGHT, scrollY - modifierValue); } else { scrollY = 0; } } if((scrollX = IMAGE_WIDTH) (scrollY = IMAGE_HEIGHT)) { ViewBitmap = Bitmap.createBitmap(LoadedBitmap, scrollX, scrollY, SCREEN_WIDTH, SCREEN_HEIGHT); invalidate(); } } private int modifierValue; private float scale; public final int ZOOM_IN = 1; public final int ZOOM_OUT = 2; private int
[android-developers] Re: Multiple points on a map
Hello, Have you read the MapView tutorial ? It shows how to display multiple items on a map: http://developer.android.com/guide/tutorials/views/hello-mapview.html In this example, you should notice the following lines of code : ListOverlay mapOverlays = mapView.getOverlays(); mapOverlays.add(itemizedoverlay); If you want more overlays (such as another overlay for location), then you just need to add it to the list ;-) . The adding order is important, because it directly impacts the drawing order and the event handling order (clicks..) Regards, Piwaï On Jul 3, 11:58 pm, alexdonnini alexdonn...@ieee.org wrote: Hello, I have another quick question. Does your application still work with Android 1.5 (SDK and OS version)? Thanks. Alex Donnini On Jul 3, 4:38 pm, alexdonnini alexdonn...@ieee.org wrote: Hello, Thanks. It's as I hoped. Can you sketch for me the approach you used to implement multiple overlays? Alex Donnini On Jul 3, 10:24 am, MrChaz mrchazmob...@googlemail.com wrote: You can have multiple overlays at the same time. In my application I have one for traffic incidents and one for roadworks. On Jul 3, 3:08 pm,alexdonninialexdonn...@ieee.org wrote: Hello, I need advice/pointers on how to display on a map multiple points that change somewhat infrequently based on the device's location. Currently, my application already displays in real-time the device's changing location on a map. I can also easily display the location of one of the other points of interest. However, I have not figured out a way to have both displayed on a map at the same time. Nay help, hint, pointer, advice, would be greatly appreciated. Thanks. Alex Donnini --~--~-~--~~~---~--~~ 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] Android apps + Dependency Injection = try out Yasdic!
Hello developers, I have been using the Android SDK for a few months now, and one thing I was missing was a dependency injection container. Dependency injection is a good practice to lower the coupling between the components of your application. I thought about using Spring, or PicoContainer but they use the reflection API to provide dependency injection. And the reflection API may not be the best speed partner for your Android apps. I couldn't find any real small dependency injection container, that would provide dependency injection without reflection. Here comes Yasdic, Yet Another Small Dependency Injection Container, no more then 6.7KB. The definitions are written programmatically and stored by String ids, the beans are lazily created, and Yasdic also deals with singleton and prototype scopes, cyclic dependency, and container hierarchy. Please feel free to try it out : http://code.google.com/p/yasdic I already use it in my Android apps, and I find my code to be much more maintainable (thought this is a quite subjective point of view ;-) ). Any feedback on this project will be appreciated, even code criticism :-) . Regards and thanks ! Piwaï --~--~-~--~~~---~--~~ 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: Android apps + Dependency Injection = try out Yasdic!
Hello, Thanks for this quick answer. I do not pretend to compete with Guice, but let's try to answer your question: Google Guice provides a reflection oriented dependency injection container. The AOP version provides fast reflection using cglib, but this version cannot be used with Android (source: http://code.google.com/p/google-guice/wiki/OptionalAOP). So using Guice in Android, we are stuck with slow reflection. And Guice uses a lot of reflection. Furthermore, Guice provides a type oriented injection, whereas Yasdic provides an id oriented injection. Which one is better ? I guess it's up to you. You are free to have a look at the Android example here: http://code.google.com/p/yasdic/source/browse/#svn/trunk/examples/countadroid I think Yasdic is much simpler and much faster to learn than Guice, but it requires a bit more writing. Beans are defined in a programmatic style, writing code in anonymous classes. This allows you to do anything when initializing beans, even complex computations involving multiple beans. Maybe I should make some speed / memory tests, to see what's the real difference. Any suggestion about this will be welcome, to prevent me from writing an unfair test ;-) . Regards, Piwaï On 30 juin, 21:18, Fred Grott(shareme) fred.gr...@gmail.com wrote: What is wrong with using Google Guice non-aop? On Jun 30, 5:12 am, Piwaï py.ri...@gmail.com wrote: Hello developers, I have been using the Android SDK for a few months now, and one thing I was missing was a dependency injection container. Dependency injection is a good practice to lower the coupling between the components of your application. I thought about using Spring, or PicoContainer but they use the reflection API to provide dependency injection. And the reflection API may not be the best speed partner for your Android apps. I couldn't find any real small dependency injection container, that would provide dependency injection without reflection. Here comesYasdic, Yet Another Small Dependency Injection Container, no more then 6.7KB. The definitions are written programmatically and stored by String ids, the beans are lazily created, andYasdicalso deals with singleton and prototype scopes, cyclic dependency, and container hierarchy. Please feel free to try it out :http://code.google.com/p/yasdic I already use it in my Android apps, and I find my code to be much more maintainable (thought this is a quite subjective point of view ;-) ). Any feedback on this project will be appreciated, even code criticism :-) . Regards and thanks ! Piwaï --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---