Acnezine PA Hire London Bali Real Estate

Play! Framework 2.0 hackathon

Mar 26

Play! Framework 2.0 Hackaton

I'm back to post! Long posteaba not the truth.

On this occasion, I come to tell you that I am organizing with 4 people plus a hackathon to Play! Framework 2.0 in Buenos Aires.

What is Play! Framework?

PlayFramework is a comprehensive framework to create Web applications using the MVC pattern. Bring new life to Web development in Java and Scala now.

If you are tired of seeing many XML, many settings and do a lot of boilerplate, then this is the framework that you have to try to make web applications.

If you want to learn about Play! and comaprtir time with people who are interested in it too, join this group. You'll have the opportunity to learn how to use and able to apply every day to development.

Here is the link to the meetup for those who are interested:

http://www.meetup.com/play-argentina/events/57992052/

In upcoming posts I will be telling my experiences with Play! 2.0

Read More

Using Fragments in Android: Newest which comes from Honeycomb

June 02

Usando Fragments en Android: Lo nuevo que se viene desde HoneyComb

Since the new versions of the Android SDK is favored and will continue to favor Fragments from the new version of the SDK where mergearan 3.0 (Tablets) and 2.3 (cell). The purpose of using Fragment is just make it easier to develop apps that work well in tablets and phones.

Let's see some that are?
Fragments are pieces of an Activity. A Fragment outside an Activity not exist. They are similar to the panels and just by having a code and a certain view will be highly reusable. Will I be able to have a Fragment used in several places where we get the data in each of Intent and the show.

Because I help you use mobile phones vs tablets?
Because I let you Fragments for example if it is a tablet display an Activity with 2 fragments (eg a list of certain data and next to the detail of the data selected) and if a cell phone show 2 Activities each with different his own Fragment (A screen is the list, click on a play and opens in another screen detail).
How would this be? Let's see a little image found below:

This allows us to reuse code without almost touching various panels to make beautiful and usable app for both phones to tablets.

Great, I flake the idea! Now .... how do I use?
Good for use must Fragment simply inherit from and after its LifeCycle understand a little that is similar to that of an Activity.
First is called OnAttach generally will not use it.
OnCreate is then called the Fragment.
Then the OnCreateView of Fragment. This method is quite important here will be defined as what the layout will use the Fragment! In this method a View object is returned. Can be used as in the case of menus "inflaters" not create them from code.
OnActivityCreated be called by passing as parameter the Activity and will be called after calling the OnCreate of the Activity. Generally much of the processing is done in this method.
OnResume OnPause and are used to store and retrieve state of the Fragment in case the app is no longer in the Foreground and being used.

Then from the layout of the Activity that will have a Fragment be used:

  <Fragment android: name = "com.example.news.ArticleListFragment"
             android: id = "@ + id / list"
             android: layout_weight = "1"
             android: layout_width = "0dp"
             android: layout_height = "match_parent" /> 

Following the example we talked before, suppose that the first list I see the detail of the Motorola Atrix 4G and then the iPhone. I want to play Back in the detail being the iPhone to show me the details of Motorola, want not I go to the previous activity. As we do this?
What we have to do is just add the different fragments to the Activity Stack of the task that we are running. This is done by performing the change of Fragment using a FragmentTransaction.
An example is the following

  Fragment newFragment = new ExampleFragment ();
 FragmentTransaction getFragmentManager transaction = (). BeginTransaction ();
 transaction.replace (R.id.fragment_container, newFragment);
 / / The following line added to BackStack LO.  It is especially important
 transaction.addToBackStack (null);
 transaction.Commit (); 

This was a mini review of Fragment that is what is being too hard on new versions of Android.
As Lionel says Level X: I hope you liked it .......... CHAU

EDIT: After some research I found that actually if you can use earlier versions Honey to integrate it with previous phones.
We got the Android Compatibility Package and then just add to our Manifest for the use_library Fragments API.

Read More

Problems with Eclipse Android slow and get the Sources

April 28

Problemas de Eclipse lento con Android y obtener los Sources

Good!

I recently started programming with Android. The truth that looks very interesting. I recommend reading "Android In Action" if interested.

As soon as I started I ran into 2 problems:

  • Eclipse auto-complete when we want something locks up and goes very slow
  • We do not have the source code to know exactly what Android is doing to fix problems quieter

After a long search on the internet I found the answer to both problems which coincidentally is the same.

Lowering the android source code and put it to you to take the Eclipse, the latter stops crashing.

Android is hosted on a server git. This server supports say that we want to download the repository in tar.gz format (zipped). To do this we hit the following url:

http://android.git.kernel.org/?p=platform/frameworks/base.git a = snapshot; h = <version of API>; sf = tgz

Version of the API must be one of the following or any more again:

  • gingerbread - Android 2.3
  • froyo - Android 2.2
  • eclair - Android 2.1
  • donut - Android 1.6

An example URL would then:

http://android.git.kernel.org/?p=platform/frameworks/base.git a = snapshot; h = froyo; sf = tgz

Once downloaded the archive containing the source code, we have to do is unzip and copy all the contents to:

<android-SDK> \ platforms \ android-<API version> \ sources

We begin now with some draft eclpse Android using the version for which we lowered Sources and we will have solved all problems. You can download the sources for all versions of Android that we have in the PC.

Read More