Saturday 23 June 2012

AutoCompleteTextView - Example


An editable text view that shows completion suggestions automatically while the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.
> The drop down can be dismissed at any time by pressing the back key or, if no item is selected in the drop down, by pressing the enter/dpad center key.
> The list of suggestions is obtained from a data adapter and appears only after a given number of characters defined by the ThresHold.

See the Example below:
XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Enter the Name" />    
     <AutoCompleteTextView
    android:id="@+id/act1"
    android:layout_width="180dip"
    android:layout_height="wrap_content"
    android:padding="6dip"
   / > 
</LinearLayout>

Code:
package com.auto.ext;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
public class Autotext extends Activity {
AutoCompleteTextView auto;
String president[]={"manmohan","Bush","clinton","arafat","vajpayee","brown","apple1","apple2","apple3","apple4"};
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        auto=(AutoCompleteTextView)findViewById(R.id.act1);
        ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,president);
        auto.setAdapter(adapter);
        auto.setThreshold(2);

    }
}

See the Output Screen:

More About AutoCompleteTextView Click here..



Toast - Example

A Toast is a view containing a quick little message for the user. Like Dialog appearance.

See the Example below:

XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

<Button 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="CLick Me.."
    android:id="@+id/click"
    android:layout_gravity="center"
    />

</LinearLayout>

Code:

package com.toast.exm;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class ToastexampleActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button b1=(Button)findViewById(R.id.click);
        b1.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub
Toast.makeText(ToastexampleActivity.this, "Your are Clicking..", Toast.LENGTH_LONG).show();
}
});
    }
}


See the Output Screen:



More About Toast Click here..

Friday 22 June 2012

ScrollView

Scroll view supports only one child as in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects. A child that is often used is a Linear Layout in a vertical orientation, presenting a vertical array of top-level items that the user can scroll through.
> Scroll View supports only vertical scrolling.
> In ScrollView they cant support Listview placed as child.


See the Example:


<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    >
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 1st Text"
        android:textSize="12dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 2nd Text"
        android:textSize="14dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 3rd Text"
        android:textSize="16dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 4th Text"
        android:textSize="18dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 5th Text"
        android:textSize="20dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 6th Text"
        android:textSize="22dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 7th Text"
        android:textSize="24dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 8th Text"
        android:textSize="26dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 9th Text"
        android:textSize="28dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 10th Text"
        android:textSize="30dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 11th Text"
        android:textSize="32dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 12th Text"
        android:textSize="34dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 13th Text"
        android:textSize="36dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 14th Text"
        android:textSize="38dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 15th Text"
        android:textSize="40dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 16th Text"
        android:textSize="42dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 17th Text"
        android:textSize="44dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 18th Text"
        android:textSize="46dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 19th Text"
        android:textSize="20dp"
        />
    <TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="This is 20th Text"
        android:textSize="22dp"
        />
</LinearLayout>
</ScrollView>


See the Output screen:





More about ScrollView Click here..

Relative Layout

Relative Layout is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or in positions relative to the parent RelativeLayout area (such as aligned to the bottom, left of center).


see the Example below:



<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >


    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:text="Left Top" />


    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:text="Right Top" />


    <Button
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:text="Left Bottom" />


    <Button
        android:id="@+id/button4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:text="Right Bottom" />


    <Button
        android:id="@+id/button5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/button1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="138dp"
        android:text="Center" />
    
</RelativeLayout>


See the output screen:




More about Relative Layout Click here..


Thursday 21 June 2012

Frame Layout

FrameLayout is designed to block out an area on the screen to display a single item.


> FrameLayout should be used to hold a single child view, because it can be difficult to organize child views in a way that's scalable to different screen sizes without the children overlapping each other.


however, add multiple children to a FrameLayout and control their position within the FrameLayout by assigning gravity to each child, using the android:layout_gravity attribute.


See the Example below.



<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
   <ImageView 
       android:src="@drawable/images"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_gravity="center"
       />
   <TextView 
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Team Android 4 u"
       android:layout_gravity="center"
       android:layout_marginTop="80dp"
       android:textColor="#0C05E6"
       android:textSize="20dp"
       />
</FrameLayout>


See the output Screen below..



More about Frame Layout Click here..


Table Layout

Table layout contains rows and columns. The Rows are defined in the layout XML, and the Columns are determined automatically by Android.
> Table Layout containers do not display border lines for their rows, columns, or cells. Each row has zero or more cells; each cell can hold one View object.


Table Row
> A Table Row should always be used as a child of a Table Layout. If a TableRow's parent is not a Table Layout, the TableRow will behave as an horizontal Linear Layout.


Here is the example for table layout.



<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
   <TableRow>
       <TextView 
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Name"
           />
       <EditText 
           android:layout_width="wrap_content"
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:hint="Enter your Name"
           />
   </TableRow>
   <TableRow>
       <TextView 
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Password"
           />
       <EditText 
           android:layout_width="wrap_content"
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:hint="Enter your Password"
           />
   </TableRow>
   <TableRow>
       <TextView 
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Email"
           />
       <EditText 
           android:layout_width="wrap_content"
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:hint="Enter your Mail ID"
           />
   </TableRow>
   <TableRow>
       <TextView 
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="City"
           />
       <EditText 
           android:layout_width="wrap_content"
           android:layout_weight="2"
           android:layout_height="wrap_content"
           android:hint="Enter your City"
           />
   </TableRow>
   <TableRow 
       android:gravity="center"
       >
     <Button 
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Click Here.."      
       />  
   </TableRow>
   
</TableLayout>



See the output Screen


More about TableLayout click here..

Absolute Layout


>  Absolute Layout is idea of implement widgets or view in absolute position.

> You can Specify X and Y- Co-Ordinates for every view you adding.

See example below:


<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="40dp"
        android:layout_y="74dp"
        android:text="TextView"
        android:textColor="#ED4060" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="97dp"
        android:layout_y="108dp"
        android:text="TextView"
        android:textColor="#F51B76"/>

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="24dp"
        android:layout_y="169dp"
        android:text="Large Text"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="#7360F0" />

    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="124dp"
        android:layout_y="200dp"
        android:text="Medium Text"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="#60F062" />

    <TextView
        android:id="@+id/textView5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="189dp"
        android:layout_y="134dp"
        android:text="Small Text"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="#F0F70F"/>

</AbsoluteLayout>

See the output.


More about Absolute Layout Click here..

LinearLayout - Vertical & Horizontal Orientation

Here i tell you how to create a Linear Layout example.

LinearLayout is depends upon Orientation.

Default orientation is "vertical"

Create new android project.
    > open main.xml
    > Paste below code


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Enter the Name"
        android:textColor="#F5166F"/>

    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:hint="Enter your Name"
        />
   <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Enter the Password"
        android:textColor="#F5166F"/>

    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:hint="Enter your Password"
        />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="Click"
        />
 
</LinearLayout>

This is output screen of LinearLayout with Vertical Orientation



This is the Horizontal orientation source code.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Enter the Name"
        android:textColor="#F5166F"/>

    <EditText 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Enter your Name"
        />
</LinearLayout>


Here is output screen of Horizontal Orientation output

More about Linear Layout Click here..



Wednesday 20 June 2012

Hello World

Hello World

Here i Explain how to create a new project.

Here is a description of each field:

Project Name
This is the Eclipse project name — the name of the directory that contains the project files.
Build Target
This is the version of the Android SDK that you're using to build your application. For example, if you choose Android 2.1, your application will be compiled against the Android 2.1 platform library. The target you choose here does not have to match the target you chose for your AVD; however, the target must be equal to or lower than the target you chose for your AVD. Android applications are forward-compatible, which means an application will run on the platform against which it is built as well as all platforms that are released in the future. For example, an application that is built against the 2.1 platform library will run normally on an AVD or device that is running the 2.3.3. The reverse is not true.
Application Name
This is the human-readable title for your application — the name that appears on the Android device.
Package Name
This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity is generated.
Your package name must be unique across all packages installed on the Android system; for this reason, it's important to use a standard domain-style package for your applications. The example above uses the "com.example" namespace, which is a namespace reserved for example documentation — when you develop your own applications, you should use a namespace that's appropriate to your organization or entity.
Create Activity
This is the name for the class stub that is generated by the plugin. This is a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application.
Min SDK Version
This value specifies the minimum API Level on which your application will run. The Min SDK Version should be the same as the Build Target you chose. For example, if theBuild Target is Android 2.1, then the Min SDK Version should be 7 or lower (it can never be higher than 7). For more information, see Android API Levels.
Other fields: The checkbox for "Use default location" allows you to change the location on disk where the project's files are generated and stored.



Choose the Target,and Click Next >


Set application name, package name, Activity and choose minimum SDK.



src > includes the java files.

gen> includes the R.java file.

R.java generates the resources,drawables..
That is automatically generates,after you includes resources in the project.

The defined constants cover the following resource types
anim
array
attr
color
dimen
drawable
id
layout
plurals
raw
sting
style
styleable
xml


Android 2.2 > library of android 2.2

assets > Adding fonts and HTML files.
            the assets directory can be used to store any kind of data. You access this data via the AssetsManager which you can access the getAssets() method.

bin > Includes the apk file you are running project.

res > res folder includes drawables, layouts, values, menus.

Manifest > manifest is information about a project,version code,version number , what permission you added, and activity informations.


This is a structure of android project.






To run the Project,

It will be run in emulator, as this below picture.





Monday 18 June 2012

Introduction to Android


Introduction

1. What is Android?
2. What do we need to develop Android applications?
3. Eclipse Update Manager for Android Development Tools (ADT)
4. Configuration
5. Device for Emulation-Android Virtual Device (AVD)

1. What is Android?

Android is operating system based in Linux with Java programming interface, targeted at mobile hardware such as phones and tablet computers. It seems that it keeps increasing market share in smart phone and even trying to get footing into TV world (Google TV with Android OS). It provides tools, Example a compiler, debugger and a device emulator as well as its own Java Virtual Machine (Dalvik). Android is created by the Open Handset Alliance which is lead by Google.
Android uses a special Java Virtual Machine (Dalvik) which is based on the Apache Harmony Java Implementation. Dalvik uses special bytecode there you cannot run standard Java program on Android but   you have to use the Android complier to create this special bytecode.
This is Android Device which contains custom built in Java Codes:


Android supports 2D and 3D graphics using the OpenGL libraries and supports data storage in a SQLite database. For development Google provides the Android Development Tools (ADT) for Eclipse to develop Android applications. Android’s Linux kernel based OS doesn’t come with a sophisticated shell environment, but because the platform is open, we can write and install shells on device.


Android was founded in Palo Alto, California, United States in October 2003. Android was initially developed by four developers by Andy Rubin (co-founder of Danger), Rich Miner (co-founder of Wildfire Communications), Nick Sears (once VP at T-Mobile), Chris White (headed design and interface development at WebTV).
Then Android was acquired by Google on August 17, 2005. Key Employees of Android including Andy Rubin, Rich Miner, Nick Sears and Chris White stayed at the company after the acquisition.
On November 5, 2007 the Open Handset Alliance several companies which include Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Spirit Nextel, T-Mobile  Instruments, Sony Ericsson, Vodafone Group.
Android Versions:
The Android beta was released on November 5,2007, while the software developer’s lit (SDK) was released on November 12, 2007.
The Version history of the Android operating system began with the release of the Android beta in November 2007.The first commercial version, Android 1.0, was released in September 2008.Android is a mobile operating system developed by Google and the Open Handset Alliance, and has seen a number of updates to its base operating system since its original release. These updates typically fix buys and new features. Since April 2009, each Android version has been developed under a codename based on a dessert or sweet treat. These versions have been released in alphabetical order Cupcake, Dotnut, Éclair, Froyo (frozen yogurt), Gingerbread, Honeycomb, Ice Cream Sandwich and Jelly Bean. The pre-release versions of Android were dubbed Astro and Bender, but these names could not ultimately be used for trademark reasons. The most recent update to the Android OS was Ice Cream Sandwich v4.04, which released in March 2012.
Android Versions are given below





2. What do we need to develop Android applications?

            ·       JDK (version 6 & 7 required).
We should have a recent version of the Java SDK (JDK) installed on our system.
           ·  Eclipse IDE for Java Developers (versions 3.6-Helios or 3.7-Indigo).
           · Base Android SDK
We now need to download the Android SDK starter package and use it to install our target Android platforms. Download the Android SDK from the Android homepage. The download contains a zip file which you can extract to any place in your file system, e.g. I placed it under “C:\apps\android-sdk-windows”.
The Android SDK archive only contains the tools, and we need to use the SDK Manager to install or update SDK components such as platforms, tools, etc. We must install at least one version of the Android platform using the SDK Manager in order to start developing applications.
          ·       Android Development Tools (ADT)
Installing using Eclipse Update Manager as shown in the next section of this tutorial is much easier.
3. Setting up Android Development Tools (ADT)
Use the update manager of Eclipse to install all available plugins for the Android Development Tools (ADT).
From Eclipse, Help->Install New Software


In the Android Software dialog, click Add. Then, type in “Android Plugin” in the Name field and
URL https://dl-ssl.google.com/android/eclipse in the Location field.




Hit OK, again and select the checkbox next to Developer Tools. Then, the nested tools Android DDMS and Android Development Tools will be selected automatically.


In the Install Details dialog, the Android DDMS and Android Development Tools features are listed.



Click Next.


Click Finish, and restart Eclipse.








4. Configuration

In Eclipse, open the Preferences dialog via Windows->Preferences.
E.g. I placed it under “C:\apps\android-sdk-windows”.
Select Android and type in the installation path of the Android SDK as the picture below.  







After hit Apply, we get:



Hit OK after the target.
Select Window -> Android SDK Manager from the menu.


Install packages if needed.
5. Device for Emulation – Android Virtual Devices (AVD)
For emulation, we need to define a device.
Select Window-> Android AVD Manager from the menu.



Press “New”, then you are about to create a New AVD as the picture below.



Hit “Create AVD” button.
Then you will have




To test if your setup is correct, select your device and press “Start”.
Check the “Scale display to real size” at the Launch Options window below.


At the Launch button, you will have the device, finally.



Android Development Kit Tools

Android SDK Development Tool Commands
Android SDK Development Tools
Windows
Android SDK and AVD Manager
android.bat
Dalvik Debug Monitor
ddms.bat

Importing Project
1. Open the import Dialog
     Select File->Import…to open the import dialog.
2. Import the “My Project” project
In the import dialog, expand the General node and select Existing Projects into Workspace, then click the Browser…button.
In the Browser For Folder dialog, locate the “My Project” folder, select it and click ok. Then, click Finish to import the project. The project now shows up in the Package Explorer.
3. Launch the “My Project” project
Right click the “My Project” in the Package Explorer window, and then select Run as->Android Application from the menu.

Importing Project -@Override issue

When we have the following line of code from the imported package, depending on the compliance level, we may get error message from Eclipse:
@override
public void onClick(DialogInterface dialog, int button)
{
In my case, I got:
Android requires compiler compliance level 5.0 or 6.0. Found ‘1.7’ instead.
Since I’m using Java 1.7.In this case, we need to set the compliance level to 1.6 because 1.5 won’t work with the @override annotation. Right click on the Project->Properties, then set it 1.6 as in the picture below.  



At Apply, we get:



Hit “Yes”, and that’s it.

Deleting Project

Here is the project-wise solution. Right click the “MyProject” in the Package Explorer window, and then select Delete from the menu. In the dialog that appears, ensure that Delete project contents on disk is not selected if we want to use the project’s folders in workspace. If not , we can check it before be click OK.