コード例 #1
0
ファイル: UserData.php プロジェクト: KikAppTools/KikAppDemos
$last_name = new InputText();
$last_name->setClass("inputForm");
$email = new InputEmail();
$email->setClass("inputForm");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($name, 1, 1);
$table_form->addControl($last_name, 2, 1);
$table_form->addControl($email, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
$win->Render();
function refresh()
{
    $ur = "http://www.demo.kikapptools.com/magento/apiKikApp/api.php?metodo=userData&customerToken=" . $token;
    $http = new httpClient();
    $result = $http->Execute('GET', $ur);
    $sdtUser = array("firstname" => DataType::Character(35), "lastname" => DataType::Character(50), "email" => DataType::Email());
    Data::FromJson($sdtUser, $result);
    //Asignamos valores a los inputs.
    $name = $sdtUser['firstname'];
    $last_name = $sdtUser['lastname'];
    $email = $sdtUser['email'];
}
function save()
{
コード例 #2
0
ファイル: main.php プロジェクト: KikAppTools/KikAppExamples
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$mainTable->setRowsStyle("300dip");
$video = new InputVideo();
$video->setReadOnly(true);
$mainTable->addControl($video, 1, 1);
$win->addControl($mainTable);
function clientStart()
{
    $video->setValue("https://www.youtube.com/watch?v=anywfG-X2b8");
}
コード例 #3
0
 * Task detail screen
 */
$win = new SDPanel();
$win->setCaption("Task Detail");
//Get var sent from main screen
$id = new InputNumeric();
$id->setClass("input.Common");
Data::getParm($id);
//Define the acrtion bar
$bar = new ActionBar();
$btn_delete = new ButtonBar();
$btn_delete->setCaption("Delete");
$btn_delete->onTap(removeTask());
$btn_delete->setImage("img/deleteBar.png");
$bar->addControl($btn_delete);
$win->addControl($bar);
//Items definition
$name = new InputText();
$name->setClass("input.Common");
$description = new InputText();
$description->setClass("input.Common");
$date = new InputDate();
$date->setLabelCaption("Task date");
$date->setClass("input.Common");
$addToCalendar = new InputBoolean();
$addToCalendar->setLabelCaption("Add to my calendar");
$addToCalendar->setLabelPosition("Right");
//Main table definition
$table = new Table();
$table->setClass("table.Background");
$table_form = new Table();
コード例 #4
0
 * @version 1.0
 */
$win = new SDPanel();
$id = new InputNumeric();
Data::getParm($id);
//Action bar and buttons bar
$acb = new ActionBar();
$btn_update = new ButtonBar();
$btn_update->setCaption("Update");
$btn_update->onTap(update());
$btn_delete = new ButtonBar();
$btn_delete->setCaption("Delete");
$btn_delete->onTap(delete());
$acb->addControl($btn_update);
$acb->addControl($btn_delete);
$win->addControl($acb);
$mainTable = new Table();
$mainTable->setEnableHeaderRowPattern(true);
$mainTable->setHeaderRowApplicationBarsClass("applicationBars.transparent");
$mainTable->setRowsStyle("150dip;pd");
$tableImg = new Table();
$tableImg->setClass("table.image");
$tableImg->setRowsStyle("pd;150dip;pd");
$image = new InputImage();
$image->setReadOnly(true);
$image->setClass("image.roundBorder");
$name = new InputText();
$name->setReadOnly(true);
$name->setClass("input.title");
$address = new InputAddress();
$address->setReadOnly(true);
コード例 #5
0
ファイル: main.php プロジェクト: KikAppTools/KikAppExamples
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("ActionBar");
$table = new Table();
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$actionGroup = new ActionGroup();
$actionGroup->setCaption("");
$actionGroup->setImage("img/ico_thumb.png");
$buttonBar = new ButtonBar();
$buttonBar->setCaption("Button 1");
$buttonBar->setImage("img/ico_thumb.png");
$buttonBar->onTap(functonClick());
$buttonBar_2 = new ButtonBar();
$buttonBar_2->setCaption("Button 2");
$buttonBar_2->setImage("img/ico_thumb.png");
$buttonBar_2->onTap(functonClick_2());
$actionGroup->addControl($buttonBar);
$actionGroup->addControl($buttonBar_2);
$actionBar->addControl($actionGroup);
$win->addControl($actionBar);
$win->addControl($table);
function functonClick()
{
    echo "On click button 1!";
}
function functonClick_2()
{
    echo "On click button 2!";
}
コード例 #6
0
ファイル: main.php プロジェクト: KikAppTools/KikAppExamples
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Image control");
$tabMain = new Table();
$img_arrow = new Image();
$img_arrow->setImage("img/Android/hdpi/appicon.png");
$tabMain->addControl($img_arrow, 1, 1);
$win->addControl($tabMain);
コード例 #7
0
$btn_tw->onTap(twitter());
$btn_sms = new ButtonBar();
$btn_sms->setCaption("SMS");
$btn_sms->setImage("img/ic_sms.png");
$btn_sms->onTap(sms());
$btn_email = new ButtonBar();
$btn_email->setCaption("EMail");
$btn_email->setImage("img/ic_email.png");
$btn_email->onTap(email());
$acg1->addControl($btn_facebook);
$acg1->addControl($btn_tw);
$acg1->addControl($btn_sms);
$acg1->addControl($btn_email);
$apb1->addControl($acg1);
//Add action bar to a SDPanel.
$win->addControl($apb1);
$tableItemDetail = new Table();
$tableItemDetail->setClass("table.TableDetailMain");
$title = new InputText(150);
$title->setClass("inputtitleblack");
$title->setAutoGrow(true);
$title->setReadOnly(true);
$desc = new InputText(300);
$desc->setClass("attributeTextGray");
$desc->setReadOnly(true);
$desc->setAutoGrow(true);
$price = new InputText(10);
$price->setClass("inputTextPrice");
$price->setReadOnly(true);
$stock = new InputText();
$stock->setClass("input.textStock");
コード例 #8
0
ファイル: main.php プロジェクト: KikAppTools/KikAppExamples
<?php

/**
 * Action Bar control example.
 * mainActionBar.php
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$tabMain = new Table();
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$win->addControl($actionBar);
$win->addControl($tabMain);
コード例 #9
0
<?php

/***
 * My shopping cart
 */
$win = new SDPanel();
$win->setCaption("My cart");
$token = new InputText(80);
Data::getParm($token);
$acb = new ActionBar();
$btn_delete = new ButtonBar();
$btn_delete->setCaption("Delete");
$btn_delete->onTap(delete());
$acb->addControl($btn_delete);
$win->addControl($acb);
$table = new Table();
$table->setClass("table.cartMain");
$table->setRowsStyle("93%;160dip");
$list = new Grid();
$list->setEmptyGridBackgroundClass("table.gray");
$list->setEmptyGridText("Your cart is empty");
//$list->setPullToRefresh(true);
$list->addData(load_grid());
//$list->onTap(view_image());
$id = new InputNumeric();
$image = new InputImage();
$image->setClass("image.checkout");
$name = new InputText();
$name->setClass("input.titleProductNameWhite");
$qty = new InputText();
$qty->setClass("inputtextTitlewhite");
コード例 #10
0
ファイル: main.php プロジェクト: KikAppTools/KikAppExamples
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Tabs!");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$tab = new Tab();
$tab->setVisible(true);
//$tab-> setClass("tab");
$item1 = new TabItem();
$item1->setCaption("Tab 1");
$item2 = new TabItem();
$item2->setCaption("Tab2 2");
$tableItem1 = new Table();
$tableItem2 = new Table();
$label1 = new Label();
$label1->setCaption("Label Tab 1");
$label2 = new Label();
$label2->setCaption("Label Tab 2");
$tableItem1->addControl($label1, 1, 1);
$tableItem2->addControl($label2, 1, 1);
$item1->addControl($tableItem1);
$item2->addControl($tableItem2);
$tab->addTab($item1);
$tab->addTab($item2);
$mainTable->addControl($tab);
$win->addControl($actionBar);
$win->addControl($mainTable);
コード例 #11
0
/***
 * Thumbnails products list.
 */
$win = new SDPanel();
$win->setCaption("List of products");
$cat = new InputNumeric();
Data::getParm($cat);
//Action Bar y Action Group.
$apb1 = new ActionBar();
$btn_img = new ButtonBar();
$btn_img->setCaption("List");
$btn_img->setImage("img/ic_list_white.png");
$btn_img->onTap(lista());
$apb1->addControl($btn_img);
$win->addControl($apb1);
$table = new Table();
$table->setClass("tableGray");
$grid = new Grid();
$table_grid = new Canvas();
$table_grid->setClass("tableTableDetailMain");
$grid->addSearch($title);
$grid->addData(grid_load());
$grid->onTap(action());
$grid->setEmptyGridText("No items available");
//inputs and controls
$title = new InputText(150);
$title->setClass("inputtextTitlewhite");
$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("imageImageList");