View Full Version : Edit Number of Home Screens.
jc1337
27th May 2009, 08:29 PM
Is there an easy way of adding or removing the number of home screens you have in some of these rooted versions of Android 1.5. Can you go into the coding before you flash it or can you run commands in the terminal? I just seem to have way to much that I would like to put on my desktop but can't due to space.
Henchman
27th May 2009, 08:58 PM
Try using one of the replacement home apk's.
DxTop etc.
TheDudeOfLife
27th May 2009, 09:01 PM
My build has 5 desktops by default. I edited the source code to add the new screens.
My launcher also has 5 rows in the app launcher from the portrait and 6 colums in landscape.
jc1337
27th May 2009, 09:10 PM
is there anyway I can get yours with a normal theme? isn't yours like blue themed?
oDeACoNo
27th May 2009, 09:12 PM
is there anyway I can get yours with a normal theme? isn't yours like blue themed?
Grab the lite version of his build.
Mirror here: http://android-roms.googlecode.com/files/TheDudesCupcake1.1.lite-signed.zip
TheDudeOfLife
27th May 2009, 09:17 PM
is there anyway I can get yours with a normal theme? isn't yours like blue themed?
http://thedudescupcake.googlecode.com/files/TheDudesThemeTemplate1.0-signed.zip
Has just the basic theme you can apply it to the full theme and revert to basic theme.
My new build released today has some updated theme items...
jc1337
27th May 2009, 09:33 PM
http://thedudescupcake.googlecode.com/files/TheDudesThemeTemplate1.0-signed.zip
Has just the basic theme you can apply it to the full theme and revert to basic theme.
My new build released today has some updated theme items...
So that link is a link to an unthemed version that is just as good as the themed version? Or is the themed version have updates?
ivanmmj
27th May 2009, 09:52 PM
My build has 5 desktops by default. I edited the source code to add the new screens.
My launcher also has 5 rows in the app launcher from the portrait and 6 colums in landscape.
3 questions:
1. What did you edit to make it give you 5 columns exactly?
2. Does your ROM have the same animation that Haykuro's G build had? (Aren't they both based on the Google builds?)
3. I cook for the HTC Herald but I haven't really immersed myself into the Android development world... I love the fact that you can do so much more with it, but I don't know where to start as far as learning how to do it myself. Would you be willing to get me started? ^_^ I learn fast.
jc1337
27th May 2009, 10:15 PM
3 questions:
1. What did you edit to make it give you 5 columns exactly?
2. Does your ROM have the same animation that Haykuro's G build had? (Aren't they both based on the Google builds?)
3. I cook for the HTC Herald but I haven't really immersed myself into the Android development world... I love the fact that you can do so much more with it, but I don't know where to start as far as learning how to do it myself. Would you be willing to get me started? ^_^ I learn fast.
hey if we are teaching people here I am in. :p
Binary100100
27th May 2009, 11:24 PM
3 questions:
1. What did you edit to make it give you 5 columns exactly?
This... is what I wanna know. :)
I want to know how to get more then 3 screens by default.
I'm tired of waiting for Open Home to support all widgets.
Lieu10ant
27th May 2009, 11:31 PM
get dxtop, it's my favorite. it supports ahome themes AND cupcake widgets!
Binary100100
27th May 2009, 11:57 PM
get dxtop, it's my favorite. it supports ahome themes AND cupcake widgets!
Well... the only reason why I have a homescreen substitute is for the multiple screens. If it can be added into the ACTUAL system it would eliminate the need for the homescreen substitute completely and hopefully allowing my phone to run faster/smoother and with the benefit of more optional widgets. Plus... if you can allow more screens... (7, 9, 11, 51*, or any other odd number) that would also be pretty cool.
*Joking of course... (maybe) :p
wergeld
28th May 2009, 01:26 AM
Yea, this is what I am wanting to know as well.
I dont want to add another layer of abstraction in order to add more screens. I have started my dive into the SDK since the 1.5 teaser was released but have not gotten there yet. I figured I should start with the basics first, but a tip would be welcome.
wergeld
Henchman
28th May 2009, 01:52 AM
Yea, this is what I am wanting to know as well.
I dont want to add another layer of abstraction in order to add more screens. I have started my dive into the SDK since the 1.5 teaser was released but have not gotten there yet. I figured I should start with the basics first, but a tip would be welcome.
wergeld
DxTop allows you to disable the regular home app.
wigwag
28th May 2009, 03:50 AM
Couldn't you just modify the Launcher.apk in /system/app then either adb it over or use terminal emulator to move it over
brianb7590
28th May 2009, 03:55 AM
Well... the only reason why I have a homescreen substitute is for the multiple screens. If it can be added into the ACTUAL system it would eliminate the need for the homescreen substitute completely and hopefully allowing my phone to run faster/smoother and with the benefit of more optional widgets. Plus... if you can allow more screens... (7, 9, 11, 51*, or any other odd number) that would also be pretty cool.
*Joking of course... (maybe) :p
I'm pretty sure it doesn't have to be an odd number, as it doesn't automatically select the middle screen as the "middle screen" you have to tell it which one is the default one. So I'm pretty sure an even number of screens would work also. I'll try it, if I get time.
TheDudeOfLife
28th May 2009, 03:58 AM
I'm pretty sure it doesn't have to be an odd number, as it doesn't automatically select the middle screen as the "middle screen" you have to tell it which one is the default one. So I'm pretty sure an even number of screens would work also. I'll try it, if I get time.
Yes but I believe (without pulling up memory usage) the more screens you use, the more memory (RAM) is used on the Launcher.apk.
I'm working on a writeup as to what source I edited so you guys can make your own. I just have so much going on lately ;) This week, I promise.
brianb7590
28th May 2009, 04:01 AM
Yes but I believe (without pulling up memory usage) the more screens you use, the more memory (RAM) is used on the Launcher.apk.
I'm working on a writeup as to what source I edited so you guys can make your own. I just have so much going on lately ;) This week, I promise.
Yeah, Technically you can have very many screens but I've tried up to 15 and it definately slows the phone down unbelievably!
twistedumbrella
28th May 2009, 04:57 AM
Yes but I believe (without pulling up memory usage) the more screens you use, the more memory (RAM) is used on the Launcher.apk.
I'm working on a writeup as to what source I edited so you guys can make your own. I just have so much going on lately ;) This week, I promise.
I am looking to use dxtop for the secondary tab, but the fourth screen proves no use to me. Honestly it just slaps its components on the main screen during a reinstall, so I leave it empty. It would be nice to boost it by removing that screen altogether. Sure it would improve load speed too.
Binary100100
28th May 2009, 03:49 PM
I'm pretty sure it doesn't have to be an odd number, as it doesn't automatically select the middle screen as the "middle screen" you have to tell it which one is the default one. So I'm pretty sure an even number of screens would work also. I'll try it, if I get time.
How do you "tell it which which one is the default one"?
I used the launcher.apk from manup's build and it uses screen #4 as the default for some reason.
pichucos
28th May 2009, 09:37 PM
Hi all :D.
Please if any ppl here kwon how to edit some file to change my screens please explain me :D
i no need 3 screens i need only 2 :D or 1 xD and then android run very very fust :D
wergeld
1st June 2009, 06:43 PM
OK. After a few days of messing with it I think I am closer. But I hit a wall here...
Am I thinking too much about this: I found the "panel" area that you can set. And thought if I just tweak this it would work. Then I read up on the "overlay" (where the icons are, clock, etc) and I tried to increase this size. And boom...bad things - couldnt move the screens at all, stuck with one, and no icons =). I undid the "overlay" changes but there was no increase in number of screens. Can anyone else jump in here and give me a hand?
I am using the latest SDK from google and using Eclipse IDE to work on it.
wergeld
pixel-painter
7th June 2009, 02:53 AM
Is this thread dead, or did anyone manage to find out any info on this :D
xidominicanoix
7th June 2009, 03:14 AM
Is this thread dead, or did anyone manage to find out any info on this :D
waiting on TheDude's write up :)
Binary100100
11th June 2009, 10:15 AM
waiting on TheDude's write up :)
Are we still waiting???
jmon777
11th June 2009, 01:55 PM
Hi all :D.
Please if any ppl here kwon how to edit some file to change my screens please explain me :D
i no need 3 screens i need only 2 :D or 1 xD and then android run very very fust :D
I only want one or 2 also ido how much faster it would run but yeah I soul like to see an some info
SteveTilsed
11th June 2009, 04:03 PM
Anyone? I would love to be able to do this without downloading Apps or changing builds.
ccyrowski
11th June 2009, 04:10 PM
Anyone? I would love to be able to do this without downloading Apps or changing builds.
Part of it is in the Launcher.xml file. Rosie.apk > res > layout-480-320 > Launcher.xml
For whatever reason I can't figure out how to properly disassemble a file.
I downloaded all the necessary files, repo synced, and "make" the entire master branch, and all of those files open fine. Any file I try to download elsewhere opens with a bunch of incoherent symbols etc..
xMemphisx
11th June 2009, 05:08 PM
I don't know why it is taking him so long to do a write-up of this. It takes literally about 10 minutes to do. Download the source code for android if you haven't already, and compile it. Then run the emulator (for me it looks like this, because i'm using a linux-x86 machine)
(i'm in the source's working directory (/home/ryan/android_source) )
and from the terminal i type in:
./out/host/linux-x86/bin/emulator (to get the source-based emulator up and running)
then under
packags/apps/Launcher
edit the following:
in the Launcher.java (src/com/android/launcher/Launcher.java) file there is a line that looks like this in the declarations:
static final int SCREEN_COUNT = 3;
Edit the '3' to the number of screens you want.
Next, open the xml files (you'll need to do both), res/layout-land/launcher.xml and find this line (the other file you will need to edit is the res/layout-port/launcher.xml):
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
And lets say, you added 5 screens instead of 3, all you would have do is change those last few lines to include two more (this is an EXAMPLE, if you used 5)
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
<include android:id="@+id/cell4" layout="@layout/workspace_screen" />
<include android:id="@+id/cell5" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
After that you are done setting it up to work. If you just go back to the root directory of your source again (remember, for me it is /home/ryan/android_source) and simply type this into your terminal (while the emulator is still running)
mmm packages/apps/Launcher
That will recompile the launcher.apk for the emulator, then do
adb sync
and that will push it to your emulator. The apk is also available in your out folder if you want to sign it for yourself and use it on an actual device. You will have to sign it with your own key though. If you do not know how to sign applications, here a reference with that
http://developer.android.com/guide/publishing/app-signing.html
[Edit]
When you push the apk to the emulator using 'adb sync', it takes a few moments for the launcher.apk to restart in the emulator (it will look it the emulator has frozen, don't worry... it HAS NOT JUST WAIT!)
[Update 2]
Also, if you add a number of screens, you can change the default starting screen (by default it is screen 1, although there are 3 screens, the count starts at 0, so by default you have screens 0, 1, 2 (making 3), and screen 1 is the default), to do this in the Launcher.java file you edited at the beginning, there is a line directly below the number of home screens that looks like this
static final int DEFAULT_SCREN = 1;
Just edit that and you're set!
Good luck and happy coding! :)
Binary100100
11th June 2009, 05:16 PM
I don't know why it is taking him so long to do a write-up of this. It takes literally about 10 minutes to do. Download the source code for android if you haven't already, and compile it. Then run the emulator (for me it looks like this, because i'm using a linux-x86 machine)
(i'm in the source's working directory (/home/ryan/android_source) )
and from the terminal i type in:
./out/host/linux-x86/bin/emulator (to get the source-based emulator up and running)
then under
packags/apps/Launcher
edit the following:
in the Launcher.java (src/com/android/launcher/Launcher.java) file there is a line that looks like this in the declarations:
static final int SCREEN_COUNT = 3;
Edit the '3' to the number of screens you want.
Next, open the xml files (you'll need to do both), res/layout-land/launcher.xml and find this line (the other file you will need to edit is the res/layout-port/launcher.xml):
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
And lets say, you added 5 screens instead of 3, all you would have do is change those last few lines to include two more (this is an EXAMPLE, if you used 5)
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
<include android:id="@+id/cell4" layout="@layout/workspace_screen" />
<include android:id="@+id/cell5" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
After that you are done setting it up to work. If you just go back to the root directory of your source again (remember, for me it is /home/ryan/android_source) and simply type this into your terminal (while the emulator is still running)
mmm packages/apps/Launcher
That will recompile the launcher.apk for the emulator, then do
adb sync
and that will push it to your emulator. The apk is also available in your out folder if you want to sign it for yourself and use it on an actual device. You will have to sign it with your own key though. If you do not know how to sign applications, here a reference with that
http://developer.android.com/guide/publishing/app-signing.html
[Edit]
When you push the apk to the emulator using 'adb sync', it takes a few moments for the launcher.apk to restart in the emulator (it will look it the emulator has frozen, don't worry... it HAS NOT JUST WAIT!)
Good luck and happy coding! :)
Wow... that looks... difficult. Especially since most users like myself use Windows. Can we edit the .java and .xml and just add those and resign the launcher.apk file?
xMemphisx
11th June 2009, 05:22 PM
Well when you run this line
mmm packages/apps/Launcher
it recompiles the apk for you. there is no other way (that i know of) to compile the .apk since it references libraries that you don't have access to (such as the notification bar), so you can't compile it with eclipse either.
As far as doing it windows goes, i'm not sure if you can compile the source or not. Here is a guide for compiling the android source
http://source.android.com/download
Although there is no mention for windows, and seeing as i hate windows so much, i can't help you too much in that department. Why not setup a Linux environment on a USB or in a VMware setup so you can accomplish these things.
andonnguyen
11th June 2009, 05:42 PM
Wow... that looks... difficult. Especially since most users like myself use Windows. Can we edit the .java and .xml and just add those and resign the launcher.apk file?
I'm going to try this, but edit it with 19 home screens. haha.
xMemphisx
11th June 2009, 05:55 PM
If you do not properly compile the android source (in linux or OS X), there is no Launcher.apk file to resign. And there is no way of compiling it without the source there, since there are still closed branches of the android library (like i mentioned before... the notification bar is an example of that)
ccyrowski
11th June 2009, 07:13 PM
Awesome! I'll try that after I get out of work. I'm running ubuntu in virtualbox vm and have everything set up. I look at the source code from google and figured as much, but now that you have explained how to actually open the files downloaded elsewhere properly I'll get working on Rosie. 3 or 5 screens here I come!
I don't know why it is taking him so long to do a write-up of this. It takes literally about 10 minutes to do. Download the source code for android if you haven't already, and compile it. Then run the emulator (for me it looks like this, because i'm using a linux-x86 machine)
(i'm in the source's working directory (/home/ryan/android_source) )
and from the terminal i type in:
./out/host/linux-x86/bin/emulator (to get the source-based emulator up and running)
then under
packags/apps/Launcher
edit the following:
in the Launcher.java (src/com/android/launcher/Launcher.java) file there is a line that looks like this in the declarations:
static final int SCREEN_COUNT = 3;
Edit the '3' to the number of screens you want.
Next, open the xml files (you'll need to do both), res/layout-land/launcher.xml and find this line (the other file you will need to edit is the res/layout-port/launcher.xml):
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
And lets say, you added 5 screens instead of 3, all you would have do is change those last few lines to include two more (this is an EXAMPLE, if you used 5)
<!-- The workspace contains 3 screens of cells -->
<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
launcher:defaultScreen="1">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
<include android:id="@+id/cell4" layout="@layout/workspace_screen" />
<include android:id="@+id/cell5" layout="@layout/workspace_screen" />
</com.android.launcher.Workspace>
After that you are done setting it up to work. If you just go back to the root directory of your source again (remember, for me it is /home/ryan/android_source) and simply type this into your terminal (while the emulator is still running)
mmm packages/apps/Launcher
That will recompile the launcher.apk for the emulator, then do
adb sync
and that will push it to your emulator. The apk is also available in your out folder if you want to sign it for yourself and use it on an actual device. You will have to sign it with your own key though. If you do not know how to sign applications, here a reference with that
http://developer.android.com/guide/publishing/app-signing.html
[Edit]
When you push the apk to the emulator using 'adb sync', it takes a few moments for the launcher.apk to restart in the emulator (it will look it the emulator has frozen, don't worry... it HAS NOT JUST WAIT!)
[Update 2]
Also, if you add a number of screens, you can change the default starting screen (by default it is screen 1, although there are 3 screens, the count starts at 0, so by default you have screens 0, 1, 2 (making 3), and screen 1 is the default), to do this in the Launcher.java file you edited at the beginning, there is a line directly below the number of home screens that looks like this
static final int DEFAULT_SCREN = 1;
Just edit that and you're set!
Good luck and happy coding! :)
soulife
11th June 2009, 08:27 PM
i guess that answers my question as to why my xml edits have no effect. is anyone willing to compile a modified launcher with 5 screens and an original with 3 screens. i would like to try and port it to rogers. ive been editing xml all morning and i guess this is why i havent made any progress.
xMemphisx
11th June 2009, 08:53 PM
I'm at work right now. I will upload both (unsigned) when i get home today, unless someone else beats me to it
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.