Example #1
0
<?php

$win = new SDPanel();
$win->setCaption("Add Budget");
$token = new InputText(80);
$table = new Table();
$table->setRowsStyle("100%");
$table->setWidth("100%");
$table->setHeight("100%");
$table->setClass("table.white");
$table_form = new Table();
$table_form->setRowsStyle("76dip;76dip");
$table_form->setClass("table.forms");
$money_value = new InputNumeric(15);
$money_value->setClass("input.form");
$input_date = new InputDate();
$input_date->setClass("input.form");
$button = new Button();
$button->setCaption("Confirm");
$button->onTap(confirm());
$button->setClass("button.blue");
$table_form->addControl($money_value, 1, 1, 1, 1, "Center", "Middle");
$table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle");
$table_button = new Table();
$table_button->addControl($button, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function confirm()
{
    $token = StorageAPI::Get("token");
Example #2
0
$label_income->setCaption("Income");
$label_income->setClass("label.black");
$input_income = new InputNumeric(11);
$input_income->setReadOnly(true);
$input_income->setClass("label.black");
$label_green = new Label();
$label_green->setClass("label.income");
$table_income = new Table();
$table_income->setColumnsStyle("5dip;50%;50%");
$table_income->addControl($label_green, 1, 1, 1, 1, "", "Middle");
$table_income->addControl($label_income, 1, 2, 1, 1, "Center", "Middle");
$table_income->addControl($input_income, 1, 3, 1, 1, "Right", "Middle");
$label_outcome = new Label();
$label_outcome->setCaption("Outcome");
$label_outcome->setClass("label.black");
$input_outcome = new InputNumeric(11);
$input_outcome->setReadOnly(true);
$input_outcome->setClass("label.black");
$label_red = new Label();
$label_red->setClass("label.outcome");
$table_outcome = new Table();
$table_outcome->setColumnsStyle("5dip;50%;50%");
$table_outcome->addControl($label_red, 1, 1, 1, 1, "", "Middle");
$table_outcome->addControl($label_outcome, 1, 2, 1, 1, "Center", "Middle");
$table_outcome->addControl($input_outcome, 1, 3, 1, 1, "Right", "Middle");
$table_second = new Table();
$table_second->setWidth("100%");
$table_second->setHeight("40%");
$table_second->setClass("table.first");
$img_add = new Image();
$img_add->setImage("img/Android/hdpi/plus_circle.png");
Example #3
0
<?php

/***
 * 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
$btn_cancel->onTap(delete());
$acb->addControl($btn_update);
$acb->addControl($btn_cancel);
$win->addControl($acb);
$mainTable = new Table();
$mainTable->setRowsStyle("100%");
$mainTable->setWidth("100%");
$mainTable->setHeight("100%");
$mainTable->setClass("table.white");
$table = new Table();
$table->setRowsStyle("76dip;76dip;76dip;76dip;76dip");
$table->setClass("table.forms");
$move_type = new InputText();
$move_type->setClass("input.form");
$move_type->setReadOnly(true);
$value = new InputNumeric(10);
$value->setClass("input.form");
$date = new InputDate();
$date->setClass("input.form");
$description = new InputText();
$description->setClass("input.form");
$dc_cat = new DynamicComboBox();
$dc_cat->setValues(load_cat());
$dc_cat->setAddEmptyItem(false);
$dc_cat->setClass("input.form");
$label_type = new Label();
$label_type->setCaption("Move type:");
$label_type->setClass("label.black");
$label_value = new Label();
$label_value->setCaption("Value:");
$label_value->setClass("label.black");
Example #5
0
function openDoneList()
{
    $period = new InputNumeric();
    $period->setValue(0);
    $statusList = new InputNumeric();
    $statusList->setValue(3);
    $win->Open("DoneList", $period, $statusList);
}
Example #6
0
<?php

/***
 * Task add screen
 */
$win = new SDPanel();
$win->setCaption("Add Task");
//Items definition
$id = new InputNumeric();
$id->setClass("input.Common");
$name = new InputText();
$name->setInviteMessage("Task name");
$name->setClass("input.Common");
$description = new InputText();
$description->setInviteMessage("Description");
$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();
$table_form->setClass("table.Form");
$table_form->setRowsStyle("65dip;65dip;120dip;55dip");
$table_form->setHeight("90%");
$table_form->addControl($name, 1, 1, 1, 2);
$table_form->addControl($date, 2, 1, 1, 2);
Example #7
0
$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");
$price = new InputNumeric(12, 4);
$price->setClass("inputtextTitlewhite");
$price->setLabelPosition("Left");
$price->setLabelCaption("X \$");
$table_desc = new Table();
$table_desc->setColumnsStyle("5%;5%;90%");
$table_desc->addControl($name, 1, 1, 1, 4, "Left", "Top");
$table_desc->addControl($qty, 2, 1, 1, 1, "Left", "Top");
$table_desc->addControl($price, 2, 2, 1, 2, "Left", "Top");
$table_list = new Table();
$table_list->setColumnsStyle("95dip;100%");
$table_list->addControl($image, 1, 1);
$table_list->addControl($table_desc, 1, 2);
$table_list->onLongTap(removeProduct());
//$table_list->onTap(view_image());
$list->addControl($table_list, 1, 1);
Example #8
0
<?php

$win = new SDPanel();
$win->setCaption("Balance");
$token = new InputText(80);
$maintable = new Table();
$maintable->setRowsStyle("100%");
$maintable->setWidth("100%");
$maintable->setHeight("100%");
$input = new InputNumeric(11);
$input->setClass("label.black");
$input->setReadOnly(true);
$label = new Label();
$label->setCaption("Total balance:");
$label->setClass("label.black");
$table = new Table();
$table->setRowsStyle("100%");
$table->setWidth("100%");
$table->setHeight("65%");
$table->setClass("table.account");
$table->addControl($label, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($input, 1, 2, 1, 1, "Center", "Middle");
$maintable->addControl($table, 1, 1);
$win->addControl($maintable);
function clientStart()
{
    $token = StorageAPI::Get("token");
    $url = "http://demo.kikapptools.com/Gastos/crud/getAccount.php";
    $httpClient = new httpClient();
    $httpClient->addVariable("id", $token);
    $result = $httpClient->Execute('POST', $url);