Showing posts with label android 5.0 lollipop. Show all posts
Showing posts with label android 5.0 lollipop. Show all posts

How to apply Material Design to your app

Changes HDDMigration to be made from Holo to Material.

The Android 5.0 SDK was released(if you want know step by step guide to installing it) last Friday, featuring new UI widgets and material design, our visual language focused on good design. To enable you to bring your latest designs to older Android platforms we have expanded our support libraries, including a major update to AppCompat, as well as new RecyclerViewCardView and Palette libraries.
In this post we'll take a look at what’s new in AppCompat and how you can use it to support material design in your apps.

We will go Step by Step to make changes for Material Design:

From ActionbarCompact to AppCompactv21

AppCompat (aka ActionBarCompat) started out as a backport of the Android 4.0 ActionBar API for devices running on Gingerbread, providing a common API layer on top of the backported implementation and the framework implementation. AppCompat v21 delivers an API and feature-set that is up-to-date with Android 5.0.

Three things to lookout or there might be three situations we need to consider.

Setting up the things first to migrate to appcompact v21:

Migrating from holo to material.

If you have followed the guidelines correctly then you don't require to change lots of thing in your app for migration.

A)Open the values Folder that contains the Themes.xml file and change accordingly.
values/themes.xml:
<style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
   
<!-- Set AppCompats actionBarStyle -->
   
<item name="actionBarStyle">@style/MyActionBarStyle</item>

    <!-- Set AppCompat’s color theming attrs -->
    <item name=”colorPrimary”>@color/
my_awesome_red</item>
    <item name=”colorPrimaryDark”>@color/
my_awesome_darker_red</item>
   
    <!-- The rest of your attributes -->
</
style>

Note:
B)If you are using gradle , add appcompat as a dependency in your build.gradle file:
just paste the below code in dependency
dependencies {
    compile
"com.android.support:appcompat-v7:21.0.+"
}
 C) Now you can remove all other actionbar styles.

2)Apply themes using new color palette attributes:
Checkout the new colors added in Android 5.0 Lollipop


D)Copy the code the themes,xml in values folder.
<!-- colorAccent is used as the default value for colorControlActivated,
         which is used to tint widgets -->
    <item name=”colorAccent”>@color/
accent</item>

    <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight, and colorSwitchThumbNormal. -->


In the next post we will look at how to create a Actionbar from scratch using the latest Material Design.

We would ask you to try this things and comments if you face with some problems,
Please like and share with other dev who are willings to try this out too!

Happy developing!Happy Coding!


Step by Step Guide to Setup Android 5.0 Lollipop Sdk in Eclipse

Steps to Set Up and Install Android 5.0 SDK Lollipop Emulator

The new android is out! The new Android 5.0 has lots of things in box for developers. For development to start we need to set up the environment with the latest SDK from Android.

In this tutorial we are going to set up android SDK for Api 21 that is the Android 5.0.So we will follow step by step guide to set up the SDK.


let's start

Android 5.0 SDk Setup

Step 1 -Download the Android SDK installer from: Android SDK Download. We’re going to use the Windows version here.
Andorid 5.0 Sdk install Step 1


Step 2 -Install the Android SDK files you just downloaded to any location.

Step 3 -Now, go the installed location and run the “SDK Manager” application.

NOTE: If you have downloaded the zipped version of SDK, go to the location where you extracted the zip archive.

Step 4 -Wait for the application to load and fetch all the Android SDK packages.

Android 5.0 SDK setup step4


Step 5 -Once completed, now select the packages you want to install. Here, we willbe only selecting the “Android 5.0 (API 21)” and “Android SDK Platform-tools” (underTools). You can leave the “Extras“.This should be enough. 

Android 5.0  lollipop Sdk setup  step 5


Step 6 -Click on “Install packages…”. You will be prompted to confirm the packages you chose to install and you would have to agree to the License information to proceed.

Step 7 -Click on the Install button and now wait for the all the packages to download and install.

Next we are going to setup the emulator so that u can run the android 5.0 apps

Step 8 - Go back to the SDK manager and run "AVD Manager" and set up as in the screenshot .



Step 9 - Select the Device You created and run it. That it. You will find the  virtual emulator running up!

Step 10 - Most important step share this guide with Other developers so that they can also set up the SDk Hassle free.

Start developing apps for Android 5.0
Happy coding!