Join Our 3 MILLION+ Members Today! Register Here | Login
Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > Theme Developers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
    Thread Author   #1  
Old 11-09-2011, 09:19 AM
CrackBerry User
Device(s): Blackberry Torch 9800
 
Join Date: Dec 2010
Posts: 24
Likes Received: 2
Thanked 1 Time in 1 Post
Default Little help with hidden dock

Hello,
i try to create a hidden dock in this way:

two layer: layer_1 a button used to open the dock
layer_2 a dock

i use this code in attach file, but don't work.

when i press "ESCAPE" the dock in hidden, but when i press "home" don't show anything.
Attached Files
File Type: txt main1.txt (1.6 KB, 15 views)
Reply With Quote Tip this Post
  #2  
Old 11-14-2011, 12:51 AM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

home.focusin is a trigger when you bring the focus to that element. If you want an event to be triggered from a click, you need to use home.activate. so..

Code:
	<animateTransform xlink:href="#Layer_2" id="_anim_l1"
		attributeName="transform" type="translate"
		to="0,0" dur="0.01s"   
		fill="freeze"
                begin="home.focusin"	/>
becomes

Code:
	<animateTransform xlink:href="#Layer_2" id="_anim_l1"
		attributeName="transform" type="translate"
		to="0,0" dur="0.01s"   
		fill="freeze"
                begin="home.activate"	/>
I am not sure if its neccesary or not as I have always mainted a strict form to my coding however it might be a good idea to keep your naming conventions logical and straight forward. for example :

Code:
<g  id="Layer_1">
	<!-- pz:tag type="layer" -->
<g  id="home">
	<!-- pz:tag type="button" -->
<g  id="Rectangle_3_Button-Contents">
	<!-- pz:tag type="layer" -->
<rect id="Rectangle_3"
	style="fill:#00ff02; stroke:#ffffff; stroke-width:1;"
	x="-160" y="155" width="71" height="45"/>
</g>
</g>
</g>
becomes,

Code:
<g  id="homeIcon">
	<!-- pz:tag type="layer" -->
<g  id="home">
	<!-- pz:tag type="button" -->
<g  id="home-Contents">
	<!-- pz:tag type="layer" -->
<rect id="Rectangle_3"
	style="fill:#00ff02; stroke:#ffffff; stroke-width:1;"
	x="-160" y="155" width="71" height="45"/>
</g>
</g>
</g>
also, wat are you trying to acheive with this?

Code:
<set xlink:href="#home" attributeName="display" to="inline"  begin="home.focusin"/>
It appears you want home to show when you focus in on home??? is that right? if you use display and to="none" you wont be able to focus in on home to show it, so ...i really dont get the idea of using that line of code...
__________________
32GB Playbook
Unlocked Bold 9700 - Berrylicious VI Hybrid
Reply With Quote Tip this Post
Thanked by pbaccega (11-14-2011)
    Thread Author   #3  
Old 11-14-2011, 09:27 AM
CrackBerry User
Device(s): Blackberry Torch 9800
 
Join Date: Dec 2010
Posts: 24
Likes Received: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Justam View Post
home.focusin is a trigger when you bring the focus to that element. If you want an event to be triggered from a click, you need to use home.activate. so..

Code:
	<animateTransform xlink:href="#Layer_2" id="_anim_l1"
		attributeName="transform" type="translate"
		to="0,0" dur="0.01s"   
		fill="freeze"
                begin="home.focusin"	/>
becomes

Code:
	<animateTransform xlink:href="#Layer_2" id="_anim_l1"
		attributeName="transform" type="translate"
		to="0,0" dur="0.01s"   
		fill="freeze"
                begin="home.activate"	/>
I am not sure if its neccesary or not as I have always mainted a strict form to my coding however it might be a good idea to keep your naming conventions logical and straight forward. for example :

Code:
<g  id="Layer_1">
	<!-- pz:tag type="layer" -->
<g  id="home">
	<!-- pz:tag type="button" -->
<g  id="Rectangle_3_Button-Contents">
	<!-- pz:tag type="layer" -->
<rect id="Rectangle_3"
	style="fill:#00ff02; stroke:#ffffff; stroke-width:1;"
	x="-160" y="155" width="71" height="45"/>
</g>
</g>
</g>
becomes,

Code:
<g  id="homeIcon">
	<!-- pz:tag type="layer" -->
<g  id="home">
	<!-- pz:tag type="button" -->
<g  id="home-Contents">
	<!-- pz:tag type="layer" -->
<rect id="Rectangle_3"
	style="fill:#00ff02; stroke:#ffffff; stroke-width:1;"
	x="-160" y="155" width="71" height="45"/>
</g>
</g>
</g>
also, wat are you trying to acheive with this?

Code:
<set xlink:href="#home" attributeName="display" to="inline"  begin="home.focusin"/>
It appears you want home to show when you focus in on home??? is that right? if you use display and to="none" you wont be able to focus in on home to show it, so ...i really dont get the idea of using that line of code...
Work, thanks.
Reply With Quote Tip this Post
  #4  
Old 11-14-2011, 09:31 AM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

Quote:
Originally Posted by pbaccega View Post
Work, thanks.
Np

Posted from my CrackBerry at wapforums.crackberry.com

Posted from my CrackBerry at wapforums.crackberry.com
Reply With Quote Tip this Post
  #5  
Old 11-15-2011, 02:13 PM
CrackBerry Newbie
Device(s): 8520 (Curve)
Pin: 236FE2F1
 
Location: Madeira Island
Join Date: May 2011
Posts: 6
Likes Received: 0
Thanked 0 Times in 0 Posts
Default

I'm new at hidden doc, so if I want to use escape to hide and scape to show how can I do that? And where do I put the code?
Reply With Quote Tip this Post
  #6  
Old 11-15-2011, 04:20 PM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

Quote:
Originally Posted by Mdias View Post
I'm new at hidden doc, so if I want to use escape to hide and scape to show how can I do that? And where do I put the code?
Unfortunately you can`t use the same button/key to have 2 different actions. You can make it look like the same button has 2 different actions but infact it will be 2 different buttons.

The reason for this is essentially SVG code used for blackberry development is not conditional and therefore there is no way to distinguish between 1 state(eg: UP) and 1 state(eg: down)...there is also no way to store variables to define which state you are in....


so to achieve what you are trying to do you will need a key for up and a key for down...escape to hide and $ to show or something along those lines.

Hope this helps...
__________________
32GB Playbook
Unlocked Bold 9700 - Berrylicious VI Hybrid
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > Theme Developers   Little help with hidden dock

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes