----ooo----
phần 5: tổng quan các hiệu ứng thông dụng bằng code
1/ hide dock & crossbar & crossfocus :
như đã nói các hiệu ứng này chỉ là một dạng của translate ! quá làm quá dễ dàng !
đây là dạng chung của code :
Mã:
<animatetransform xlink:href="#......." id="_anim_newday" attributename="transform" type="translate"
to="0,0" dur="0.5s"
fill="freeze"
begin="…….” />
nếu làm muốn đi trái , phải , lên , xuống thì thật chất chỉ là thay trục tọa độ :
đối với hidedock có 3 phương án thực hiện là
bengin=”***x.focusin” hoặc bengin=”***x.focusout hoặc begin="accesskey(…)"
đối với crossbar và crossfocus thì thông thường chỉ dùng:
bengin=”***x.focusin”
và ngoài ra còn do người làm phối hợp các code , các tọa độ , các khung thời gian mà tạo hiệu ứng mới lạ , ta có thể cho 2 code tác động vào 1 button để tăng thêm hiệu ứng !
và về crossfocus thật chất hiệu ứng này chỉ như là crossbar chỉ khác là mình cho tương tác vào một file image import trong composer mà thôi.
ví dụ: mình add một file image trong composer tên là newday thì mở notepad ra ta sẽ kiếm được id này và chỉ việc muốn cross thế nào thì đưa id vào code tác động thôi
Mã:
<animatetransform xlink:href="#newday" id="_anim_newday" attributename="transform" type="translate"
to="0,0" dur="0.5s"
fill="freeze"
begin="theme_button_1.focusin" />
muốn cross qua mấy icon thì cũng phải có bấy nhiêu code tương ứng và tọa độ tương ứng , việc này đòi hỏi kiên nhẫn và test nhiều lần để cho ra kết quả chính xác nhất! nếu như làm hidedock hay crossbar mà có quá nhiều id cho từng button việc này sẽ khiến việc làm phức tạp thì cách khắc phục nhanh nhất là ta tạo một layer2 trên composer , và cho code tác động vào layer 2 thôi vừa fix lỗi kéo các button ko cần thiết add trong layer1 vừa tạo một tên tương tác chung cho các icon cần kéo.
2/ show/hide today calender và sms :
khi làm hiệu ứng này cần đòi hỏi phải hiểu được các phần ở trên viết có liên quan đến việc khống chế button trong studio bằng hs !
code 4 dòng cho calender:
Mã:
<set xlink:href="#hs0" attributename="display" to="none" begin="0"/>
<set xlink:href="#calendar1hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#calendar2hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#calendar3hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#calendar4hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#hs0" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#calendar1hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#calendar2hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#calendar3hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#calendar4hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#hs0" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#calendar1hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#calendar2hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#calendar3hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#calendar4hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
code 4 dòng chomessages:
Mã:
<set xlink:href="#hs1" attributename="display" to="none" begin="0"/>
<set xlink:href="#messages1hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#messages2hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#messages3hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#messages4hotspot" attributename="display" to="none" begin="0"/>
<set xlink:href="#hs1" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#messages1hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#messages2hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#messages3hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#messages4hotspot" attributename="display" to="none" begin="accesskey(x)"/>
<set xlink:href="#hs1" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#messages1hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#messages2hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#messages3hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
<set xlink:href="#messages4hotspot" attributename="display" to="inline" begin="accesskey(z)"/>
lưu ý: hs của calender là hoàn toàn khác nhau.
ví dụ: add calender trước sau đó add messages thì calender là hs0 còn messages là hs1 ! muốn tạo thêm mấy dòng sud thì ta cứ làm thêm các code hotspot là xong !
chắc có nhiều anh em thấy lạ tại sao có code này nó đi 3 dòng cho 1 hiệu ứng và có đoạn code begin=”0” là thế nào ??? thì em nói luôn cái begin=”0” nó là cái fame đầu tiên hiển thị khi ta set theme !
vd:
Mã:
<set xlink:href="#hs0" attributename="display" to="none" begin="0"/>
có nghĩa là frame đầu tiên thì hs0 luôn ẩn , phải kích hoạt mới hiển thị !
3/ fade in & fade dock và button :
* fade in :
Mã:
<animate xlink:href="#theme_button_1" id="_anim_sl1"
attributename="opacity"
values="0.00392157;1"
keytimes="0;1"
dur="0.45s" fill="freeze"
begin="accesskey( )" />
<animate xlink:href="#theme_button_2" id="_anim_sl2"
attributename="opacity"
values="0.00392157;1"
keytimes="0;1"
dur="0.45s" fill="freeze"
begin="accesskey( )" />
<animate xlink:href="#theme_button_3" id="_anim_sl3"
attributename="opacity"
values="0.00392157;1"
keytimes="0;1"
dur="0.45s" fill="freeze"
begin="accesskey( )" />
* fade out:
Mã:
<animate xlink:href="#theme_button_1" id="_anim_sh1"
attributename="opacity"
values="1;0.00392157"
keytimes="0;1"
dur="0.45s" fill="freeze"
begin="accesskey(escape)" />
<animate xlink:href="#theme_button_2" id="_anim_sh2"
attributename="opacity"
values="1;0.00392157"
keytimes="0;1"
dur="0.45s" fill="freeze"
begin="accesskey(escape)" />
<animate xlink:href="#theme_button_3" id="_anim_sh3"
attributename="opacity"
values="1;0.00392157"
keytimes="0;1"
dur="0.45s" fill="freeze"
begin="accesskey(escape)" />
4/ owner in homesreen
Mã:
name :
<image x="-100"
y="55"
width="292"
height="25"
xlink:href="x-object:/ownerinfo?id=name&width=292&height=25&font-family=applicationcontent&font-style=plain&font-size=18&fill=033158&align=left"/>
info :
<image x="-100"
y="81"
width="293"
height="155"
xlink:href="x-object:/ownerinfo?id=info&width=293&height=155&font-family=applicationcontent&font-style=plain&font-size=18&fill=033158&align=left"/>
5/ big clock on homesreen:
Mã:
<image
x="-80"
y="-30"
width="320"
height="240"
xlink:href="x-object:/currentdatetime?clocktype= ;width=480&height=360&font-family= bbclarity &font-style=bold&font-size=72&font-smoothing=on&fill=ffffff&antialias-mode=antialiasing&lign=left&altfont=bbclarity&msize=1"/>
các code này đều có thể thay font chữ ở phần font-family , xem phần font trong bb có tên font nào thì thay bằng tên font đó ! tạm thời chỉ biết đến đây ! còn lại anh em nghiên cứu tiếp !
* tác động vào time
- x càng lớn càng sang phải
6/ một số code trên banner time :
Mã:
<image
x="261"
y="3"
width="11"
height="13"
xlink:href="x-object:/alarmindicator?width=11&height=13&align=center"/>
<image
x="275"
y="-1"
width="44"
height="20"
xlink:href="x-object:/batterylevel?width=44&height=20&img=meter-appnet_rim_ribbon_batterylevel-icons44x20&align=center"/>
<image
x="207"
y="1"
width="68"
height="16"
xlink:href="x-object:/gridindicators?area=5&width=68&height=16&font-family=theme_unbutu_4ever_sonic-11&font-style=plain&font-size=16&fill=ffffff&omitindicator=:bluetooth:&align=center"/>
<image x="54"
y="2"
width="6"
height="14"
xlink:href="x-object:/signallevel?width=6&height=14&xofs=0&yofs=0&img=meter-appnet_rim_ribbon_signallevel-icons6x14&align=center"/>
<image
x="156"
y="6"
width="20"
height="11"
xlink:href="x-object:/gpsmode?width=20&height=11&align=center"/>
<image x="286"
y="0"
width="32"
height="15"
xlink:href="x-object:/wlansignallevel?width=32&height=15&xofs=0&yofs=0&align=center"/>
hiện tại chỉ biết được id của date và coverage để dùng code tác động :
Mã:
banner_date; banner_coverage
hot key vào home screen
Mã:
<loadscene xlink:href="x-exec://net_rim_application_menu" begin="accesskey( )"/>
hot key vào 3rd apps
Mã:
<loadscene xlink:href="x-exec://apps" begin="accesskey( )"/>
hiện tại em chỉ biết được nhiêu đây thôi ! anh em cùng nghiên cứu tiếp với em nhé!
thân gửi anh em !
mong mọi người áp dụng triệt để nhất để sáng tạo
Thông qua phân tách dữ liệu Google từ 86 nhà nước, mới đây, một công ty tại Anh đã ban bố bảng xếp hạng kích tấc "cậu nhỏ" của các nước trên thế giới. Kết quả, hầu hết các nước xếp ở nhóm đầu của...
Dương vật của bạn trai Việt thuộc nhóm nhỏ nhất hành tinh?