SlideShare ist ein Scribd-Unternehmen logo
1 von 13
http://www.chocolatechip-ui.com/




       CPSC- 473
Lightning Talks, Round 1
     March 20, 2013
      George Ishak
Agenda
•   About
•   Custom Builds
•   Integration with Android
•   Basic App Shell
•   Tableviews
•   UIButtons
•   Paging Control
•   Selection Lists
•   Expander
About

• Created by Robert Biggs.
• First He created the light weight ChocolateChip JavaScript library for
  mobile Web app development.
• Sun had Java, Apple had Cocoa
• Chocolate is pure pleasure. And this framework is really a pleasure to work
  with and it's really. small ChocolateChip—it's tiny, but delicious.
• Second ChocolateChip-UI( ChUI (pronounced 'Chewy'))
• jQuery and all the extra code that was for supporting browsers that He
  didn't need to support because He was targeting modern mobile devices
  with Webkit browsers
• ChocolateChip-UI consists of two core files: ChUI.css and ChUI.js
• He created his own markup language. It consists of basic tags and
  attributes
• He reproduces those in HTML5, CSS3 and JavaScript. The result was WAML
  (Web App Markup Language).
Custom Builds
• ChocolateChip-UI now includes a build script, build.py, that allows you to
  create customized projects
• You can define a path, a project name, an OS to support, a JavaScript library
• Open the config.py file in the source folder to see what your configuration
  options are
• Download link https://github.com/rbiggs/chocolatechip-ui
• Create first app >
   1. edit Config.py
       • 'path': 'c:/androidprojects/cpsc473/',
       • 'name': 'cpsc473',
       • 'os': 'android',
   2. Run python build.py
Integration with Android
  Create Android Project




Copy the app folder to Android project assets
folder
Integration with Android
The Android platform provides tools for developing web based applications. One of
these tools is the WebViewwidget in the Android.webkit package. The WebView
widget displays web pages and allows the user to interact with web content. This
article describes the features of WebView
widget.(http://developer.samsung.com/android/technical-docs/WebView-in-
Android)

activity_main.xml
    <WebView
       android:id="@+id/webView1"
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:layout_alignParentLeft="true"
       android:layout_alignParentTop="true" />



MainActivity.Java
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

     WebView wv = (WebView) findViewById(R.id.webView1);
     WebSettings webSettings = wv.getSettings();
     wv.loadUrl("file:///android_asset/index2.html");


}
Basic App Shell
<!DOCTYPE html>
<html lang="en">
  <head>
             <meta charset="utf-8">
             <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0,
        user-scalable=no">
             <title>cpsc473</title>
             <link rel="stylesheet" href="chui/chui.android.css">
             <script type="text/javascript" src="libs/jquery-1.8.3.js"></script>
             <script type="text/javascript" src="chui/iscroll.js"></script>
             <script type="text/javascript" src="chui/chui.android.js"></script>
  <body>



           <app>
                   <view id="main" ui-navigation-status="current">
                               <navbar>
                                    <h1>cpsc473</h1>
                               </navbar>
                               <subview ui-associations="withNavBar">
                                    <scrollpanel>
                                        Content will be here
                                    </scrollpanel>
                               </subview>
                   </view>
          </app>




</body>
</html>
Tableviews
•   Tableview are the main artifice by which you output data in your app.
<!DOCTYPE html>
<html lang="en">
  <head>
             <meta charset="utf-8">
             <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0,
             user-scalable=no">
             <title>cpsc473</title>
             <link rel="stylesheet" href="chui/chui.android.css">
             <script type="text/javascript" src="libs/jquery-1.8.3.js"></script>
             <script type="text/javascript" src="chui/iscroll.js"></script>
             <script type="text/javascript" src="chui/chui.android.js"></script>
  <body>
             <app>
                   <view id="main" ui-navigation-status="current">
                            <navbar>
                                <h1>cpsc473</h1>
                            </navbar>
                            <subview ui-associations="withNavBar">
                               <scrollpanel>
<tableview>
      <tablecell href="#Assignment_1" ui-implements="detail-disclosure">
              <img src="icon.png">
               <celltitle>Assignment 1</celltitle>
      </tablecell>
      <tablecell href="#Assignment_2" ui-implements="detail-disclosure">
                <img src="icon.png">
                 <celltitle>Assignment 2</celltitle>
      </tablecell>
</tableview>



                          </scrollpanel>
                   </subview>
             </view>
         </app>
    </body>
</html>
UIButtons
ChocolateChip-UI provides a number of different types of uibuttons
Example:
     <app>
        <view id="main" ui-navigation-status="current">
             <navbar>
                 <!--UIButton Placement in Navbars and Toolbars -->
                 <uibutton ui-implements="next" ui-bar-align="right">
                     <label>Next</label>
                 </uibutton>



                  <h1>cpsc473</h1>
               </navbar>
                 <subview ui-associations="withNavBar">
                     <scrollpanel>
         <!-- Navigation UIButtons: Back-->
         <uibutton ui-implements="back">
              <label>Back</label>
         </uibutton>

         <!--UIButton with Icon and Label-->
         <uibutton ui-icon-align="right" ui-bar-align="right">
             <icon style="background-image: url(icons/android.png);"></icon>
             <label>Android</label>
         </uibutton>

        <!-- Action UIButton-->
        <uibutton ui-kind="action" >
              <label>Save</label>
        </uibutton>



                  </scrollpanel>
              </subview>
           </view>
        </app>
Paging Control
ChocolateChip-UI offers the pager control as a way to provide horizontal swipe
navigation through a set of panels.
<subview ui-associations="withNavBar">
         <scrollpanel>

          <stack ui-implements="paging">
           <panel>
             <stack>

              <panel>
                <h4>Spring 2013 Syllabus</h4>
                <p>Prerequisites: CPSC 332 - File Structures and Database
                 Systems.</p>
              </panel>

              <panel>
                 <h4>Instructor</h4>
                 <ul>
                    <li>Kenytt D. Avery, M.S.</li>
                    <li>Office: CS-542</li>
                     <li>Office Hours: Wednesday, 6-7pm, most
                    evenings after class, and by appointment</li>
                 </u>
               </panel>
             </stack>
            </panel>
           </stack>


        </scrollpanel>
      </subview>
Selection Lists
Selection lists provide a way for present users with a group of possible selections
only one of which can be selected at any given time. This is functionally equivalent
to the groups of radio buttons in forms found on many Web sites


<tableview ui-kind=grouped id="activityChoices" ui-
     implements="selection-list">
  <tableheader>
     What is the best Python web app framework?
  </tableheader>

  <tablecell ui-value="0">
     <celltitle>Google App Engine</celltitle>
  </tablecell>

  <tablecell ui-value="1">
     <celltitle>Django</celltitle>
  </tablecell>

 <tablecell ui-value="2">
    <celltitle>Bottle</celltitle>
 </tablecell>

</tableview>
Expander
ChocolateChip provides the expander as a way to allow collapsing and expanding a
vertical section of an app.
<script>
$(function() {
    var opts = {
       status: "collapsed",
       title: "Show",
       altTitle: "Hide"
    };
    $("expander").UIExpander(opts);
});
</script>
Homework Assignments
           <expander>
               <panel>
                   <tableview ui-kind="grouped">

                 <tablecell>
                     <celltitle>Assignment 1</celltitle>
                 </tablecell>

                 <tablecell>
                    <celltitle>Assignment 2</celltitle>
                 </tablecell>

                 <tablecell>
                    <celltitle>Assignment 3</celltitle>
                </tablecell>

             </tableview>
         </panel>
       </expander>
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to backbone presentation
Introduction to backbone presentationIntroduction to backbone presentation
Introduction to backbone presentationBrian Hogg
 
jQuery Mobile and JavaScript
jQuery Mobile and JavaScriptjQuery Mobile and JavaScript
jQuery Mobile and JavaScriptGary Yeh
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular jscodeandyou forums
 
Desenvolvimento web com Ruby on Rails (parte 6)
Desenvolvimento web com Ruby on Rails (parte 6)Desenvolvimento web com Ruby on Rails (parte 6)
Desenvolvimento web com Ruby on Rails (parte 6)Joao Lucas Santana
 
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoYou're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoChris Scott
 
Bootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF ReferenceBootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF ReferenceBootstrap Creative
 
Quick Intro to JQuery and JQuery Mobile
Quick Intro to JQuery and JQuery MobileQuick Intro to JQuery and JQuery Mobile
Quick Intro to JQuery and JQuery MobileJussi Pohjolainen
 
ui-router and $state
ui-router and $stateui-router and $state
ui-router and $stategarbles
 
New text documentfsdfs
New text documentfsdfsNew text documentfsdfs
New text documentfsdfsAh Lom
 
Ruby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxRuby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxWen-Tien Chang
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Joao Lucas Santana
 
Angular JS Routing
Angular JS RoutingAngular JS Routing
Angular JS Routingkennystoltz
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Steps to create image carousel by using angularjs
Steps to create image carousel by using angularjsSteps to create image carousel by using angularjs
Steps to create image carousel by using angularjsManikandan Keerthivasan
 

Was ist angesagt? (20)

Introduction to backbone presentation
Introduction to backbone presentationIntroduction to backbone presentation
Introduction to backbone presentation
 
jQuery Mobile and JavaScript
jQuery Mobile and JavaScriptjQuery Mobile and JavaScript
jQuery Mobile and JavaScript
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular js
 
YUI on the go
YUI on the goYUI on the go
YUI on the go
 
Desenvolvimento web com Ruby on Rails (parte 6)
Desenvolvimento web com Ruby on Rails (parte 6)Desenvolvimento web com Ruby on Rails (parte 6)
Desenvolvimento web com Ruby on Rails (parte 6)
 
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp OrlandoYou're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Orlando
 
Javascript
JavascriptJavascript
Javascript
 
Bootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF ReferenceBootstrap 3 Cheat Sheet PDF Reference
Bootstrap 3 Cheat Sheet PDF Reference
 
Quick Intro to JQuery and JQuery Mobile
Quick Intro to JQuery and JQuery MobileQuick Intro to JQuery and JQuery Mobile
Quick Intro to JQuery and JQuery Mobile
 
ui-router and $state
ui-router and $stateui-router and $state
ui-router and $state
 
New text documentfsdfs
New text documentfsdfsNew text documentfsdfs
New text documentfsdfs
 
Ruby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxRuby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 Ajax
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
 
Angular JS Routing
Angular JS RoutingAngular JS Routing
Angular JS Routing
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
AspNetWhitePaper
AspNetWhitePaperAspNetWhitePaper
AspNetWhitePaper
 
Steps to create image carousel by using angularjs
Steps to create image carousel by using angularjsSteps to create image carousel by using angularjs
Steps to create image carousel by using angularjs
 
UI-Router
UI-RouterUI-Router
UI-Router
 
2. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)3
2. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)32. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)3
2. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)3
 

Ähnlich wie ChocolateChip-UI

Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.Amar Shukla
 
multiple views and routing
multiple views and routingmultiple views and routing
multiple views and routingBrajesh Yadav
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoRob Bontekoe
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 
Once Source to Rule Them All
Once Source to Rule Them AllOnce Source to Rule Them All
Once Source to Rule Them AllDavid Yeiser
 
Creating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web ComponentsCreating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web ComponentsRachael L Moore
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2James Pearce
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSbuttyx
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-finalDavid Lapsley
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJSBrajesh Yadav
 
Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Rakesh Jha
 
intro to Angular js
intro to Angular jsintro to Angular js
intro to Angular jsBrian Atkins
 
Enjoy the vue.js
Enjoy the vue.jsEnjoy the vue.js
Enjoy the vue.jsTechExeter
 
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using BootstrapStop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using Bootstrapfreshlybakedpixels
 
BPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced WorkflowsBPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced WorkflowsAlfresco Software
 

Ähnlich wie ChocolateChip-UI (20)

iWebkit
iWebkitiWebkit
iWebkit
 
Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.
 
multiple views and routing
multiple views and routingmultiple views and routing
multiple views and routing
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Once Source to Rule Them All
Once Source to Rule Them AllOnce Source to Rule Them All
Once Source to Rule Them All
 
Creating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web ComponentsCreating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web Components
 
jQuery
jQueryjQuery
jQuery
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJS
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJS
 
Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap
 
intro to Angular js
intro to Angular jsintro to Angular js
intro to Angular js
 
Enjoy the vue.js
Enjoy the vue.jsEnjoy the vue.js
Enjoy the vue.js
 
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using BootstrapStop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
 
BPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced WorkflowsBPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced Workflows
 

Kürzlich hochgeladen

SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 

Kürzlich hochgeladen (20)

SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

ChocolateChip-UI

  • 1. http://www.chocolatechip-ui.com/ CPSC- 473 Lightning Talks, Round 1 March 20, 2013 George Ishak
  • 2. Agenda • About • Custom Builds • Integration with Android • Basic App Shell • Tableviews • UIButtons • Paging Control • Selection Lists • Expander
  • 3. About • Created by Robert Biggs. • First He created the light weight ChocolateChip JavaScript library for mobile Web app development. • Sun had Java, Apple had Cocoa • Chocolate is pure pleasure. And this framework is really a pleasure to work with and it's really. small ChocolateChip—it's tiny, but delicious. • Second ChocolateChip-UI( ChUI (pronounced 'Chewy')) • jQuery and all the extra code that was for supporting browsers that He didn't need to support because He was targeting modern mobile devices with Webkit browsers • ChocolateChip-UI consists of two core files: ChUI.css and ChUI.js • He created his own markup language. It consists of basic tags and attributes • He reproduces those in HTML5, CSS3 and JavaScript. The result was WAML (Web App Markup Language).
  • 4. Custom Builds • ChocolateChip-UI now includes a build script, build.py, that allows you to create customized projects • You can define a path, a project name, an OS to support, a JavaScript library • Open the config.py file in the source folder to see what your configuration options are • Download link https://github.com/rbiggs/chocolatechip-ui • Create first app > 1. edit Config.py • 'path': 'c:/androidprojects/cpsc473/', • 'name': 'cpsc473', • 'os': 'android', 2. Run python build.py
  • 5. Integration with Android Create Android Project Copy the app folder to Android project assets folder
  • 6. Integration with Android The Android platform provides tools for developing web based applications. One of these tools is the WebViewwidget in the Android.webkit package. The WebView widget displays web pages and allows the user to interact with web content. This article describes the features of WebView widget.(http://developer.samsung.com/android/technical-docs/WebView-in- Android) activity_main.xml <WebView android:id="@+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" /> MainActivity.Java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView wv = (WebView) findViewById(R.id.webView1); WebSettings webSettings = wv.getSettings(); wv.loadUrl("file:///android_asset/index2.html"); }
  • 7. Basic App Shell <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>cpsc473</title> <link rel="stylesheet" href="chui/chui.android.css"> <script type="text/javascript" src="libs/jquery-1.8.3.js"></script> <script type="text/javascript" src="chui/iscroll.js"></script> <script type="text/javascript" src="chui/chui.android.js"></script> <body> <app> <view id="main" ui-navigation-status="current"> <navbar> <h1>cpsc473</h1> </navbar> <subview ui-associations="withNavBar"> <scrollpanel> Content will be here </scrollpanel> </subview> </view> </app> </body> </html>
  • 8. Tableviews • Tableview are the main artifice by which you output data in your app. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>cpsc473</title> <link rel="stylesheet" href="chui/chui.android.css"> <script type="text/javascript" src="libs/jquery-1.8.3.js"></script> <script type="text/javascript" src="chui/iscroll.js"></script> <script type="text/javascript" src="chui/chui.android.js"></script> <body> <app> <view id="main" ui-navigation-status="current"> <navbar> <h1>cpsc473</h1> </navbar> <subview ui-associations="withNavBar"> <scrollpanel> <tableview> <tablecell href="#Assignment_1" ui-implements="detail-disclosure"> <img src="icon.png"> <celltitle>Assignment 1</celltitle> </tablecell> <tablecell href="#Assignment_2" ui-implements="detail-disclosure"> <img src="icon.png"> <celltitle>Assignment 2</celltitle> </tablecell> </tableview> </scrollpanel> </subview> </view> </app> </body> </html>
  • 9. UIButtons ChocolateChip-UI provides a number of different types of uibuttons Example: <app> <view id="main" ui-navigation-status="current"> <navbar> <!--UIButton Placement in Navbars and Toolbars --> <uibutton ui-implements="next" ui-bar-align="right"> <label>Next</label> </uibutton> <h1>cpsc473</h1> </navbar> <subview ui-associations="withNavBar"> <scrollpanel> <!-- Navigation UIButtons: Back--> <uibutton ui-implements="back"> <label>Back</label> </uibutton> <!--UIButton with Icon and Label--> <uibutton ui-icon-align="right" ui-bar-align="right"> <icon style="background-image: url(icons/android.png);"></icon> <label>Android</label> </uibutton> <!-- Action UIButton--> <uibutton ui-kind="action" > <label>Save</label> </uibutton> </scrollpanel> </subview> </view> </app>
  • 10. Paging Control ChocolateChip-UI offers the pager control as a way to provide horizontal swipe navigation through a set of panels. <subview ui-associations="withNavBar"> <scrollpanel> <stack ui-implements="paging"> <panel> <stack> <panel> <h4>Spring 2013 Syllabus</h4> <p>Prerequisites: CPSC 332 - File Structures and Database Systems.</p> </panel> <panel> <h4>Instructor</h4> <ul> <li>Kenytt D. Avery, M.S.</li> <li>Office: CS-542</li> <li>Office Hours: Wednesday, 6-7pm, most evenings after class, and by appointment</li> </u> </panel> </stack> </panel> </stack> </scrollpanel> </subview>
  • 11. Selection Lists Selection lists provide a way for present users with a group of possible selections only one of which can be selected at any given time. This is functionally equivalent to the groups of radio buttons in forms found on many Web sites <tableview ui-kind=grouped id="activityChoices" ui- implements="selection-list"> <tableheader> What is the best Python web app framework? </tableheader> <tablecell ui-value="0"> <celltitle>Google App Engine</celltitle> </tablecell> <tablecell ui-value="1"> <celltitle>Django</celltitle> </tablecell> <tablecell ui-value="2"> <celltitle>Bottle</celltitle> </tablecell> </tableview>
  • 12. Expander ChocolateChip provides the expander as a way to allow collapsing and expanding a vertical section of an app. <script> $(function() { var opts = { status: "collapsed", title: "Show", altTitle: "Hide" }; $("expander").UIExpander(opts); }); </script> Homework Assignments <expander> <panel> <tableview ui-kind="grouped"> <tablecell> <celltitle>Assignment 1</celltitle> </tablecell> <tablecell> <celltitle>Assignment 2</celltitle> </tablecell> <tablecell> <celltitle>Assignment 3</celltitle> </tablecell> </tableview> </panel> </expander>