SlideShare uma empresa Scribd logo
1 de 48
Baixar para ler offline
AppInventor(5)
講師:王瑋毅
AppInventor-紫外線強度查詢
介紹
• 利用氣象局開放資料,資料為JSON格式,實作一個可選擇縣市並
顯示選擇的縣市紫外線指數。
• JSON:
http://opendata.epa.gov.tw/ws/Data/UV/?$orderby=PublishAgency&
$skip=0&$top=1000&format=json
設置按鈕元件並設定文字
設置列表選擇器並設定文字
設置顯示標籤並設定屬性
設置網頁
宣告一個全域變數SourceJson
設置取得Web1的文字事件
設置Url解析Json的文字存在SourceJson
利用迴圈取得資料
宣告一個全域變數PlaceJson
取出SiteName的值存在PlaceJson
取出UVI的值存在PlaceJson
將PlaceJson資料放到ListPicker
將ListPicker設為True
設置按鈕按下取得資料並顯示ListPicker
宣告一個全域變數ShowUVI
設置LisPicker選擇後的事件
ListPicker選擇的資料存到ShowUVI
設置Key和UVI初始值
利用迴圈取得選擇的資料
設置取得的Key
判斷取得的Key等於UVI
判斷是就取得UVI的值
設置顯示地方名稱和UVI
執行結果
1
2
AppInventor-BMI2
介紹
• BMI2是一個可以測試身體BMI,並告知你落於哪個標準。
• 設計一個程式,輸入完身高和體重後,會自行計算BMI,接著判
斷出位在哪個區間中,藉此告知分級標準。
• 利用BMI1為基礎往下繼續做。
設置標準範圍標籤及屬性
宣告全域變數bmi為0
設置bmi變數取代標籤1
設置標籤1取得bmi變數
設置if-then來判斷區間
設置判斷式小於
設置判斷式之bmi小於18.5
設置標籤2顯示標準
執行目前結果
練習
• 利用and判斷,將剩下的分級標準完成。
設置判斷兩個式子的元件
設置兩個判斷式子
設置bmi在18.5和24之間
設置標籤2顯示正常範圍
設置bmi過重24到27的條件和標籤2
設置bmi輕度肥胖27到30的條件和標籤2
設置bmi中度肥胖30到35的條件和標籤2
設置bmi重度肥胖≥35的條件和標籤2
執行結果

Mais conteúdo relacionado

Mais procurados

Mobile application testing report
Mobile application testing reportMobile application testing report
Mobile application testing report
QA Madness
 

Mais procurados (20)

Introduction to Firebase with Android and Beyond...
Introduction to Firebase with Android and Beyond...Introduction to Firebase with Android and Beyond...
Introduction to Firebase with Android and Beyond...
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
 
Mobile application testing report
Mobile application testing reportMobile application testing report
Mobile application testing report
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TV
 
오픈소스 GIS 개요
오픈소스 GIS 개요오픈소스 GIS 개요
오픈소스 GIS 개요
 
Quantum QIS (QGIS) Düzenle Menüsü
Quantum QIS (QGIS) Düzenle MenüsüQuantum QIS (QGIS) Düzenle Menüsü
Quantum QIS (QGIS) Düzenle Menüsü
 
QGIS를 활용한 공간분석 입문(1일 6시간)
QGIS를 활용한 공간분석 입문(1일 6시간)QGIS를 활용한 공간분석 입문(1일 6시간)
QGIS를 활용한 공간분석 입문(1일 6시간)
 
Introducing firebase
Introducing firebaseIntroducing firebase
Introducing firebase
 
[LetSwift 2023] 객체지향-함수형 아키텍처 직접 만들기
[LetSwift 2023] 객체지향-함수형 아키텍처 직접 만들기[LetSwift 2023] 객체지향-함수형 아키텍처 직접 만들기
[LetSwift 2023] 객체지향-함수형 아키텍처 직접 만들기
 
오픈소스GIS 개발 일반 강의자료
오픈소스GIS 개발 일반 강의자료오픈소스GIS 개발 일반 강의자료
오픈소스GIS 개발 일반 강의자료
 
React Native Firebase
React Native FirebaseReact Native Firebase
React Native Firebase
 
Publishing and delivery of mobile application ios
Publishing and delivery of mobile application   iosPublishing and delivery of mobile application   ios
Publishing and delivery of mobile application ios
 
Publishing and delivery of mobile application
Publishing and delivery of mobile applicationPublishing and delivery of mobile application
Publishing and delivery of mobile application
 
RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019RxJS & Angular Reactive Forms @ Codemotion 2019
RxJS & Angular Reactive Forms @ Codemotion 2019
 
게임엔진과 공간정보 3D 콘텐츠 융합 : Cesium for Unreal
게임엔진과 공간정보 3D 콘텐츠 융합 : Cesium for Unreal게임엔진과 공간정보 3D 콘텐츠 융합 : Cesium for Unreal
게임엔진과 공간정보 3D 콘텐츠 융합 : Cesium for Unreal
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
웹 프로그래밍 팀프로젝트 최종발표
웹 프로그래밍 팀프로젝트 최종발표웹 프로그래밍 팀프로젝트 최종발표
웹 프로그래밍 팀프로젝트 최종발표
 
안드로이드 윈도우 마스터 되기
안드로이드 윈도우 마스터 되기안드로이드 윈도우 마스터 되기
안드로이드 윈도우 마스터 되기
 
R 프로그래밍을 이용한 야생동물 행동권(HR) 분석
R 프로그래밍을 이용한 야생동물 행동권(HR) 분석R 프로그래밍을 이용한 야생동물 행동권(HR) 분석
R 프로그래밍을 이용한 야생동물 행동권(HR) 분석
 
[Let's Swift 2019] iOS 앱에서 머신러닝이 해결 할 수 있는 문제들
[Let's Swift 2019] iOS 앱에서 머신러닝이 해결 할 수 있는 문제들[Let's Swift 2019] iOS 앱에서 머신러닝이 해결 할 수 있는 문제들
[Let's Swift 2019] iOS 앱에서 머신러닝이 해결 할 수 있는 문제들
 

Mais de Roy Wang (10)

Android程式設計(7)
Android程式設計(7)Android程式設計(7)
Android程式設計(7)
 
Android程式設計(6)
Android程式設計(6)Android程式設計(6)
Android程式設計(6)
 
Android 程式設計(5)
Android 程式設計(5)Android 程式設計(5)
Android 程式設計(5)
 
Android 程式設計(4)
Android 程式設計(4)Android 程式設計(4)
Android 程式設計(4)
 
Android 程式設計(3)
Android 程式設計(3)Android 程式設計(3)
Android 程式設計(3)
 
Android 程式設計(2)
Android 程式設計(2)Android 程式設計(2)
Android 程式設計(2)
 
Android 程式設計(1)
Android 程式設計(1)Android 程式設計(1)
Android 程式設計(1)
 
App inventor 4
App inventor 4App inventor 4
App inventor 4
 
App inventor 2
App inventor 2App inventor 2
App inventor 2
 
App inventor 1
App inventor 1App inventor 1
App inventor 1
 

App inventor 5