Saturday, 14 February 2015

iOS 8 vs Android 5.0 Lollipop Review: Material Difference

Requirements And Availability
All of which brings us to what has long been Apple’s biggest advantage over Android and it remains perhaps the one area where Lollipop is powerless to catch up.
Buying an iPhone means getting the latest iOS updates as soon as they come out. In fact, as was seen with the buggy iOS 8.0.1 release that was ultimately withdrawn, not upgrading can actually be the hardest thing. Furthermore you will be guaranteed at least three years of upgrades.
For Android it remains far more of a lottery. Google’s move to push the Nexus range into the premium bracket with the Nexus 6 and Nexus 9 shows it is now keen to move a pure Android experience front and centre, though its launch stock struggles show that can be easier said than done.
iOS (left) still gets updates much faster than Android (right) with this Nexus 5 still awaiting Lollipop
iOS (left) still gets updates much faster than Android (right) with this Nexus 5 still awaiting Lollipop
Furthermore Google retains no control over how quickly its handset partners upgrade their phones or how fully they cover Android with their own skins. Google gave partners an usually long heads up by announcing ‘Android L’ way back in June at Google I/O 2014 and it means many are announcing they will have upgrades ready for their key handsets within 1-2 months, but this still doesn’t compare to iOS roll-out times.
That said what mustn’t be forgotten is the role of ‘Google Play Services’. This is “used to update Google apps and [third party] apps from Google Play” but in reality what it has done is enable Android to be far more modular. Consequently core apps like Gmail, Google Maps, Google Calendar, YouTube, Google Keyboard and more are now updated through the Play Store.
As such even older phones not updated to Lollipop will still get the latest Material Design apps, even long after Apple has stopped supporting iPhones and iPads with iOS updates. Yes, Google Play Services is not a perfect solution but it is a very good (and often overlooked) backup plan.
Bottom Line
iOS 8 and Android 5.0 Lollipop are both game changers for their respective platforms. iOS now finally has the flexibility and functionality to counter the age-old taunts of Android owners. Similarly Android now has class leading design, speed and battery efficiency to match anything Apple has produced.
With some justification cynics can point to the fact that both platforms have effectively plugged their weakest areas by copying what is good from their rivals. This is largely true, but it is also no bad thing.
iOS 8 in landscape mode on the iPhone 6 Plus (image credit: Gordon Kelly)
iOS 8 in landscape mode on the iPhone 6 Plus (image credit: Gordon Kelly)
As such there is no standout winner here, other than the users of each ecosystem. But for me Android 5.0 Lollipop – at least in its pure form – is currently the most interesting.
Yes the potential of Apple Pay looms large for iOS, but what sways me towards Lollipop is Material Design. Whereas Apple Pay improves upon Google Wallet, Material Design is something truly bold and new.
Android 5.0 Lollipop (image credit: Gordon Kelly)
Android 5.0 Lollipop on the Nexus 9 (image credit: Gordon Kelly)
Gone forever with it is the idea that a makeover should be purely superficial and it fuses good looks with a new, consistent visual language which is not only a joy to use, but genuinely guides the user in operation.
It is worth asking how often Material Design will be seen under the skins of non-Nexus Android 5.0 handsets. But in an era where two mobile juggernauts are increasingly without weak spots, it is a moment of real inspiration that can change how we think about user interface design and that sees Lollipop win my vote.

iOS 8 vs Android 5.0 Lollipop Review: Material Difference Continued from page 1

Features – Expansion vs Refinement
The tables are turned when it comes to features. While Lollipop is all about refining existing functionality, iOS 8 takes major steps forward. It must be said that for the most part the two operating systems are still in the habit of ripping off the best aspects of one another, but this is no bad thing.
For example, iOS 8 now kills annoying pop-ups with more discreet notifications, the majority of which are also now actionable like in Android (for example, reply direct from a new message notification). It also supports Widgets like Android but only within the Notification Center and has song recognition built into voice searches like Google Voice Search.
The similarities continue with expanded sharing options so you can share content with any installed app again like Android, rather than the rather limited selection in iOS 7, and there is now support for swipe typing (made popular on Android) and third party keyboards, ditto.
iOS 8 finally brings support for third party keyboards like Swiftkey and its swipe typing
iOS 8 finally brings support for third party keyboards like Swiftkey and its swipe typing
Read more – The Best iOS 8 Keyboard Replacements
None of this is to belittle iOS. These are major features. They dramatically improve the user experience and also in many ways signal a welcome change of attitude from Apple in letting third party app developers integrate more tightly into the core of iOS.
Furthermore, while iOS has now caught up with many of Android’s best features, it has also charged ahead with innovative new ones like HealthKit and Apple Pay (more in the ‘Differentiators’ section on the next page). As such iOS 8 comes out firing and snuffs out many of the smug stereotypes Android users have long made about the platform.
iOS 8 adds many new features including direct notification replies, upgraded multitasking and widgets
iOS 8 adds many new features including direct notification replies, upgraded multitasking and widgets
By contrast Android Lollipop is less about new features and more about refinement.
Notifications have long been the driving force of Android (and since copied by iOS and Windows Phone) and it gets an entirely new look with pull down shortcuts, expandable notifications with more quick shortcut commands and the ability to disable, snooze or prioritise the notifications from every app from one place. Being able to control this firehose is a godsend.
Android 5.0 Lollipop screen lock has radically updated notifications and automatic facial unlock
Android 5.0 Lollipop screen lock has radically updated notifications and automatic facial unlock
Lollipop has refined multitasking with the App Switcher moving a card-like interface which no longer breaks down by app, but instead by the relevant aspect of that application. So, for example, different tabs within Chrome or different documents within Google Docs get their own card allowing you to quickly switch between them.
This means you are no longer going back just to an app, but to a specific thing within that app and Google has also integrated the search bar so it is available at all times.
Android 5.0 Lollipop switches to a cards-based multi-tasking UI
Android 5.0 Lollipop switches to a cards-based multi-tasking UI
Read more – How Google Changed Reinvented Android And Nobody Noticed
Then again Lollipop is not too proud to do some blatant copying of its own. From iOS it steals the long awaited Do Not Disturb mode as well as more fully realised lockscreen notifications which iOS has had for years. There is also finally a ‘Tap and Go’ mode which allows owners to restore settings and folder structures from a previous handset – another iOS staple – though it doesn’t yet transfer third party app settings.
64-bit chipset support also arrives and Google has followed Apple in improving developers’ access to graphics processing power, much like ‘Metal’ found in iOS that recently enabled Battlefield 4 to run on an iPad. Finally on the hardware side, Lollipop brings support for USB audio, a similar move to Apple which enabled audio support via the Lightning port – a move which could ultimately do away with the 3.5mm headphone jack.
Android 5.0 Lollipop brings welcome guest and multi-user modes
Android 5.0 Lollipop brings welcome guest and multi-user modes
Meanwhile Lollipop borrows heavily from third party handset makers (most notably Motorola) with a Battery Saver mode (part of ‘Project Volta’ – more in the Battery Life section), double tap to wake command and access to ‘OK Google’ voice commands, even when a phone is locked.
Finally Google steals from itself bringing the profiles mode from Android tablets to all Android phones. This allows you to switch profiles between family members in just a few taps, set up a guest mode or even pin certain apps so they cannot be exited – great for parents giving devices to their children.
New innovations are less obvious this time around, though I would count Material Design as a massive one.
Perhaps the most interesting is Lollipop’s approach to security. Where Apple uses TouchID, Android can now perform handset unlocking through automatic facial recognition while you check lockscreen notifications and it works seamlessly. It also pairs with Android Wear devices so the handset is never pin or password locked while both the handset and wearable are paired and therefore in close proximity. Clever stuff.

Differentiators – Real and False
With iOS 8 and Android 5.0 Lollipop drastically improving their functionality and design respectively the two have never been closer, but there are still some key differences.
First the false ones: Apple Pay and Healthkit, Google Wallet and Google Fit, Apple Watch and Android Wear, Android Auto and Apple CarPlay.
Yes all four are extremely important products (and they are only going to get more influential as time goes on), but they aren’t significantly different from one another.
Most notably Apple Pay on its own isn’t particularly new. Google Wallet has long offered touch payments using NFC, but traction is only now being gained with Apple also aboard the wireless transaction bandwagon. What Apple Pay does do is reassure its users thanks to its integration with Touch ID and refusal to store card details.
Google Fit in Android 5.0 Lollipop
Google Fit in Android 5.0 Lollipop
Consequently, while Wallet is the much older service, Pay has the momentum and a battle royale is going to be fought here over the next few years.
Read more – Doctors Raise Concerns About Apple Healthkit
The next false differentiators are the newly launched Apple HealthKit and Google Fit. Both act like catch-all umbrellas for the myriad of fitness apps available in both stores (like the roles of Game Center on iOS and Play Games on Android for your health) and they can compile all their data in one place.
Where they may ultimately differ is partnerships. Some popular apps, like Runkeeper, have already committed to support both HealthKit and Fit but other major companies like Fitbit have yet to commit in either direction. As such the gap may increase, but neither is likely to score an indisputable victory over the other.
Apple HealthKit on iOS 8
Apple HealthKit on iOS 8
Similarly wearables are still too early in their lifecycle to know who will win out. Android Wear has great potential and first generation devices are available now, but they remain limited. Meanwhile the much hyped Apple Watch (complete guide) has the potential to change the industry, but won’t be cheap and the reviews are not yet in.
Read more – Moto 360 Review: The Best Android Wear Smartwatch
Apple CarPlay (image courtesy of Apple)
Apple CarPlay (image courtesy of Apple)
As for Android Auto and Apple CarPlay, both aim to put their respective platforms at the heart of your car’s entertainment system. Support for both remains incredibly limited so it isn’t something we can speculate on at this point, but the duo have a wide array of car manufacturers signed up so it is all about whether and when they deliver.
Android Auto (image courtesy of Google)
Android Auto (image courtesy of Google)
So where do the real differentiators lie? Mostly in the smaller details and well worn tracks.
Notably where iOS has mimicked Android features they aren’t necessarily all as fully realised. The aforementioned third party keyboards cannot be used in certain situations (such as with a banking app or in some form filling) and the decision to restrict widgets to the notification center is bizarre as they make ideal, informative fillers in hard to reach areas of the screen.
Android 5.0 Lollipop has far greater layout flexibility
Android 5.0 Lollipop has far greater layout flexibility
On larger screens Android also retains an advantage, despite reachability, by keeping its core navigation buttons at the bottom of the screen within easy reach and by allowing icons to be positioned anywhere. Android has long been used on big screen phones and that experience shows.
Apple’s ongoing insistence that icons must fill up a screen starting from the top left corner is a handover from when iPhones had easy to reach top left hand corners. And you still can’t hide apps from your homescreens so everyone now has a ‘Rubbish’, ‘Unused’ or worse named folder on their iOS devices.
iOS 8 still forces users to make 'unused' or 'junk' folders and start from the top left hand corner
iOS 8 still forces users to make ‘unused’ or ‘junk’ folders and start from the top left hand corner
Read more – Apple Made One Massive Mistake In iOS 8
That said where iOS does excel is in its newly launched ‘Continuity’ functionality. This allows users to ‘hand-off’ calls, messaging and more to different devices (notably only Apple hardware), depending on which you are using at any one time. Yes much of Android is founded on Cloud-based continuity (emails, calendar appointments, remote app installation, Hangouts messaging, etc) which works smoothly across OS X, Chrome OS and Windows, but Apple has taken a step ahead here.
More to the point, Continuity’s significant ambition is realised at the first attempt and I had no problem with hand-offs at any point during this review. No doubt Google is going to hit back hard here given its Cloud-focus, but for now Apple has stolen a lead.
Continuity works across iOS and OS X.
Continuity working across iOS and OS X.
iOS does also still present the safer environment. Android’s susceptibility to viruses is misunderstood, stemming from its ability to access third party app stores, and Google Play is extremely safe but the association may never be lost.
The same goes for iOS and Android hardware. iPhones are consistently excellent, if expensive and restricted to Apple standards while Android offers near limitless choice but you need to dig out the diamonds in the rough. For the novices, sticking with Motorola’s budget (Moto E), bargain (Moto G) and premium (Moto X) is a safe route, but choices (including Google’s Nexus 6 phablet, Nexus 9 tablet and the excellent LG G3 and Sony Xperia Z3 Compact) are plentiful.

Camera – Software Vs Hardware
One of the less discussed areas of major change in both iOS 8 and Android 5.0 Lollipop is their bolstered camera software.
iOS brings a timer mode, manual exposure control, enhanced photo editing (colour/brightness) and time lapse video. Lollipop does less, but makes one crucial change: direct access to edit RAW files.
iOS 8 camera UI enables new levels of user control
iOS 8 camera UI enables new levels of user control
This single change in Lollipop is huge and early tests show it can dramatically improve the images produced by every single smartphone or tablet once it is installed.
This could close the gap on iOS’s biggest advantage: Apple’s bespoke image processing which is tailored to each iPhone’s specific camera sensor. Android can’t hope to do this given the huge variety of hardware it runs, but access to RAW files means some incredible third party apps can be written for specific handsets.
iPhone 6 (left), iPhone 6 Plus (right) - fractionally more accurate colour reproduction on latter (image credit: Gordon Kelly)
iPhone 6 (left), iPhone 6 Plus (right) – fractionally more accurate colour reproduction on latter (image credit: Gordon Kelly)
Furthermore Google itself should be able to produce enhanced end results and take some of the pressure off Android handset makers to keep coming up with ever greater and higher megapixel lenses to compensate.
Read more: Android 5.0 Camera Tests Show Update Instantly Improves Every Smartphone
Battery Life – Best Vs Better
One of the (quite right) stereotypes about iOS is that it is more efficient than Android. It runs faster on weaker hardware and is less of a battery drain. Or it was.
Google started the fightback with Android 4.0 KitKat, recoding the platform from the ground up to run smoothly on even low end hardware (as best demonstrated by Motorola’s Moto E and Moto G). Now Android 5.0 Lollipop is finishing the job by dramatically improving battery life.
At its heart is Project Volta. This is an initiative designed to cut back on unnecessary operations such as apps waking the phone up repeatedly, only running apps’ house cleaning necessities in batches – often only when plugged in – and stopping continual networking requests (polling) from Android and third party apps when there is no network connectivity.
Android 5.0 Lollipop now offers superb battery life (image credit: Gordon Kelly)
Android 5.0 Lollipop now offers superb battery life (image credit: Gordon Kelly)
Finally Google has added ‘Battery Historian’, a deep analytics tool which it can use to track and tweak battery consumption so the OS continually learns.
So while a damaging WiFi bug hit battery life in a near final build of Android Lollipop earlier this week (it is now fixed), preliminary tests seem hugely encouraging. Notably Ars Technica found when Android Lollipop was installed on a Nexus 5 (a handset famous for its battery life Achilles Heel) it lasted a remarkable 36% longer.
Read more – Nexus 5 Long Term Test
This is a potential game changer, especially for latter Android handsets like the Galaxy S5 and phablets like the Note 4 which already deliver strong battery life due to their newer chipsets.
Lollipop also now couples this with a battery saver mode that automatically kicks in at 15% capacity (it can be switched off) to add another 90 minutes of usage. It also cleverly changes the top and bottom status bars to red so you won’t forget it is on. Furthermore Lollipop also sees Android move to its new ‘Android RunTime’ (ART) compiler which launches apps faster and more efficiently, with the only downside being a slightly larger install size for each app.
Read more: Android RunTime: An Easy Hack To Make Your Phone Last Longer
iPhone 6 (left) is easily outlasted by the iPhone 6 Plus (right)  - image credit: Gordon Kelly
iPhone 6 (left) is easily outlasted by the iPhone 6 Plus (right) – image credit: Gordon Kelly
What about iOS? While Android makes all the fresh running here, the truth is iOS has little to prove. The iPhone 6 doesn’t have stellar battery life, but that is down to the small battery Apple has fitted (its 1810mAh capacity is 50% less than many Android rivals). This is highlighted by the iPhone 6 Plus whose 2915mAh battery can last 3-4 days between charges with light use.
The key to iOS’s success is its remarkably efficient standby time. Leave an iPhone 6 or 6 Plus unplugged overnight and it will lose 1-2% charge. Until Lollipop, Android had never been able to get near that.
Project Volta changes this and Android is now every bit as fast as iOS and virtually as efficient, while having phones with significantly larger batteries than the current iPhone models. Android has just about caught up.
Of course the risk is that handset makers and their (often unwanted) skins will undo all Volta’s work, but only time will tell.

iOS 8 vs Android 5.0 Lollipop Review : The material Difference

This week Google announced the launch of Android 5.0 Lollipop, the most radical design overhaul of Android since it launched in late 2008. Six weeks ago Apple announced iOS 8, one of the most exciting and expansive releases of iOS since it debuted in 2007 (under the name ‘Mobile OS X’). It is now time to put them head-to-head.
Design – Material Design vs Flat Design
For Apple the hard work was done last year with iOS 7. Out went Steve Jobs’ beloved skeuomorphism and in came minimalist flat design. It wasn’t met with universal praise and it certainly became more cartoonish, but iOS 7 was clean, modern and established Apple’s new design language.
iOS 8 builds on this good work adding more consistency and refining iconography, but it also has some smart design tweaks with regards to notifications, widgets, multi-tasking and keyboard interaction which I’ll go into in more detail in the Features section on the next page.
iOS 8 (left) and Android 5.0 Lollipop (right) homescreens - image credit: Gordon Kelly
iOS 8 (left) and Android 5.0 Lollipop (right) homescreens – image credit: Gordon Kelly
In addition to this iOS 8 makes better use of gestures for navigation: most notably a swipe from the left edge to go back and a double tap of the home button for ‘Reachability’ which slides the whole screen down. These are smart moves given the jump in screen size with both the iPhone 6 and, in particular, the iPhone 6 Plus.
By contrast Android 5.0 Lollipop represents the biggest redesign in Android history. Like iOS 7, it sees Google ditch almost all vestiges of skeuomorphism in favour of a flatter, more minimalist design. But unlike iOS, Material Design is more than respray. It is an ideology.
As the name suggests, Material Design is more about physicality than superficiality. It has specific physical rules about how buttons should react when touched, how different UI layers should interact and how animations are both trigger and unfold and this is being pushed on third party app developers as well.
The aim of all this is to not only introduce a highly consistent experience for the user, but to enhance their understanding of what is happening. For example, animations originate from the point of contact, key action buttons are highlighted in a standout colour and layouts are consistent from app to app.
Comparing the iOS 8 and Android 5.0 Lollipop is a shock, because for the first time in Android history it has become more design focused than iOS. The ugly duckling is finally a swan. Its design is both visual, instructional and altogether more ambitious.
Not everything is right out of the gate. If anything Material Design is overly white and spread out (you can see less information in most apps – eg fewer emails, lines of text, etc) whereas its predecessor Android 4.4 KitKat was too dark and dense.
Android 4.4 KitKat (above) and Android 5.0 Lollipop (below) - soft key redesign will split opinions, especially the reduced size
Android 4.4 KitKat (above) and Android 5.0 Lollipop (below) – soft key redesign will split opinions, especially the reduced size
Furthermore I’m not the biggest fan of the PlayStation controller-inspired new soft keys and it remains to be seen how Material Design will be adopted into the skins of third party handset manufacturers. Much of the good work could be undone.
That said Material Design is not just a huge step forward for Android, it is something Google will transition to Android Wear and its browser-based services. It combines visuals and substance into a methodology with the potential to influence the future design of every operating system going forward – both desktop and mobile.

cara membuat aplikasi android part IV


Article Index
Android Adventures - Getting Started With Android Studio 1.0
Project Structure
The Designer And The Code
Running the App

Get Started with the Emulator 

There are two distinct ways of running an Android app using Android Studio.
You can use the emulator or a real Android device.
Eventually you will have to discover how to run an app on a real connected Android device because the emulator only allows you to test a subset of things and it is slow.
However for the moment running your first app on an emulator is quite enough to get started.
All you have to do is click the green run icon in the top toolbar - or use the Run,Run "app" menu item.
When you do this for the first time it will take a while for the app to be compiled. Subsequent runs are faster.
When your app is compiled and ready to do you will see a dialog box appear which allows you to either select a running emulator or start one going. When you first install Android Studio you get a default emulator - a Nexus 5 running KitKat - and you can simply select Launch emulator and click OK to get it running.  If you need other devices you can use the AVD Manager to define them - a subject we will return to.

emulator1

It usually takes quite a time for the AVD to start because it not only has to initialize the emulator it also has to boot Android just like a real device. There are also a few moments where nothing seems to be happening. Don't panic, something will happen eventually. You can monitor the loading of the emulation in the Run window which appears automatically at the bottom of Android Studio.
It does take a long time to start. However, you only have to do this once per debug session because the AVD can be reused and the app reloaded each time you make any changes, and this is quite a quick operation. Most Android programmers get into the habit of starting an AVD when they first start using Android Studio so that it is ready for testing whenever the program is.
Finally, remember to wait until the Android operating system is loaded and you see the familiar home screen before you start to wonder where your app is. Even when it is loaded it is a good idea to give it a few seconds for Android Studio to notice it and to upload your app. As the emulator is a complete Android device, you also need to unlock it. As long as you have been patient enough you should see your app.

emulatorrun

In our case this isn't particularly impressive - just the words Hello Android World - but when you think of the journey traveled it really should impress.

From this point you can now modify the code or the layout and run the app again to see the effects of the changes. With luck you shouldn't have to load the emulator again. If anything goes wrong and you get in a mess then simply delete the project and create it from scratch again.
You still have a lot to discover about how to extend the app and make it useful but - the adventure has begun.

Summary

  • Android Studio makes creating Android apps a lot easier than other approaches and since the release of version 1.0 it is the only official way to do the job.
  • An app has at least one Activity and this defines a screen layout and a behavior. An Activity doesn't have to have a UI but in most cased it does have one. 
  • To create a simple application use the Blank Activity template with no extras selected.
  • The screen layout is controlled by an XML markup file, Main_Activity.xml in our case stored in the res directory.
  • Android Studio provides a drag-and-drop designer that allows you to create a UI without having to work directly with theXML.
  • The behavior of the app is controlled by a Java file, MainActivity.java in our case stored in the java directory. You can edit the code in the Java file directly in Android Studio. The Java has to load and display the layout defined in the XML file.
  • To run an app you need either an emulator based AVD or a real Android device connected to the machine.
  • When you run the app you can select which AVD or which hardware device is used to test it. When you first start simply use the default AVD a Nexus 5. 
You can modify and re-run your app without having to restart the AVD or any real hardware connected to the machine.

cara membuat aplikasi android part III

First let us look at the XML layout file.
Double click on activity_main.xml file in the Project tab and the file will open (if it isn't already open).
If it is already open you can also select its tab displayed just above the editor area. You can select any file that is open for editing by selecting the its tab.
You can work with the XML directly to define where all the buttons and text goes and later you will learn at least how to edit it when things go wrong or to fine tune it but - Android Studio provides you with a very nice interactive editor and this is worth using.
As you become more experienced the idea of switching between a design view and an XML view will become second nature. Think of the interactive editor as a very easy way of generating the XML that otherwise would take you ages to get right.
If you look at the bottom left you will see two tabs - Design and Text:
designertabs
You can switch between editing the XML as text and editing it in the drag-and-drop designer simply by clicking on the tab.
If you now click on the tab the window will display the designer but be patient the first time you do this it might take a few moments.
The designer looks a little too much to take in when you first see it but you will quickly get used to it.

designer2

On the left is a Palette of all of the components - buttons, text, checkboxes and so on - that you can place on the design surface.
In the middle is the design surface and this defaults to the screen size and appearance of the Nexus 4. You can select other devices to work with.
On the right you have the Component Tree which shows you the structure of your layout, that is how different UI components are contained inside others - its the same as the nesting structure of the XML file. You can use the Component Tree to select individual UI components by clicking on their names. You can also select components on the design surface but some times it is easier to use the component tree.
Below the Component Tree you have the Properties window that can be used to set the properties, such as width, height, color... of any component in the layout.
If you have used any drag-and-drop designer then this one will be familiar to you. If you have struggled with the detailed layout using a markup language be it HTML, XAML or XML then you will like how easy the designer makes building and testing a UI.
In the case of our sample program the only component uses is a single TextView already containing the text "Hello World". A TextView is the standard component we use when all we want to do is to display some static text.

hello

You can modify the greeting text if you want to. Select the TextView component either on the Nexus 4 image or in the Component Tree and use the Properties window to find its Text property. Change this to read "Hello Android World".
Alternatively you can simply double click on the TextView and enter "Hello Android World" directly in the dialog that appears - you can often change the main properties of an object by double clicking. If you do change it in this way you will also have to provide an id for the component otherwise an error is generated. This is a bug/feature and will probably be fixed in later versions of Android Studio.
Don't worry about the form of the original entry in the TextView starting with an @ and looking complicated just type the string in as given. The default entry makes a reference to a predefined string resource - something we can ignore for the moment along with the warning that Android Studio flags up to tell use that we are being naughty and not using  a resource string.   It is correct, it is always better to define the strings you use as a resource rather than directly embedding them in your app.
You can use the designer to create any UI you care to and you really don't have to get involved in the XML that corresponds to the layout.
The designer will automatically generate the XML needed to create the layout for you and modify it as you change the layout. If you really want to see the XML then all you have to do is select the Text tab at the bottom of the designer window.
<RelativeLayout xmlns:android=
              "http://schemas.android.com
                              /apk/res/android"
 xmlns:tools="http://schemas.android.com/tools"
 android:layout_width="match_parent"
 android:layout_height="match_parent"  android:paddingLeft=
          "@dimen/activity_horizontal_margin"
 android:paddingRight=
          "@dimen/activity_horizontal_margin"
 android:paddingTop=
          "@dimen/activity_vertical_margin"
 android:paddingBottom=
          "@dimen/activity_vertical_margin"  tools:context=".MainActivity">
 <TextView android:text="Hello Android World"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
 />
</RelativeLayout>

You should find it fairly easy to understand - read the <TextView> tag for example - but leave it to the designer to create and modify it. The quantities starting with @ are all references to things defined elsewhere in resource files.
We will return to the designer and the XML it generates later.

The Java

If you double click on the MainActivity.java file, or just select the MainActivity.java tab, you will see the code it contains.
Some of the code might hidden but you can inspect it if you want to by clicking the + buttons to expand it.
The important part of the code is:
public class MainActivity
                 extends ActionBarActivity{
 @Override
 protected void onCreate(
               Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
 }


There are two other functions below the onCreate function but ignore these for the moment - they implement features you didn't really ask for - useful but not when you are just getting started.
The onCreate function is the only thing that matters at the moment.
The onCreate function is called when your app is run and it is expected to create the view and do the whatever the Activity is concerned with.
As our Activity doesn't really do anything much the only thing onCreate has to do is first call the inherited OnCreate method i.e super.onCreate to do all the standard things and then use the setContentView function to select the XML file that determines the layout of the Activities screen.
The line:
  setContentView(R.layout.activity_main);
is the most important of all and really the only one that actually does anything. It gets the resource object that represents the layout as defined by the XML file created by the designer and makes it the current ContentView i.e. it is what is displayed on the screen.
That is it makes the connection between the layout you have defined using the designer and stored in the XML file and the user interface that appears on the devices screen.
We have more to learn about the resource object R but you can see that its main role is to form a link between your Java code and the resources that have been created as XML files by the designer among others.
As this is all our Activity does this is all the code we need.
While I agree it is hardly an "activity" it is enough to see the basic outline of an Android app and to see how to get it running - which is our next job.

cara membuat aplikasi android part II

The next page lets you select a template for your project. In this case the default Blank Activity is what you need. Every Android application consists of at least on Activity and this template generates a project with a single Activity ready for you to customize.

projectpage3

The next page lets you assign custom names for the various components of your project that the template generates. For a real project you would assign names that were meaningful but in this case you can accept the defaults:

projectpage4

Finally you can click the Finish button and wait as Android Studio creates all the files you need. Even a simple Android project has lots of files so again it all takes time.

First Look

When everything is ready you will see Android Studio for the first time.

Problems?

If you get any error messages - such as  "Missing styles. Is the correct theme chosen for this layout? " Then the chances are you have some left overs from a previous installation. Some times the only way to fix this is to delete all the .android, AndroidStudio and .gradle directories you can and then reinstall. If you have existing projects then don't delete AndroidStudioProjects.
Before you do any of this however it is worth trying the File,Invalidate Caches/Restart command. This usually works for "Missing styles" and similar errors.
As long as everything has worked you should be presented with a view of your new project starting off in the Designer selected.
AndroidStudio

Although there looks like a lot to master in Android Studio's UI most of it you will only visit occasionally. The key things to notice are that moving from left to right you have:
  • the project window
  • The designer split into its Palette and a Layout window
  • A component tree window and a properties window at the far right.
Most of the time you will be using the Project window and the Properties window. In the between the two you will see different editors depending on what sort of file you have selected.
in this case you have by default a layout file - activity_main.xml - selected and hence you have a layout editor in the middle of the screen.
More about layout a little later - first it is important that you know a little about the file structure of a project so that you can navigate to its different parts.

Basic Project Structure

When the project has finished building all of the files created can be viewed by opening the Projects tab. The main thing to notice is that there are a great many folders and files.
It seem almost unbelievable that the simplest Android app you can create involves so many files.
Don't panic.
Most of the files that have been created are autogenerated and most of the time you don't need to know anything about them let alone open or edit them. In fact opening and editing autogenerated files really isn't a good idea.
So let's focus on the files that matter to us.
For our simple program there are only two important files one that determines the Activity's behavior
MainActivity.java
and one that determines most of the visual appearance
Main_Activity.xml
You can set which activity is the one that the system starts but by default it is the single activity that you created and named when you set up the project.
In this case we named the activity MainActivity and its layout file Main_Activity - but you could change these defaults.
You can see the location of these two important files in the Project window:
PROJECT2A

The java directory is from your point of view where most of the construction of your app occurs so make sure you know where it is. The res directory is where you store all of the resources - layouts, bitmaps etc. that you app needs.
So while things look complicated at the moment the only two project files that matter to you, and your project, are MainActivity.java and activity_main.xml.

Anatomy Of An Activity

An Android app is made up of one or more Activities.
You can think of an Activity as being something like a web page complete with HTML to determine what displays and JavaScript to determine what it does.
In the case of an activity the layout is determined by the XML file in resource (res) directory and the behavior is determined by the Java  code in the Java directory.
The XML can be thought of as a markup language much like HTML or XAML.
It defines an initial layout for the screen when the app first runs. It is possible to generate new layout components at run time from the Java file. In fact if you really want to you can dispense with the XML file and generate everything from Java but as you will discover the XML markup approach is much the best way to do the job - because of the availability of the Designer.

So to be 100% clear:
  • the java file contains the code that makes your app behave in particular ways 
and
  • the .xml layout file contains a definition of the intial UI of your app.
Let's take a look at the two files that have been generated for our initial Hello World application beginning with the XML layout.

Cara membuat aplikasi android (Turorial Android Studio) Part I

Android represents a big potential market. It is also the most open of the "big" phone platforms. All the tools you need to create an Android App are free. You don;t need to pay anything to join a club to create and even distribute your Android App. If you want to sell using a well known marketplace such as Google Play or Amazon then there is usually a small annual fee, but you don't have to use any particular distribution method.
All that stands between you and your Android app is your imagination and programming ability. I can't do much to improve your imagination but I can help with the programming side of things.
In this ebook I will show you the fundamentals of Android programming. Not the tips and tricks, but how to think about what is going on - that is the general principles that will make it possible for you to master anything that you encounter that is new in the future.
What do you need to know to get started?
You need to be able to program in a modern object-oriented language. Java would be best as it is the language used to create Android apps but C#, C++, VB or anything similar are close enough in spirit to Java for you to be able to cope. You might well need to look things up about the specifics of particular features of Java but most of the time it should be obvious or obvious with the help of a few comments.
It isn't necessary to be an expert programmer because for a lot of Android programming you are simply using the features and facilities provided - that is a lot of Android programming is just a matter of following the rules.
However if you hope to create something unique and useful you will at some point have to add something of your own - and here creativity and skill are required. So you might not need to be an expert programmer to get started but you need to become one by the time you create your amazing app.
Fortunately practice is a good teacher and so learning to code for Android will actually help you learn to code.

Getting Started

This is a really good time to get started with Android because Google have released Android Studio which is an easy to use Android IDE - Integrated Development Environment.
Before this you had to use the Eclipse IDE and setup the SDK and other pieces of software needed. This wasn't difficult but Android Studio makes it easy and it makes programming Android easy. Put simply it is the way of the future and so worth your investment in learning it.
With the release of Android Studio Google has stopped work on the Eclipse addin and this means that Android Studio really is the only way to develop apps from now on.
So to get started.
I'm not going to spend a lot of time explaining how to install Android Studio in a step-by-step way - the Android website does a good job and it is more likely to be up-to-date. It is worth however just going over the basic principles.

First make sure you have the latest Java JDK installed - at least JDK 6.
If you don't have Java installed visit: Java Download
Once you have Java setting up Android Studio is easy:
  1. Download the Android Studio package from Android Studio Home page.
  2. Install Android Studio which also installs all of the Android SDK and tools you will need: Windows:
    1. Launch the downloaded EXE file, android-studio-bundle-<version>.exe.
    2. Follow the setup wizard to install Android Studio.
    Mac OS X:
    1. Open the downloaded DMG file, android-studio-bundle-<version>.dmg.
    2. Drag and drop Android Studio into the Applications folder.
    Linux:
    1. Unpack the downloaded ZIP file, android-studio-bundle-<version>.tgz, into an appropriate location for your applications.
    2. To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh. You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.
Accept any defaults that the setup program offers you - unless you have a good reason not to. It installs not only Android Studio, but the SDK, the virtual device and if you are using an Intel based machine a virtual device accelerator.

installer

On some Windows systems, the launcher script does not find where Java is installed and you will find that you can't run the newly installed Android Studio. It appears to start and then just vanishes.
If you encounter this problem, you need to set an environment variable indicating the correct location of the Java JDK.
Select
Start menu > Computer > System Properties >
                       Advanced System Properties.

Then open
Advanced tab > Environment Variables,
                      add new system variable

and setup JAVA_HOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.0_21.
There is a second problem that stops some installations working. As well as JAVA_HOME being set to the jdk directory you also need a PATH set to the bin directory. Use the same method of setting the environment variables but select the existing path variable and use the Edit button to add a path to the jdk bin directory, for example ;C:\Program Files\Java\jdk1.7.0_21\bin.   Note, you have to use a semicolon separator between each of the directory paths specified as part of the PATH variable.
Now you should be able to run Android Studio. If not the most likely cause of the problem is the JDK and so re-installation is a best first option.

Your First Program

You can opt to start Android Studio after the installation. You will probably not get straight to Android Studio the first time it starts as it downloads updates to itself and to the Android SDK. You just have to be patient.
When it finally gets going you will see the Welcome screen:
welcome2

If you have already created some programs you might well see them listed in Recent projects.
Assuming this is your first project select the Start a new Android Studio project option.
 newproj2

You can ignore the details of the new project for the moment. All you have to do is supply a name for your application - HelloWorld in this case.  Accept the other default that Android Studio has filled in for you.
When you click Next you are given the chance to pick what devices you are targeting. Again simply accept the defaults:

projectpage2