The first my module - Xposed Framework Development

There java class UserDictionaryAddWordActivity.java
In the method onCreate:
setContentView (R.layout.user_dictionary_add_word); // Starts a layout
This layout has two buttons cancel and save. // OnClick Cancel and onClickConfirm (android: onClick)
I want to make to the selected word remained immediately without starting the layout.
That is, you need to add in the method onCreate immediately onClickConfirm() and remove setContentView(R.layout.user_dictionary_add_word).
How can I do it?

you mean to have onClickConfirm to not call finish()? it doesn't seem to call it in another thread, so when onClickConfirm executes, you can hook finish(), ignore it when it's called, and unhook it after onClickConfirm
you might need to add the word manually into the layout
Edit: or replace onClickConfirm with your own, where you do the same as the original method does, but without the finish()

gitfib said:
you mean to have onClickConfirm to not call finish()? it doesn't seem to call it in another thread, so when onClickConfirm executes, you can hook finish(), ignore it when it's called, and unhook it after onClickConfirm
you might need to add the word manually into the layout
Edit: or replace onClickConfirm with your own, where you do the same as the original method does, but without the finish()
Click to expand...
Click to collapse
I plan to do so when you click to add a word to the dictionary (if you click on a word not known> Add to Dictionary) without additional clicks. Now onCreate open xml (window with a text field changes the new word and two buttons: Save - onClickConfirm and cancel). And to add an algorithm that if a word has been written with a capital to create a window where we can choose to save a small letter word or a big. It is necessary that when you enter a new proposal, if the word is not a person's name or the name of the city and so on, then you need to save in small letters. ! It is necessary to change the method onCreate or write at all it knitted.

I see. how about replacing R.layout.user_dictionary_add_word resource with your own, which would be invisible by default? until you change visibility of one of its layouts

Yes, it's like this. A visibility layouts unless somehow it is possible to set up?

android:visibility="visible / gone"
and
object.setVisibility(View.GONE);

visible/gone should be fine. do you see how to replace, or should i try myself?

gitfib said:
visible/gone should be fine. do you see how to replace, or should i try myself?
Click to expand...
Click to collapse
I think that if you change the appearance of it will not work.
In the layout we have onClickConfirm, which is to be stored. And if you remove the layout (for a word in small letters), then-layout window is not necessary to call and respectively, we can not perform onClickConfirm.
I understand that it is necessary to onCreate remodel. A change in visibility is not necessary.
If you have any ideas how to do it, you can demonstrate this. This is a good lesson.
Once again, a reference to the Activity https://github.com/CyanogenMod/android_packages_apps_Settings/blob/2703eb717e542ff225611cb9e0217815ee14661c/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
Now I do not know whether it is possible to re-write method onCreate?

at very basic, you can clone the layout, make visibility gone, replace the layout by the clone, and after the layout having being loaded or after onCreate been called - call onClickConfirm
I wouldn't remove the layout because you want to have your own layout on certain cases, and because it would be less messing with the system since UserDictionaryAddWordContents assumes there's a layout

Related

How To: Customize the Sliding Panels Homescreen

This was from the windows mobile team blog. More to follow but wanted to post it for those who don't read that.
Original link: http://blogs.msdn.com/windowsmobile/archive/2008/06/03/customizing-the-sliding-panel-homescreen.aspx
Customizing the Sliding Panel Homescreen
from Windows Mobile Team Blog by Jorge Peraza
Hi, my name is Jorge Peraza; I am a Developer on the Windows Mobile team that was responsible for the new “Sliding Panel” home screen in Windows Mobile 6.1.
When we were working on the visual style and functionality of the home screen we tried to make something that looked both professional and appealing while still showcasing all the information the user is going to need to know what’s important and requires attention. While I think the default design looks really cool, we added some customization features to enable users to make it their own.
Customizing the layout
The home screen layout can be modified using the same home.xml file from previous versions of WM, the schema of the file was extended to allow the customization of many of its elements, this includes the art assets that are used for most of the plug-ins.
When you open the SlidingPanel.home.xml file (inside \ApplicationData\Home) you will find the plug-in element that corresponds to the sliding panel home screen (its CLSID is {E9267CAB-02EE-4f37-8216-6BF6A8FF5A71}). All the child elements inside it are designed to tweak and customize the way the home screen will look.
The top level element is the plugins tag, this has one attribute called “Order” and it’s used to list the plug-ins that will be shown and the order they are going to be laid out on the screen.
The built in plug-in names are:
1)CClock – The big clock
2)CAppointments - The calendar plugin
3)CHome – The notifications plugin
4)CMyPhotos – The photos plugin
5)CMessage – The message center (this is off by default on all sliding panel built in layouts.
6)CMusic – The music plugin
7)Settings – The settings plug-in
8)Custom Plugin – Users can specify custom plug-ins with static content that can be displayed on the home screen.
For example, the XML snippet bellow moves the photos plug-in to the first position and enables the message center (which is turned off by default on both "Sliding Panel" and "Sliding Panel Media")
<plugin clsid="{E9267CAB-02EE-4f37-8216-6BF6A8FF5A71}" name="Bronze" height="266">
<Plugins Order="CMyPhotos;CClock;CMessage" />
</plugin>
There are many other ways of customizing the home screen using the plug-in settings like overriding the default images or even adding your own custom plug-ins that display static content, I'll post and updated entry latter on on how to do this in detail but for now, you can use the provided home.xml files to start experimenting with this.
The notifications plug-in and message center
In the sliding panel home screen, the notifications plug-in by default serves as a dual-purpose notifications/gateway to all you phone/message accounts where every page represents one account (so, if you have multiple notifications in one category they will be shown as one summary page).
There is however an alternative behavior where individual notifications are added as independent pages (Similar to what the T-Mobile shadow home screen does) and the plug-in only shows accounts that have new notifications in them. One cool feature of this alternate behavior is that each individual notification can be dismissed without having to leave the home screen.
You can enable this alternative behavior by setting the following registry key to a value other than 2 (The actual value indicates how many pages of each notification type will be added to the home screen before collapsing them into a summary page. We have tested 2 and 5 but feel free to experiment with other values)
[HKLM\Software\Microsoft\Chome\Chome]
PageCollapseThreshold: DWORD
Note that this prevents you from being able to access the email/phone account data if there are no notifications for it. If you still want to be able to do that you can always re-enable the message center as described in the previous section as a separate plug-in.
There is one more behavioral change you can make that allows you to “dock” the condensed view of the first plug-in to the top of the screen when it is not active, we added this for people like me that want to have the clock always visible. To enable just set the following registry key to “1”
[HKLM\Software\Microsoft\Chome]
DockOperatorBar: DWORD
Advanced layout modification
There are even more advanced things you can do to further tweak the look of the home screen but it is unsupported by Microsoft at this moment so you’ll have to experiment on your own J (Hint, look at the following files \windows\CHome_240x320.cpr and \windows\CHome_320x240.cpr).
----------------------------------------------------------------------------------------------------
Thanks to djNutz for posting this information & OrganicM for his efforts.
I wanted to create a post with info about what the different keys do in the CHome section of the registry. So, I'll start with a brand new one, that I bet nobody knows about....
[HKLM\Software\Microsoft\Chome\Chome]
PageCollapseThreshold: 2 or 5 (DWORD Value)
This will collapse your Notifications panel to only show active notifications. You can enable this alternative behavior by setting the following registry key to a value other than 2 (The actual value indicates how many pages of each notification type will be added to the home screen before collapsing them into a summary page. 2 and 5 were tested and work pretty well.
More to come of course....
should this change be made to the security section too, or does that matter? actually, do changes to the security section ever matter, cause they seem to apply even when you only edit the software section.
p.s.
i'm pretty sure people are gonna ask, so maybe i'll save some trouble instead of looking like an ass by answering preemptively. This DWORD value must be created with your registry editor, it's not already there, at least on ricky v24.
2 = default or normal (i assume cause it looks the same as before) and 5 = condensed.
But for the rest of us who don't have the time to be on every WM blog and forum at once here's my favorite:
To “dock” the condensed view of the first plug-in to the top of the screen when it is not active, set the following registry key to “1”
[HKLM\Software\Microsoft\Chome]
DockOperatorBar: DWORD
This is so you can have the clock always visible, no matter which panel you're on. You could also set it so that CHome Weather's compact view is always on top. Whatever plugin is first on the list.
More info from MS coming down the pipe:
We can get the day of the week on the clock plugin at the top of CHome by doing this:
Replace this portion...
<!-- Date --> <Text ID="Date" Left="180" Top="83" Width="110" Height="19" FontFamily="Segoe Condensed" FontSize="9" FontStyle="Bold" Wrap="False" HorizontalAlignment="Left" Trimming="EllipsisCharacter"></Text>
With this!
<!-- Date -->
<Text ID="Date" Left="180" Top="83" Width="110" Height="19" FontFamily="Segoe Condensed" FontSize="9" FontStyle="Bold" Wrap="False" HorizontalAlignment="Left" Trimming="EllipsisCharacter"></Text>
<Text ID="Day of Week" Left="65" Top="83" Width="110" Height="19" FontFamily="Segoe Condensed" FontSize="9" FontStyle="Bold" Wrap="False" HorizontalAlignment="Right" Trimming="EllipsisCharacter"></Text>
I will incorporate this in Chome Weather fore sure!
Here you go, the first is my Home
2nd is Scroll Down once
3rd is Scroll Down twice
4th is Scroll Down Thrice
heh
Edit: Tried Month in cpr, no luck.
will keep trying
I'm glad people are finally getting this information out. It makes customization that much easier. I'm adding the tips to the wiki as well, as they come out.
How to Reload the Homescreen
I have two questions:
1. After editing my CHome cpr file, how do I reload the homescreen without having to reboot the device?
2. How can I show any text on the clock panel? Regular text is defined by Text ID = "xxxxx", where xxxxx is something like Time, Network Name, etc. However, suppose I want to have the text "Knowledge Rules", how do I set it up in XML?
I have very little programming and Excalibur experience. So, I apologize if these questions are too naive or have been answered before.
Thanks a lot in advance.
you can use this if you dont use OrganicM Chome Weather
I don't think Microsoft has put out much documentation on the sliding panels plugin yet. Most of the CHome configurations use
Code:
TextID="text 1"
as the delimiter for static text. But that's not to say that the clock plugin will recognize that as a valid section. Could work. Could make your phone useless.
beartard said:
I don't think Microsoft has put out much documentation on the sliding panels plugin yet. Most of the CHome configurations use
Code:
TextID="text 1"
as the delimiter for static text. But that's not to say that the clock plugin will recognize that as a valid section. Could work. Could make your phone useless.
Click to expand...
Click to collapse
I do not understand. How do I make the phone know that:
text 1 = Knowledge Rules?
Typical syntax seems to be Text ID = "xxxx", where xxxx is a variable name, which is recognized by the device. If Text 1 is a valid variable for the device, how do I assign it a value? Am I rambling here?
No, you're not rambling. As far as the information coming from Microsoft and disseminated here on this site goes, it's a best guess right now.
someone at msdn blog asked the same question.
Someone at msdn blog asked the same question. Let's wait to see if we get an answer from there...
From http://blogs.msdn.com/windowsmobile...ustomizing-the-sliding-panel-homescreen.aspx:
"Jorgeba, thanks for taking the time to educate your user. I have some questions.
How do you change the text in the condense clock? The .cpr file has Text ID="Text 1". How is "Text 1" define? I would love to add the date to the condense layout.
The ActionURL and Softkey2 URL in the Appointments plug-in always open calendar in the today view. Is there a way to make one of the button opens calendar in the month view? Setting the default view for calendar does not help."
Easy as pie......
If you know what you are doing.
If you have any xml experience,then you'll know how to adjust x and y values to position things in different places. Yes, you can do that. Just change x=whatever and y=whatever to where you would like them to be. Just know this means that it will start on the left and move x pixels over and y pixels down. If you put in negative values, it will shift them in the opposite direction.
Eg. x=-whatever will move it to the left vs a + value which will move it to the right. Same for y=
Also, you can adjust the valignment and halignment to center, left, or right.
Have fun with these. They apply to everything in your cpr (That's the layout for your homescreen.It's in your \Windows directory on your phone).I mean everything, from where your network displays, right down to your pictures.
That's it. Have fun!
jaymit said:
Hi,
Sorry Im kind of a newbie :s, is it possible to edit home screen panels? I wanted to change the layout and look of the clock plugin.
Thanks!
Click to expand...
Click to collapse
Does anybody know how to change font color for certain panels or certain lines of text in the panel? Is it only possible for the whole homescreen?
As far as I know even as far as old xml coding works, you can only change a font color for a selected word or unselected word. Meaning, if you have the old 6.0 your plugins that are selected could have a different color, but unselected could be another color. This applied to the entire homescreen. I have not seen different colors for different plugins, since each panel style is basically its own plugin (each has its own unique GUID), then I doubt you can change font color for each plugin. You can more than likely only change the active selected panel and inactive panel fonts. I am not sure what their titles are in the cpr, but I know that in the old 6.0, the homecolor was one of the fonts colors and the other was called something else.
Eventhough this is 6.1, it doesn't look like much has changed as far as the fonts color goes. You could, however, always try adding a "fontcolor=" command in the cpr and a hex code and try it, to see if it works.
Hope this helps.
Edit your registry or get CHome Config
Both do the same thing. You want to change the plugin order for CHome. It's located in HKLM\Security\CHome\Default Settings and in HKLM\SOFTWARE\Microsoft\CHome. Edit the order you want your plugins to go. Reboot your phone and the new edits should be reflected in your homescreen layout. If you are having trouble cause this is new. Just search this thread for CHome Configurator. It's stickied at the top of this forum. Download it and it will let you select the order in a much easier way. Make sure you reboot, though, or else your changes won't show. Hope this fixes your problem. Later.
tae-xda said:
How to change the default location for where the CMyPhotos plugin
Click to expand...
Click to collapse
rollingondubs1 said:
I have that already, All my games are under a folder which i cant make it as a action url
Click to expand...
Click to collapse
try this
"ACTIONURL" = "\Windows\Start Menu\Games\xxxxx xxxx.lnk
or this
"ACTIONURL" = "\windows\fexplore.exe; \windows\start menu\games"
Yes you can
One last time, I think I've figured out how to help you.
1. Open Chome Config.
2. Scroll to MyApplication and select it with your center button.
3. Scroll to any page you want to edit. Then scroll down to where it says ActionURL. Press menu.
4. Once in the menu select the "1 Change URL" item.
5. Once you have selected that it will take you to a file explorer. Go to \Windows\Start Menu\Games. This is where your games should be. If not, then wherever you store, your games, navigate yourself to that folder and select the file you want.
I think this should cover it. Hope this solved your problem. HOLLA!!!!
rollingondubs1 said:
I have that already, All my games are under a folder which i cant make it as a action url
Click to expand...
Click to collapse
How to change the location of CMyPhoto to \Storage Card\My Documents\My Picturs

Launch app when new SMS arrives

hi,
i am trying to put together my own sms triggered workflow. for that reason i am looking desperately for an sms-trigger which does not appear in the tray bar.
i have been intensively searching for this for ages and tried all of the apps i was able to find (smstrigger, rk-sms, mortring) but they either do not work or hook into the tray bar.
i hope that somebody can help me out.
What exactly do You want to happen when sms arrive ?
I can make a simple soft not visible in traybar,
BUT it IS visible in Taskbar.
It can f.ex fetch msg-body+Timestamp+Phonenumber from sender.
And perform Shell commands if needed.
hi eurocrypt!
first of all thanks for your help - i really appreciate that.
the minimum what i need is purely to start an exe file as i could do the rest with other utilities.
but what would really help is the following:
set the following flag to the registry
HKCU\System\State\Messages\vmail\Unread\Count = 1
if the sender's number is "#####" or the sender's name is "xxxxx" (if the number is stored as "xxxxx" in contacts)
that's it.
furthermore it would be great to delete exactly this sms with a different parameter perhaps.
My Idea is as follows:
I will make it possible to start the soft with Arguments
\SMSLaunch.exe aaa bbb ccc ddd eee fff ggg
Where
------------------------------------------------------
aaa= The Phone-number/name to trigger SMSLaunch
(Will be filter function, Name or Number Uppercase and removed Spaces and '-')
Like:
Mike Willson As contact Will be triggered if MIKE is Arg.
MIKE as arg will trigger Any Mike calling.
012-123 00 00 As Incoming Nr will be triggered if 01212 is arg.
073 as arg will trigger ANY number beginning with 073.
------------------------------------------------------
bbb= Shellcommand to run (Start app)
------------------------------------------------------
ccc= Arg for above shellcommand
------------------------------------------------------
ddd= Registry-Editing-Entry
------------------------------------------------------
eee= value to set for Registry.
( 1 is static, +1 increase by one, -1 decrease by one)
------------------------------------------------------
fff= Number to reply SMS to
------------------------------------------------------
Number of Arg's will be exact, and must be set by f.ex "X" to indicate
no Action for this Arg.
If needed I can make EDit function fromSoft if Started without Arg,
Textboxes to set ARgs and then Possibility to create A Shortcut with buildin Args.
I´m a bit buzy, so it may take some time to complete this,
hope You have time to wait.
WOW. GREAT!
sure i have time. i have been searching for weeks. so take all the time you need.
i am happy with command line based tool.
instead of textboxes (which might be cool for v2) something like
SMSLaunch.exe aaa /d
to delete the sms would be great.
background for what i use this tool:
i am using homescreen ++ as the only today-plugin. many of the provider in germany do not send a vmail-notice anymore. instead you receive an sms (this can not be changed in your mailbox account settings).
your tool will work as an sms-splitter to seperate vmail-sms from the rest. the process will be to set a registry value to "1" and delete the vmail-sms. homescreen++ will display an icon instead.
i am sure that some more users will be interested in this, too.
A Q!
Is this Reg entry correct ?
HKCU\System\State\Messages\vmail\Unread\Count = 1
I have like this
HKCU\System\State\Messages\vmail\xxxxxx\Unread\Count = 1
where xxxxxx has 4 different entries
Line1
Line2
Total
VoIP
Same in both Omnia and HTC Cruise
I use "Line1" when testing my tool now,
and looks like working OK.
But what about Value, Count=1
Is it automatically go down to Count=0
when listening to Your V-Mails ?
Eurocrypt said:
Is this Reg entry correct ?
HKCU\System\State\Messages\vmail\Unread\Count = 1
I have like this
HKCU\System\State\Messages\vmail\xxxxxx\Unread\Count = 1
where xxxxxx has 4 different entries
Line1
Line2
Total
VoIP
Same in both Omnia and HTC Cruise
I use "Line1" when testing my tool now,
and looks like working OK.
Click to expand...
Click to collapse
reg key same to me.
basically it does not matter which regkey.
you could also use hkcu\software\eurocrypt\vmail
if you want to
Eurocrypt said:
But what about Value, Count=1
Is it automatically go down to Count=0
when listening to Your V-Mails ?
Click to expand...
Click to collapse
superb!
yeah. count =1 if vmail arrives.
can you really do that - vmail to go down to 0 if calling mailbox?
how does the prog know that i am calling my mailbox?
maybe we need to put the number into a special regkey?
if it takes too much time, it is ok to leave vmail=1
i could also reset the value with mortscript.
Progress so far:
I have added possibility to use a SMSLauncher.ini in
same folder as EXE where settings can be specified.
(Easier to config for common guys)
But still possible to use Commandline.
IF SMSLauncher.ini exist, Commandline-Args will be skipped.
It is all working right now exactly as I want it
Though it is not compiled Yet, at work
and coding this toy in my HTC Cruise
Will make a working exe tonight to let You try it.
Also ok now to set VMAIL-Count to 0 if calling Your VMail-nr.
(Using a Phone-object)
Program also checking in SMS.Text for specified Trigger
if not Number/Contact trigged it.
To make it possible to send SMS to do some action
depending on SMS-Text.
Maybe I will add possibility to add sveral Trigger-entries in SMSLauncher.ini
to make it possible to send SMS to make different tasks in Phone.
..................................................................................
Exampel of SMSLauncher.ini
(Use 1 line in SMSLauncher.ini like the one below)
467;X;X;HKCU;System\State\Messages\vmail\Line1\Unread;Count;1;076-11223344;133
====== SYNTAX SMSLauncher.ini ==========
aa;bb;cc;dd;ee;ff;gg;hh;ii
aa= SMS.Number/SMS.Body to trigg SMSLauncher actions
bb= Path to EXE for Shell Command
cc= Argument for Shellcommand
dd= Root For Registry writing
ee= Path to Registry Entry
ff= Registry ENtry Name
gg= Value to set
(1= Allways set to 1)
(+1= Add 1 to existing value)
(-1= Subtract 1 from existing value)
hh= A number to reply Incoming SMS to
ii= Number to Your V-MAIL
(If this is set, Reg-Count will be set to 0)
All positions (9 Pos) must be set,
if no action will be used, set Upper case X
-------------------------------------------------------------------------------
Exampel only Reg change trigged on 123456 and removed Reg-Count on V-Mail number 133
123456;X;X;HKCU;System\State\Messages\vmail\Line1\Unread;Count;1;X;133
-------------------------------------------------------------------------------
When use Commandline instead of SMSLauncher.ini,
use same syntax but replace ';' with a space ' '
in commandline. like this
\Windows\SMSLauncher.exe 123456 X X HKCU System\State\Messages\vmail\Line1\Unread Count 1 X 133
understood. everything is clear. well done.
i have already written my ini-file, directory has been created and everything is prepared to start testing.
this app will eliminate lots of screen tappings.
Hopefully a working version
Read Readme-FIle for exact syntax in SMSLauncher.ini
(9 entries must be inside it, set as Upper Case X
if nothing to do in some section)
2 DLL's must be in same foldeer as EXE-file
Phone.dll + Outlook.dll
It will start with Form Shown,
You have to Minimize it Yourself,
either by getting menu and pick on "Today Scrreen"
or any other available way to do it.
does not work at the moment.
my ini looks like this:
5500;X;X;HKCU;System\State\Messages\sms\Unread;vmail;1;X;5500
have also tried it with
Mailbox;X;X;HKCU;System\State\Messages\sms\Unread;vmail;1;X;5500
sms comes in and regkey still stays at 0
on the other hand your app has started to send out continuously my last sms i have been sending out 6 hours ago
Looks like Your Reg-Path is wrong,
try this
5500;X;X;HKCU;System\State\Messages\vmail\Line1\Unread;Count;1;X;5500
(WATCH OUT! NO SPACES IN MY LINE ABOVE UNREAD with No Space inside)
It is working perfectly for me
Is 5500 the number You call to Your Voicemail ?
Is it also the number from where You got sms to tell You got VMAIL ?
yes 5500 is the number from where i receive the sms from and which is my voicebox number.
i think it is not a good idea to use the reg key above as the os is using this key as well.
if you set the value to 1 you will see a vmail-icon appearing in your taskbar.
just to be sure: it should work with any other reg key, shouldn't it?
Hmm I must have totally missed You :-(
I thought You wanted the soft to make your phone
show You got VMail even though You only have a common
SMS from Your Provider telling You have VMail.
I thought problem was You didn't get
Your Phone to "understand" it was Vmail.
Anyway,
Soft can run any app in your phone (with or without Argument)
trigged upon Incoming Phone-Nr or keyword in SMS.Body.
It can reply Incoming SMS.Body+Nr to
Phone-Number of Your Choice.
It can also set Registry-Key of Your Choice
Same Reg-Key can be set to 0 if You call Nr of Your Choice.
no, you understood me totally right. the only "difference" might be that i am using homescreen++ to handle sms and email notifications. i have even disabled the notification bubbles as they annoy me...
bottom line: great work and support! will test it out tonight
Additional Info ...
If You use SMS.Text for triggering,
Word/Words are Case Sensitive
rgds Eurocrypt
Ideas:
Is there need for more functions..
Also Trigg it on incoming PhoneCall ?
Multiple Lines/Triggers in SMSLauncher.ini
to do different tasks depending on Number/SMS.Text ?
Send SMS to change Parameters ?
(<password:..new config..assword>)
Any other ideas are welcome .
I´m hobbyist Just started to play with this,
so to complex tasks are not possible for me to handle.
i would do the following:
possible to run smslauncher in background, i.e. hidden app so that it does not appear in the task manager (i have configured my device to close all apps when locking screen). in this case we need an extra switch to close smslauncher.
another function might be to delete the sms where smslauncher is set to beactivated. i.e. if sms from 5500 activates smslauncher, your app should execute the command line or set the registry value AND (if an optional switch /d is set) instantly delete the sms.
you could also think about, what you proposed, to make text and sender's name available in a registry key.
a lot of people here e.g those who have put together their own manila style GUI, will thank you for this as there is currently no easy way to display sms/email information on the todayscreen.

[TUT] A mini-tutorial on rearranging the Manila Home Screen

Rearranging the Manila Home Screen​
What do I need to know?
Manila uses few types of files: qtc, xml, mode9 and lua. First one is for graphics, second usually for different languages (although not only) and the two last ones are the ones we are interested in. Mode9 files contain information on position, visibility and other properties of almost every element on Manila tabs. Lua files contain different functions, used for animations, updating info and so on.
For editing the Home Screen we need the mode9 file - 1c684cd8_manila and the lua script - 25d04412_manila. You can find these files (from each Manila, starting from 1.0 and ending on 2.5) on this forum.
What tools do I need?
Editing mode9 files is quiet easy. You just have to run m9editor, open the file, make the changes you want and save it. Changing stuff in lua scripts is a bit more complicated, as you have to decompile it. Shorter scripts are easily decompilated by luadec, but some longer ones require us to correct errors. Fortunately, the lua script we have to change is easily decompilated (though there can be a problem with the if condition). To do this follow these points:
- copy luadec.exe and luac.exe to the folder you where you have the lua script (let's say it's c:\compacthome\mod\)
- press Windows Logo + R (or Start > Run) and type cmd
- go to the folder containing the lua script (in this case it's cd \compacthome\mod\)
- type luadec script_name > script_name.txt - where script_name is the script you want to decompile (for example 25d04412_manila) and script_name.txt is the name of the output file, which we will edit
- in case of errors you have to correct them (look for the lua decompiling tutorial by sztupy)
- once you have the script decompiled you don't need to do it again.
- open the output file and change whatever you want
- to compile the file just type luac -o script_name script_name.txt, where script_name is the file we want to have the script_name.txt compiled
What can I change?
When you open the mode9 file we want to edit, expand the tree and you'll see many sections called 'Object'. Below them there are few lines called 'Property'. What you can easily change is:
- Position - just change the value of X and Y (center position (X=0, Y=0) and axis are different for most of the objects - you have to test this)
- Visibility - True or False (sometimes you may have to change the size of a image to 0x0, so that it won't show never)
- Font
- Font Size
- Color of text in RGB format - if Property is not available, add it
In the 25d04412_manila script you can change positions of many objects in both portrait and landscape mode.
- TabsLeft - left part of the clock (animated)
- TabsRight - right part of the clock (animated)
- clock_tabs - background of the clock (pile of tabs)
- alarm_clock - alarm info and date
- NotifiCamera3D - notifications & appointments
- NotificationShiftY - shifting of appointments when changing to small clock
To change the position just modify the first two parameters of Vector3(X, Y, Z) - both CameraPosition.value and LookAtPosition.value.
How to save and test the changes in a fast way?
Open a cab creator (for example WinCE Cab Manager) and add the files you changed to /Windows. Save the cab, copy it to your device, install and reboot Manila. You can also copy manually the file, but I prefer the first way, because in case of any problems you can easily uninstall the cab and get the default Home Screen.
How to get the Home Screen working with Background4AllTabs?
Just open the 1c684cd8_manila file by m9editor, look for 'HomeBackground' and delete the whole paragraph which contains it (from <Object>Type="Group" to the next <Object>Type="Group").
- - -​
If you have any suggestions, propositions or ideas, please write them in this thread, I'll try to complete this tutorial, so it will be useful for everyone. Thanks!
i cannot come up with suggestions, but that tutorial is very nice on your side!
Although not actually about the home screen arrangement. I do think we need the information on how to patch the EXE for weather and especially non-HTC devices to be made public. The few people that know how to do it don't seem to want to SHARE that knowledge, which is damned frustrating!
Kamill, what an excellent idea. I'm looking forward to your tutorial. I wonder will it be for Manila 2.0?
Here are some ideas:
Change touch flo colour
Appointments for at least one week
Linking big clock with another application (similar to Ssmaho)
Changing soft keys names/applications
Changing font sizes/types
Changing date formats on appointments
I hope this doesn't make it too difficult (I think the second one is though for some Manila versions!)
UPDATE in first post - an early version of the mini-tutorial.
FloatingFatMan, unfortunately I don't know how to do it...
mitsi, thanks, I'll work on that.
Kamill, My question is what needs to be changed to get appointments in dates after tomorrow to appear? Do I need to edit both the mode9 and the lua script? Or is it just one of those? I'm willing to get my hands dirty to fix it.
The easiest way is to get the files from hallatore's mod for Manila 2.0 and compare them to the original. There are mainly 3 differences, you'll find them for sure. AFAIR all you have to change is in one script, you have to add an option to display the date, change the place from where appointments are being taken (poomappointments(TAB_Calendar) instead of poomappointments(TAB_Home)) and change the number of appointments in the for loop.
Hmm. Well I changed the TAB_Calendar and added the option to to display date. Those were easy. Finding the loop is harder. I forced A loop to go 5 times and I got 5 calendar events, but the ones past tomorrow were the default ones in the mode9 ("Review design comp (Dan's office)"). I did it in the InitializeFullAnimation function just below this if statement:
Code:
if l_15_15 > 5 then
l_15_15 = 5
end
So those items are not being updated from the calendar. Any ideas? Am I looking in the wrong loop?
Anyway you can post hallatore's mod de-compiled? I think I have the original, but when I use m9editor the lua has a lot of decompiled errors.
Here you go. Are you doing this on the Manila 2.1? I tried so many things to get this working, but with no success
how to change home tab
Hi, I have read all the posts here and in some other threads related, and I'm still confused
I did try to install the cabs posted, and it totally messed my home tab, so I had to hard reset every time (because uninstalling didn't fix it up).
All I want to have is this:
1. move the alarm notification on the upper-right corner (to cover or remove the ATT logo)
2. make the Call History to auto-hide if there is no missed call (or to delete it, if it is easier)
3. have more appointments visible (2-3) with the big clock, and to be able to flip the clock upwards in order to have even more appointments visible
4. when I click on the appointment, to open the Calendar (this is already possible, and I'd like to remain this way)
I apologize if this is a silly question: is this possible to be done only by editing some manila files, and if so, which ones and what should I modify?
I opened some manila files (e.g. 1c684cd8_manila) using notepad and m9editor.exe, and, honestly, I had no clue as to what should I do
I am sure that you guys know this stuff already, and it is very easy for you. If it's not complicated to explain it to me, please help me!
thank you very much
Kamill said:
Here you go. Are you doing this on the Manila 2.1? I tried so many things to get this working, but with no success
Click to expand...
Click to collapse
Thanks. I am trying for Manila 2.1. There's gotta be a way.
tatarasi said:
Hi, I have read all the posts here and in some other threads related, and I'm still confused
I did try to install the cabs posted, and it totally messed my home tab, so I had to hard reset every time (because uninstalling didn't fix it up).
All I want to have is this:
1. move the alarm notification on the upper-right corner (to cover or remove the ATT logo)
2. make the Call History to auto-hide if there is no missed call (or to delete it, if it is easier)
3. have more appointments visible (2-3) with the big clock, and to be able to flip the clock upwards in order to have even more appointments visible
4. when I click on the appointment, to open the Calendar (this is already possible, and I'd like to remain this way)
I apologize if this is a silly question: is this possible to be done only by editing some manila files, and if so, which ones and what should I modify?
I opened some manila files (e.g. 1c684cd8_manila) using notepad and m9editor.exe, and, honestly, I had no clue as to what should I do
I am sure that you guys know this stuff already, and it is very easy for you. If it's not complicated to explain it to me, please help me!
thank you very much
Click to expand...
Click to collapse
Here is the solution to all 4 requests, but it is for Manila 2.0, so be careful. Back-up first just in case. Your screen will then look similar to the one shown.
Been trying...
I've been trying for some time now to get more than today's and tomorrow's appointment's displayed in manila 2.1. I added in the code that Hallatore added (can be found in stupy's lua thread) but there seems to be something limiting the amount of days shown ahead (I hope is not limited by the manila.exe, but I think not).
As additional info, the lua file that use to be embedded in the Home.mode9 isn't any more and is named 53cc1e4f_manila for 2.1 manila and 652ae0f4_manila for 2.5 manila,
12
mitsi said:
Here is the solution to all 4 requests, but it is for Manila 2.0, so be careful. Back-up first just in case. Your screen will then look similar to the one shown.
Click to expand...
Click to collapse
This is exactly what I'm after.
Unfortunately, I tried that alternative and, again, it totally messes my TFLO, and I had to hard reset again.
What do you mean by Manila 2.0, is this the TFLO version (in Settings, I see that I have ver. 3.0 build 29946)?
thank you
Change Home tab display
Hi, thank you very much for your interest and trying to give me solutions for my request. It is amazing how people from different corners of the world are connecting and helping each other.
I presume that the file to work with is 1c684cd8_manila.
I opened that with m9editor 3.3.0.1. It's a lot of info there
Could you guys be so kind and give some clues as to what should I look for in order to change:
- the alarm notification - to move it on the upper-right corner
- the carrier logo - to delete it
- the Call History - to delete it
- the Appointments - to have at least 2-3 shown
Also, important clues as to what NOT to touch, in order to
- continue to be able to flip over the big clock
- continue to be able to open the Calendar when click on the appointment
thank you again
tatarasi said:
- the alarm notification - to move it on the upper-right corner
Click to expand...
Click to collapse
Change the X and Y in the 'Position' Property of these objects: AlarmClockOn, AlarmClockOff, AlarmTime.
tatarasi said:
- the carrier logo - to delete it
Click to expand...
Click to collapse
To the object 'OperatorLogo' add a property called 'Visibility' and change its value to False - if it won't work change it's height to 0 in the 'Size' property.
tatarasi said:
- the Call History - to delete it
Click to expand...
Click to collapse
The same as above, objects: MissedCall_SBar1, MissedCall_SBar2, MissedCallIcon, MissedCallText.
tatarasi said:
- the Appointments - to have at least 2-3 shown
Click to expand...
Click to collapse
You need to decompile the 53cc1e4f_manila script and find l_15_0.MaxShowCount and change the value of it to the desired one.
Kamill said:
You need to decompile the 53cc1e4f_manila script and find l_15_0.MaxShowCount and change the value of it to the desired one.
Click to expand...
Click to collapse
If only it was that easy... I've been trying all kinds stuff including what you suggest above. I have decompiled the 53cc1e4f_manila I'll attach it here (it's the one from yozgatg's r1.5),
12
I mean you CAN change the number of appointments, but in a range of 0 to 6 (5 with big clock). I've tried to get more appointments shown, but I failed...
Kamill said:
Change the X and Y in the 'Position' Property of these objects: AlarmClockOn, AlarmClockOff, AlarmTime.
To the object 'OperatorLogo' add a property called 'Visibility' and change its value to False - if it won't work change it's height to 0 in the 'Size' property.
The same as above, objects: MissedCall_SBar1, MissedCall_SBar2, MissedCallIcon, MissedCallText.
You need to decompile the 53cc1e4f_manila script and find l_15_0.MaxShowCount and change the value of it to the desired one.
Click to expand...
Click to collapse
Hi, Kamill,
Apologize for double posting, I am growing impatient feeling that I am so close to a solution
Regarding the Manila, I checked where you told me to, and I found out that I have TFLO 3D 1.2.37896.1_1813.6. Thank you.
Thank you for your advices, I already tried to remove the logo
- first, I added the <Property> Name=Visibility Value="False" - did not work
- then, I changed the Height=0 - still ATT was there
- lastly, I deleted the entire Object GLESSprite2D (which was above the "OperatorLogo" property - still no result
What do you think I am doing wrong?
Speaking of the number of appointments, I amazingly discovered that I do not have 53cc1e4f_manila file. What do you think that means?
thank you very much, again
Manila 1 is a bit different from 2.0 or 2.1, the 53cc1e4f_manila script is embedded in the 1c684cd8_manila mode9 file (one of those at the beginning).
AFAIK you can replace the logo file with a blank one (don't ask me which file is it, I don't know ). Or you can try to add a 'Position' property and move it out of the sight (but it may come back in some situations) - though I do not guarantee it'll work.
I hope you'll success in modifying the Manila 1 homescreen, I guess there is still a couple of people who use that version of TF3D.

[24/08/2010] first development project 4 on 1 row

intro: I'm a bachelor student who has a little knowledge of programming.
For the first time i try to make a simple game that i already wrote in java work in vb.
I'm planning to make this a full working game that I can place on the market place for free.
I already have the idea how to make the AI to play 1 vs PPC
I wrote it for a WVGA screen but its completely dynamic so it should work on other screen sizes.
Only when you change the orientation the text will not be visible (need to think where i'm gonna place it)
pls feel free to give input on the project.
I uploaded the whole vb net directory so its open for everybody
(Im still a bit strugling with a cab file that has links in it
if you instal it, it should be visible in the programfiles dir)
--edited 24/08
-thanks to Gaz25 the refresh problem is soved
-the 4 on a row detection algorithm is completed
Hi, I had a look at your code and fixed your flicker problem.
Basically, when you do you own drawing on a control like a panel you need to take control of painting the background as when a control is redrawn it paints the background first and then anything else on top like text, images etc...
The best thing to do is create a custom control. Then you can override the OnBackgroundPaint event and say do nothing.
Then override the OnPaint event and here is another trick.
In the OnPaint event, create a bitmap. This will be the 'backbuffer' which you will do all your drawing on. Then when you have done all your drawing on the backbuffer, you draw the backbuffer to the screen.
I have included your solution with my modification which I hope make more sense .
If you need more explanation then let me know and I will go into more detail.
Gaz25 said:
Hi, I had a look at your code and fixed your flicker problem.
Basically, when you do you own drawing on a control like a panel you need to take control of painting the background as when a control is redrawn it paints the background first and then anything else on top like text, images etc...
The best thing to do is create a custom control. Then you can override the OnBackgroundPaint event and say do nothing.
Then override the OnPaint event and here is another trick.
In the OnPaint event, create a bitmap. This will be the 'backbuffer' which you will do all your drawing on. Then when you have done all your drawing on the backbuffer, you draw the backbuffer to the screen.
I have included your solution with my modification which I hope make more sense .
If you need more explanation then let me know and I will go into more detail.
Click to expand...
Click to collapse
i will look at it monday when i'm back from a festival
thanks in advance.
sended from x1
Thank you very mutch,
i just tested it and it works perfect.
I will try to make it better in the following weeks.
Only one thing that you changed in my code that wasn't correct "speler = 0" (on load, needs to be 1 or 2) (speler = player)
I also found an error in my own algortim for the 4 on a row detection
"teller1 = teller2 = 0" ( gave me a -1 on teller1)

Hide input panels with setting configuration?

Is there a way to hide certain input panels on the window form using configuration or config file of some sort?
For example.... let's say in my database I have items with 12 possible fields in each (Name, LastName, Age, Occupation, Location.......etc).
But what is a user of application only wants to fill in 3 fields every single time (for example - LastName, Age, Location)? Leaving others in place when user doesn't needs them is an extra clutter. So how can I hide or disable those input panels based on user's preference on which fields he wants to use?
--
I think I found a way to hide items by setting Visible boolean.
Code:
this.txtName.Visible = false;
this.lblName.Visible = false;
this.txtOccupation.Visible = false;
this.lblOccupation.Visible = false;
However, how can I move up other fields between or below them? Currently hiding just creates empty spaces.
You can turn the textbox off completely by setting its enabled property to false.
You can then move other textboxes and labels over it by setting their Location.X and Location.Y properties.
You will have to keep track of where everything is on the screen, and what is enabled and what isn't.
stephj said:
You can turn the textbox off completely by setting its enabled property to false.
You can then move other textboxes and labels over it by setting their Location.X and Location.Y properties.
You will have to keep track of where everything is on the screen, and what is enabled and what isn't.
Click to expand...
Click to collapse
Thanks.
Do you know if there is an easy way to move everything up? (lets say I make first item invisible and want to move the 10 items below up) Or will I have to call everyone individually to move up?
Also.. Is there away how I can use TabIndex to call those forms?
There are others ways to accomplish what you are looking for, but no easy route to it.
They all end up as broad as long. You either spend time during the design stage, creating an array of possible tabbed forms to be used by the program later, or spend time designing the program to deal dynamically with the fields required. The latter of the two is harder to do, but it is far more elegant.
Sorry, but there is no silver bullet.

Categories

Resources