资源简介
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实现
相关资源
- AndroidStudio版直连sqlserver
- android带百分比进度条的文件上传,使
- 美食天下项目Android版源码和Web版源码
- Android之自定义ToggleButton使用
- Android非常漂亮的登录界面
- pc与android通过usb socket实现手机通信
- android毕业设计
- 百度地图自定义Markerandroid
- Android分区工具包
- android-support-v4.jar已打包进去源代码
- u-blox_Android_GNSS_Driver_v3.10驱动源码+中
- 个人根据Android移动开发案例详解手写
- android 视频播放器 项目和原码
- Android【动画】【特效】 17种动画特效
- 基于Android智能家居详细设计(经典)
- android通过JDBC连接Mysql数据库
- Android通讯录的源代码
- android 瀑布流Demo
- 指纹传感器FPC1080在android下的驱动
- delphi xe5 android 调用照相机摄像头拍照
- Android手机连连看游戏源码
- android-sdk-windows v2.3离线完整版
- android 底部弹出菜单(带透明背景)
- Android工程模式简介.rar
- Android蓝牙和Cors网络开发源码
- Android powermanger wakelock
- Android v7的一些jar包
- 最新android supportV7包
- android图片压缩工具类分享
- 单机搭建Android(解决Network is unreach
评论
共有 条评论