JavaScript uses Deviceone to develop combat (v) Imitation zaker applications

Source: Internet
Author: User

The components that are toggled under Index can be implemented with Viewshower, as described in:Do_viewshowerhttp://bbs.deviceone.net/forum.php?mod=viewthread&tid=128&extra=page%3D3http://bbs.deviceone.net/forum.php?mod=viewthread&tid=131&extra=page%3D3()binding Data:Do_listdatahttp://bbs.deviceone.net/forum.php?mod=viewthread&tid=154&extra=page%3D2the inside can slide up and down using two things: Do_listview and Do_scrollviewthe ListView is suitable to put up and down the same thing, but does not support editing, so if you want to edit the use of LinearLayout, the other scrollview is relatively simple to slide up and down the component, because it is directly to write more than how long, not so flexible, see below Demo: Do_listviewhttp://bbs.deviceone.net/forum.php?mod=viewthread&tid=142&extra=page%3D3http://bbs.deviceone.net/forum.php?mod=viewthread&tid=119&extra=page%3D4Do_linearlayouthttp://bbs.deviceone.net/forum.php?mod=viewthread&tid=148&extra=page%3D3Do_scrollviewhttp://bbs.deviceone.net/forum.php?mod=viewthread&tid=127&extra=page%3D3()[Attach]295[/attach]Baidu positioning the use of the components described below demo:do_baidulocationhttp://store.deviceone.net/Documents/do_BaiduLocation/2.0.html[Mw_shl_code=javascript,true]bdlocation.on ("Result", function (data, E) {
Label_address.text = data.address;
Bdlocation.stop ();
});
Bdlocation.start (); [/mw_shl_code]

slide switch uses Do_segmentview and Do_slideview see demo:Do_slideviewhttp://bbs.deviceone.net/forum.php?mod=viewthread&tid=139&extra=page%3D3http://bbs.deviceone.net/forum.php?mod=viewthread&tid=40&extra=page%3D4

[mw_shl_code=javascript,true]/***********************************************************/
When the index of the Segmentview changes, read
Do_segmentview_1.on ("Indexchanged", function (index) {
if (index = = this.index) {
Return
}
Do_slideview_1.set ({index:index});
Do_slideview_1.refreshitems ({});
ChangeColor (index);
});
/***********************************************************/
Slideview binding Data
Slide_listdata.adddata ([
{template:0},
{template:1},
{Template:2}
]);
Do_slideview_1.refreshitems ();
/***********************************************************/
When the index of the Slideview changes, read
Do_slideview_1.on ("Indexchanged", function (index) {
Do_segmentview_1.set ({index:index});
ChangeColor (index);

}); [/mw_shl_code]Refresh up/down:[Mw_shl_code=javascript,true]listview.on ("Pull", function (data) {

/**
* @ This event will be executed more than once.
* @state = = 0:pull action starts
* @state = = 1:pull Action continued in
* @state = = 2:pull Action Ended
*/
if (data.state!== 2) return;
This.rebound ();
});
Listview.on ("Push", function (data) {
/**
* @ This event will be executed more than once.
* @state = = 0:pull action starts
* @state = = 1:pull Action continued in
* @state = = 2:pull Action Ended
*/
if (data.state!== 2) return;
This.rebound ();
}); [/mw_shl_code]

Add timers to change ads:
Component Do_timer:
Http://bbs.deviceone.net/forum.php?mod=viewthread&tid=135&extra=page%3D3
[Mw_shl_code=javascript,true]var page = SM ("Do_page");
var i=1,y=0;
var Timer01 = mm ("Do_timer");
Timer01.delay = 0;
Timer01.interval = 100;

var DURATION01 = 0;

Timer01.on ("tick", function () {
if (DURATION01 >= 30) {
DURATION01 = 0;
slideview.index=i%4;
i++;
}
duration01++;
});
Timer01.start (); [/mw_shl_code]

9.21 Update:
The top picture of the subscription interface and the bottom logo Click to enter the new interface
The top image is Slideview:
       The UI write-click event in Slideview templates opens a new interface, and then uses the transmitted data to determine the first image;
[Mw_shl_code=javascript,true]app.openpage ({Source: " Source://view/ding/slideview/sli_de.ui ", Data:" 1 ", Animationtype:", Isfullscreen:false, Keyboardmode: "Default", ScriptType: ""}, function (data, E) {}); [/mw_shl_code] The logo underneath the
is Grid_view:
[mw_shl_code=javascript,true] Grid_view1.on ("Touch", function (data, E) {                        //griview Click events
//  & nbsp      nf.alert (_data[data]);
         app.openpage ({source: "Source://view/ding/ding_de.ui", Data:data, Animationtype: "", Isfullscreen:false, Keyboardmode: "Default", ScriptType: ""}, function (data, E) {});
       }); [/mw_shl_code]

Attach the git address again: Https://github.com/do-project/zaker

JavaScript uses Deviceone to develop combat (v) Imitation Zaker applications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.