Modify the Launcher3 source code to debug on ADT (Eclipse)

Source: Internet
Author: User

Android4.4 on the Launcher3 Source: http://download.csdn.net/detail/deng0zhaotai/8281391

Modified Android4.4 Launcher3 code that can be debugged on eclipse: http://download.csdn.net/detail/deng0zhaotai/8284961

You can download two projects to compare and know where to change the place

1. Deletion of two files Src/com/android/launcher3/launcherbackupagenthelper.java, src/com/android/launcher3/ Launcherbackuphelper.java is due to the lack of com.google package, but also may be reported import Android.support.v4.view.accessibility.AccessibilityEventCompat; This error, missing V4 package, need to create a new Libs Directory Import v4 package, search on the internet can be found

2. Modify the Androidmanifest.xml file

Add to

<USES-SDK android:minsdkversion= "android:targetsdkversion="/>
As follows

<manifest xmlns:android= "http://schemas.android.com/apk/res/android"    package= "Com.android.launcher3" >    <uses-sdk android:minsdkversion= "android:targetsdkversion="/>

Add <category android:name= "Android.intent.category.LAUNCHER"/> as follows

<activity            android:name= "Com.android.launcher3.Launcher"            android:cleartaskonlaunch= "true"            Android:launchmode= "Singletask"            android:screenorientation= "nosensor"            android:statenotneeded= "true"            android:theme= "@style/theme"            android:windowsoftinputmode= "Adjustpan" >            <intent-filter>                <action android:name= "Android.intent.action.MAIN"/>                <category android:name= " Android.intent.category.HOME "/>                <category android:name=" Android.intent.category.LAUNCHER "/>                <category android:name= "Android.intent.category.DEFAULT"/>                <category android:name= " Android.intent.category.MONKEY "/>            </intent-filter>        </activity>
3, modify the Src/com/android/launcher3/launcherprovider.java

    private void Sendnotify (Uri uri) {        String notify = Uri.getqueryparameter (parameter_notify);        if (notify = = NULL | | "True". Equals (notify)) {            getcontext (). Getcontentresolver (). Notifychange (URI, NULL);        }        Always notify the backup agent        //launcherbackupagenthelper.datachanged (GetContext ());    }
The modified will be able to debug on eclipse, after installation can see a launcher3 icon in the upper right corner, this is our Launcher3

Enter Launcher3

The Launcher3 can be debugged in the following

Modify the Launcher3 source code to debug on ADT (Eclipse)

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.