资源简介
android 自定义 模仿Launcher 是平板的,手机的,需要调整下分辨和图片大小,有的显示不出来,但代码是成熟的代码
代码片段和文件信息
#!/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.contacts/com.android.contacts.activities.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)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 475 2017-04-17 13:33 ScrollLayoutGrid_v3\.classpath
文件 844 2015-09-02 09:44 ScrollLayoutGrid_v3\.project
目录 0 2017-05-19 10:13 ScrollLayoutGrid_v3\.settings\
文件 220 2015-09-02 09:48 ScrollLayoutGrid_v3\.settings\org.eclipse.core.resources.prefs
文件 177 2015-09-02 09:44 ScrollLayoutGrid_v3\.settings\org.eclipse.jdt.core.prefs
文件 1068 2015-01-27 09:45 ScrollLayoutGrid_v3\Android.mk
文件 1576 2017-04-17 13:58 ScrollLayoutGrid_v3\AndroidManifest.xm
目录 0 2011-11-25 16:15 ScrollLayoutGrid_v3\assets\
目录 0 2017-05-19 10:13 ScrollLayoutGrid_v3\bin\
文件 1576 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\AndroidManifest.xm
文件 67576 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes.dex
目录 0 2017-05-19 10:13 ScrollLayoutGrid_v3\bin\classes\
目录 0 2017-05-19 10:13 ScrollLayoutGrid_v3\bin\classes\com\
目录 0 2017-05-19 10:13 ScrollLayoutGrid_v3\bin\classes\com\android\
目录 0 2017-05-19 10:13 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\
文件 5785 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\AppDataAdapter.class
文件 4641 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\AppsManager.class
文件 1812 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\DateAdapter.class
文件 1836 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\DemoGridAdapter.class
文件 1802 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\DragGridView$1.class
文件 1664 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\DragGridView$2.class
文件 317 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\DragGridView$OnChanageListener.class
文件 11307 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\DragGridView.class
文件 889 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Info.class
文件 1346 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$1.class
文件 1472 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$2$1.class
文件 4500 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$2.class
文件 997 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$3$1.class
文件 1627 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$3.class
文件 780 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$4.class
文件 2211 2017-04-17 14:26 ScrollLayoutGrid_v3\bin\classes\com\android\launcher2\Launcher$5.class
............此处省略169个文件信息
- 上一篇:太阳方位角计算程序
- 下一篇:简易计算器Java Swing实现
相关资源
- android根据经纬度获取地址
- android动态添加删除组件Layout
- android TCP server 和TCP client通信源码
- unity移动端截图后保存至相册
- android-support-multidex1.0.1.jar
- android-opencv已经编译好的JAR库
- Android读取文本文件的demo
- apkutil解析apk安装包的工具
-
音乐播发器界面 xm
l - Android声波通信改进版
- Android+SDK+2.0+与安装教程
-
Android MediaPla
yer与Http Proxy结合之优化 -
玩转 Android MediaPla
yer之视频预加载 -
Android MediaPla
yer与Http Proxy结合之基础 - android 图片管理器
- android自定义全键盘随机包含字母+标点
- 这是一个简单的Android小程序,实现增
- pedometer计步器源码
- Android利用广播实现耳机的线控
- android4.4 DhcpInfoInternal.java
- Android Opencv 人脸识别
- android底部菜单栏demo230129
- Android计数小demo
- 基于Android的网上购物系统
- android仿微信app应用
- android-Sqlite建多张表-增删改查操作
- android 手机通讯录 增删改查,直接拨
- Android微信、朋友圈分享
- 成绩管理系统android
- CyanogenMod10 ntfs 与 exfat 自动挂载支持
评论
共有 条评论