(GO). NET programmer moved to Android second---kind

Source: Internet
Author: User

The previous article says how to build an Android development environment, this one we will kind a bit,

Complete our first Android app app.

I'll start with the new project.

First open Eclipse, select File--new at the top (new)--select Android application Project.

, the above is some name, you can fill in, the following are more important, according to different needs to choose different versions of the SDK, here I choose to start from 2.2. When you are finished, click Next.

If you want to change the project path to the path you have made, you can remove the Create project in Workspace and select the location you specified, and continue to the next step.

To this page is some of the log design, specifically I do not say, each option can try, here I choose the default, in the next step.

For advanced Android engineers, this step depends on the choice of requirements, we choose the first default. Continue to the next step.

This step does not need to control, click Finish. (If you want to change the name of the start page, you can change the layout Name column to your own start page)

Preview Large Image

After our project is created, we will have this interface, the system for us automatically created Heelo World, for the programmer's curiosity, even if you created for me, I also want to see how you achieve.

The comment. Click.

Preview Large Image

Entering the code page, we can clearly know textview this control is similar to the lable,android:text in. NET, which is what character is displayed in this textview.

For the sake of insurance, we don't change it first, run first, see what the effect is.

Select the second red box to run, why the first worm-like red box is also circled to choose, because this is important, if you want to debug the trace,

Run with the worm (Dbug), and if you have confidence in your application, run it directly in the second way.

Run OK, then we can let go to change its code, the target lock just the code page.

What are we going to change? I would like to change the text content.

At the bottom of the text there is a button that can be clicked to pop up a custom message.

Well, let's do it if you know.

Preview Large Image

Preview Large Image

Then open the code page and add a button to it.

Preview Large Image

The above code is changed so that you can run it first. Click on the preview screen to see the current effect.

Preview Large Image

Well, the effect is good, we can not hurry to run, to the button to write the event is also a good choice to run.

Preview Large Image

Here with the red box circle is my new content, everything is done we run the program bar.

After clicking the button, a custom message pops up, which is what we want.

To this end, we kind is also an end, if it is not enjoyable, you can boldly try. Get familiar with Android controls and trigger mechanisms.

In the next article I will share with you the most common and important "login interface" of the project.

If it is not right, we can say that we can learn from each other. If you want to discuss in real time, add the QQ group I created:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.