SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

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
 
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
Jussi Pohjolainen
 
New text documentfsdfs
New text documentfsdfsNew text documentfsdfs
New text documentfsdfs
Ah Lom
 
Ruby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 AjaxRuby on Rails : RESTful 和 Ajax
Ruby on Rails : RESTful 和 Ajax
Wen-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
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 

What's hot (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
 

Similar to ChocolateChip-UI

multiple views and routing
multiple views and routingmultiple views and routing
multiple views and routing
Brajesh Yadav
 
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
James Pearce
 

Similar to 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
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.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
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
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...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.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>