資源簡介
更改官方的Launcher3使得可以在Android Studio編譯,增加了
Launcher3上滑顯示應用列表和下滑關閉顯示應用列表。

代碼片段和文件信息
#!/usr/bin/env?python2.5
import?cgi
import?os
import?shutil
import?sys
import?sqlite3
SCREENS?=?5
COLUMNS?=?4
ROWS?=?4
CELL_SIZE?=?110
DIR?=?“db_files“
AUTO_FILE?=?“launcher.db“
APPLICATION_COMPONENTS?=?[
??“com.android.calculator2/com.android.calculator2.Calculator“
??“com.android.providers.downloads.ui/com.android.providers.downloads.ui.DownloadList“
??“com.android.settings/com.android.settings.Settings“
??“com.android.mms/com.android.mms.ui.ConversationList“
??“com.android.contacts/com.android.contacts.activities.PeopleActivity“
??“com.android.dialer/com.android.dialer.DialtactsActivity“
]
def?usage():
??print?“usage:?fill_screens.py?--?fills?up?the?launcher?db“
def?make_dir():
??shutil.rmtree(DIR?True)
??os.makedirs(DIR)
def?pull_file(fn):
??print?“pull_file:?“?+?fn
??rv?=?os.system(“adb?pull“
????+?“?/data/data/com.android.launcher/databases/launcher.db“
????+?“?“?+?fn);
??if?rv?!=?0:
????print?“adb?pull?failed“
????sys.exit(1)
def?push_file(fn):
??print?“push_file:?“?+?fn
??rv?=?os.system(“adb?push“
????+?“?“?+?fn
????+?“?/data/data/com.android.launcher/databases/launcher.db“)
??if?rv?!=?0:
????print?“adb?push?failed“
????sys.exit(1)
def?process_file(fn):
??print?“process_file:?“?+?fn
??conn?=?sqlite3.connect(fn)
??c?=?conn.cursor()
??c.execute(“DELETE?FROM?favorites“)
??intentFormat?=?“#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=%s;end“
??id?=?0;
??for?s?in?range(SCREENS):
????for?x?in?range(ROWS):
??????for?y?in?range(COLUMNS):
????????id?+=?1
????????insert?=?“INSERT?into?favorites?(_id?title?intent?container?screen?cellX?cellY?spanX?spanY?itemType?appWidgetId?iconType)?VALUES?(%d?‘%s‘?‘%s‘?%d?%d?%d?%d?%d?%d?%d?%d?%d)“
????????insert?=?insert?%?(id?“title“?““?-100?s?x?y?1?1?2?-1?0)
????????c.execute(insert)
????????folder_id?=?id
????????for?z?in?range(15):
??????????id?+=?1
??????????intent?=?intentFormat?%?(APPLICATION_COMPONENTS[id?%?len(APPLICATION_COMPONENTS)])
??????????insert?=?“INSERT?into?favorites?(_id?title?intent?container?screen?cellX?cellY?spanX?spanY?itemType?appWidgetId?iconType)?VALUES?(%d?‘%s‘?‘%s‘?%d?%d?%d?%d?%d?%d?%d?%d?%d)“
??????????insert?=?insert?%?(id?“title“?intent?folder_id?0?0?0?1?1?0?-1?0)
??????????c.execute(insert)
??conn.commit()
??c.close()
def?main(argv):
??if?len(argv)?==?1:
????make_dir()
????pull_file(AUTO_FILE)
????process_file(AUTO_FILE)
????push_file(AUTO_FILE)
??else:
????usage()
if?__name__==“__main__“:
??main(sys.argv)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-05-15?06:56??Launcher3_mx-master\
?????文件??????????70??2017-05-15?06:56??Launcher3_mx-master\.gitignore
?????目錄???????????0??2017-05-15?06:56??Launcher3_mx-master\.idea\
?????文件?????????264??2017-05-15?06:56??Launcher3_mx-master\.idea\modules.xm
?????文件?????????564??2017-05-15?06:56??Launcher3_mx-master\.idea\runConfigurations.xm
?????文件?????????167??2017-05-15?06:56??Launcher3_mx-master\.idea\vcs.xm
?????文件????????2139??2017-05-15?06:56??Launcher3_mx-master\Android.mk
?????文件????????3551??2017-05-15?06:56??Launcher3_mx-master\AndroidManifest-common.xm
?????文件????????6918??2017-05-15?06:56??Launcher3_mx-master\AndroidManifest.xm
?????文件???????13192??2017-05-15?06:56??Launcher3_mx-master\Launcher3-7.1.1-r38.iml
?????文件???????11748??2017-05-15?06:56??Launcher3_mx-master\Launcher3_mx.iml
?????文件????????2754??2017-05-15?06:56??Launcher3_mx-master\README.md
?????目錄???????????0??2017-05-15?06:56??Launcher3_mx-master\art\
?????文件???????46829??2017-05-15?06:56??Launcher3_mx-master\art\launcher1.jpg
?????文件???????80508??2017-05-15?06:56??Launcher3_mx-master\art\launcher2.jpg
?????文件???????64108??2017-05-15?06:56??Launcher3_mx-master\art\launcher3.jpg
?????文件???????40768??2017-05-15?06:56??Launcher3_mx-master\art\launcher4.jpg
?????文件???????51894??2017-05-15?06:56??Launcher3_mx-master\art\launcher5.jpg
?????文件????????2203??2017-05-15?06:56??Launcher3_mx-master\build.gradle
?????文件????????2574??2017-05-15?06:56??Launcher3_mx-master\fill_screens.py
?????目錄???????????0??2017-05-15?06:56??Launcher3_mx-master\gradle\
?????目錄???????????0??2017-05-15?06:56??Launcher3_mx-master\gradle\wrapper\
?????文件???????53636??2017-05-15?06:56??Launcher3_mx-master\gradle\wrapper\gradle-wrapper.jar
?????文件?????????232??2017-05-15?06:56??Launcher3_mx-master\gradle\wrapper\gradle-wrapper.properties
?????文件????????4971??2017-05-15?06:56??Launcher3_mx-master\gradlew
?????文件????????2404??2017-05-15?06:56??Launcher3_mx-master\gradlew.bat
?????文件?????????541??2017-05-15?06:56??Launcher3_mx-master\local.properties
?????文件????????8182??2017-05-15?06:56??Launcher3_mx-master\print_db.py
?????文件????????2151??2017-05-15?06:56??Launcher3_mx-master\proguard.flags
?????目錄???????????0??2017-05-15?06:56??Launcher3_mx-master\protos\
?????文件????????3475??2017-05-15?06:56??Launcher3_mx-master\protos\launcher_log.proto
............此處省略692個文件信息
- 上一篇:Java 虹膜識別程序
- 下一篇:基于JavaEE的商城系統
評論
共有 條評論