View the Android framework source code in Android Eclipse, eclipseandroid

Source: Internet
Author: User

View the Android framework source code in Android Eclipse, eclipseandroid

Sometimes I use Eclipse to press ctrl to view the source code. What should I do?

The following steps allow you to easily view the source code:

Project-> properties-> java build path-> libraries


Click source under android. jar:


Here you can add zip files and folders. zip files can be downloaded from git. Here I use the source code downloaded using sdk manager, as shown below:


The source code downloaded here is saved under the source under the sdk. You can select a platform Association.

The following is the source code of the button:

@RemoteViewpublic class Button extends TextView {    public Button(Context context) {        this(context, null);    }    public Button(Context context, AttributeSet attrs) {        this(context, attrs, com.android.internal.R.attr.buttonStyle);    }    public Button(Context context, AttributeSet attrs, int defStyle) {        super(context, attrs, defStyle);    }    @Override    public void onInitializeAccessibilityEvent(AccessibilityEvent event) {        super.onInitializeAccessibilityEvent(event);        event.setClassName(Button.class.getName());    }    @Override    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {        super.onInitializeAccessibilityNodeInfo(info);        info.setClassName(Button.class.getName());    }}

How is it easy?

If you have any questions, please leave a message and repeat the source.


How can I use Eclipse to view the source code of Android 40 SDK?

FieldLabel: "task level ",
Name: "itemTask. taskCompositor ",
Id: "taskCompositor ",
Accelerate: true,
Xtype: 'spinnerfield ',
MinValue: 1,
DecimalPrecision: 1,
DefaultValue: "1"

Help: view the Android source code in Eclipse

The Android2.2 source code has been stored in the android-sdk/platforms/android-8/sources Directory, which is only used to view the source code during debugging. To modify the source code, you need to import the source code as a project to eclipse. Your entire idea is wrong.
 

Related Article

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.