SlideShare une entreprise Scribd logo
1  sur  12
インテリジェントシステム
第2回
Android の主要機能
• 画面の設計
• アプリケーションの状態遷移
Android におけるアプリケーシ
ョン
• 複数ファイルを用いて定義
– s rc
• クラス定義
– res
• リソース
– assets
• 画像や音声などの元データ
– AndroidManifest.xml ファイルで要素を一つにまとめ
る
• 必ず Activity クラスを含む
– アプリケーションの状態遷移を司る
Eclipse の画面を見てみると
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lecture_android.android2"
android:versionCode="1"
android:versionName="1.0.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Sample2"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
AndroidManifest.xml
“ ”@ 他のファイル(ここではリソースファイル)に
定義がある
Activity の
クラス名
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Sample2</string>
<string name="app_name">Sample2</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Sample2</string>
<string name="app_name"> サンプル 2</string>
</resources>
リソースファイルの働き
(values.strings.xml)
クイズ
なぜこんなことをするのか??
import android.app.Activity;
import android.os.Bundle;
public class Sample2 extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle avedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
最も単純な Activity
リソースファイル
から作られる
画面定義
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
mlns:android="http://schemas.android.com/apk/res/a
ndroid"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>
リソースファイル ( main.xml)
文字の属性を変える
• 色
• 大きさ
• フォントの種類
• 配置
• 背景色
等
TextView の色の指定方法
• フォーマット
• 赤 (R) 緑 (G) 青 (B) に 16 進 2 桁( 00 ~ FF )
を使って色を表す。
• A は、透明度を表す。
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello“
android:textColor="#ff0000"
/>

Contenu connexe

En vedette

How effective is the combination between our music
How effective is the combination between our musicHow effective is the combination between our music
How effective is the combination between our music
Arikarin
 
Test flogisteano1
Test flogisteano1Test flogisteano1
Test flogisteano1
opina6767
 
¡Play makes H(e)y!
¡Play makes H(e)y!¡Play makes H(e)y!
¡Play makes H(e)y!
ASYNSIS Architecture + Design
 
三島市運営協議会申請書1
三島市運営協議会申請書1三島市運営協議会申請書1
三島市運営協議会申請書1
frumpy
 
XmlBlackBox English Presentation
XmlBlackBox English PresentationXmlBlackBox English Presentation
XmlBlackBox English Presentation
Alexander Crea
 

En vedette (13)

Hb5 interim hearing march 2016 final
Hb5 interim hearing march 2016 finalHb5 interim hearing march 2016 final
Hb5 interim hearing march 2016 final
 
Modelode curriculumvitaenoelia1
Modelode curriculumvitaenoelia1Modelode curriculumvitaenoelia1
Modelode curriculumvitaenoelia1
 
Landscapes of Love
Landscapes of LoveLandscapes of Love
Landscapes of Love
 
How effective is the combination between our music
How effective is the combination between our musicHow effective is the combination between our music
How effective is the combination between our music
 
Avis de Course Flying Phantom Series Cannes 2016
Avis de Course Flying Phantom Series Cannes  2016Avis de Course Flying Phantom Series Cannes  2016
Avis de Course Flying Phantom Series Cannes 2016
 
Test flogisteano1
Test flogisteano1Test flogisteano1
Test flogisteano1
 
¡Play makes H(e)y!
¡Play makes H(e)y!¡Play makes H(e)y!
¡Play makes H(e)y!
 
Online marketing by Irene Matveeva
Online marketing by Irene MatveevaOnline marketing by Irene Matveeva
Online marketing by Irene Matveeva
 
Asynsis-Constructal @ ARUP 030513
Asynsis-Constructal @ ARUP 030513Asynsis-Constructal @ ARUP 030513
Asynsis-Constructal @ ARUP 030513
 
三島市運営協議会申請書1
三島市運営協議会申請書1三島市運営協議会申請書1
三島市運営協議会申請書1
 
Predictions for 2014 - NetApp CTO Jay Kidd
Predictions for 2014 - NetApp CTO Jay KiddPredictions for 2014 - NetApp CTO Jay Kidd
Predictions for 2014 - NetApp CTO Jay Kidd
 
XmlBlackBox English Presentation
XmlBlackBox English PresentationXmlBlackBox English Presentation
XmlBlackBox English Presentation
 
Ismael Carrasco Fricker - resume
Ismael Carrasco Fricker -  resumeIsmael Carrasco Fricker -  resume
Ismael Carrasco Fricker - resume
 

Similaire à 專訪李光耀

Web1.0のハイブリッドアプリ開発
Web1.0のハイブリッドアプリ開発Web1.0のハイブリッドアプリ開発
Web1.0のハイブリッドアプリ開発
Kenta Tsuji
 
cocos2d-xにおけるBox2Dの利用方法および便利なツール
cocos2d-xにおけるBox2Dの利用方法および便利なツールcocos2d-xにおけるBox2Dの利用方法および便利なツール
cocos2d-xにおけるBox2Dの利用方法および便利なツール
Tomoaki Shimizu
 

Similaire à 專訪李光耀 (20)

初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
 
C#版人狼知能エージェントの作り方~Visual Studio編~(AIWolf.NET 1.0.6版)
C#版人狼知能エージェントの作り方~Visual Studio編~(AIWolf.NET 1.0.6版)C#版人狼知能エージェントの作り方~Visual Studio編~(AIWolf.NET 1.0.6版)
C#版人狼知能エージェントの作り方~Visual Studio編~(AIWolf.NET 1.0.6版)
 
10分で分かるAndroidアプリの作り方[ATGS主催イベント発表資料]
10分で分かるAndroidアプリの作り方[ATGS主催イベント発表資料]10分で分かるAndroidアプリの作り方[ATGS主催イベント発表資料]
10分で分かるAndroidアプリの作り方[ATGS主催イベント発表資料]
 
Android Lecture #01 @PRO&BSC Inc.
Android Lecture #01 @PRO&BSC Inc.Android Lecture #01 @PRO&BSC Inc.
Android Lecture #01 @PRO&BSC Inc.
 
Android Lecture #04 @PRO&BSC Inc.
Android Lecture #04 @PRO&BSC Inc.Android Lecture #04 @PRO&BSC Inc.
Android Lecture #04 @PRO&BSC Inc.
 
Android Wear Apps
Android Wear AppsAndroid Wear Apps
Android Wear Apps
 
TDD勉強会キックオフ for Java
TDD勉強会キックオフ for JavaTDD勉強会キックオフ for Java
TDD勉強会キックオフ for Java
 
Using the Fragments(Android)
Using the Fragments(Android)Using the Fragments(Android)
Using the Fragments(Android)
 
Web1.0のハイブリッドアプリ開発
Web1.0のハイブリッドアプリ開発Web1.0のハイブリッドアプリ開発
Web1.0のハイブリッドアプリ開発
 
Android Studioの魅力
Android Studioの魅力Android Studioの魅力
Android Studioの魅力
 
Scoop!
Scoop!Scoop!
Scoop!
 
Appsody でnodejsのアプリを立ち上げよう!
Appsody でnodejsのアプリを立ち上げよう!Appsody でnodejsのアプリを立ち上げよう!
Appsody でnodejsのアプリを立ち上げよう!
 
Android勉強会 1
Android勉強会 1Android勉強会 1
Android勉強会 1
 
Introduce React Native
Introduce React NativeIntroduce React Native
Introduce React Native
 
Firefoxosハンズオン
FirefoxosハンズオンFirefoxosハンズオン
Firefoxosハンズオン
 
cocos2d-xにおけるBox2Dの利用方法および便利なツール
cocos2d-xにおけるBox2Dの利用方法および便利なツールcocos2d-xにおけるBox2Dの利用方法および便利なツール
cocos2d-xにおけるBox2Dの利用方法および便利なツール
 
React+redux+saga 02
React+redux+saga 02React+redux+saga 02
React+redux+saga 02
 
「Windows 8 ストア アプリ開発 tips」 hokuriku.net vol.11 (2013年1月26日)
「Windows 8 ストア アプリ開発 tips」  hokuriku.net vol.11 (2013年1月26日)「Windows 8 ストア アプリ開発 tips」  hokuriku.net vol.11 (2013年1月26日)
「Windows 8 ストア アプリ開発 tips」 hokuriku.net vol.11 (2013年1月26日)
 
[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送
[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送
[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送
 
20050903
2005090320050903
20050903
 

Plus de honan4108

活著的每一天…
活著的每一天…活著的每一天…
活著的每一天…
honan4108
 
別活在後悔裏
別活在後悔裏別活在後悔裏
別活在後悔裏
honan4108
 
100 道素菜
100 道素菜100 道素菜
100 道素菜
honan4108
 
健康知識篇
健康知識篇健康知識篇
健康知識篇
honan4108
 
歐巴馬白宮100天
歐巴馬白宮100天歐巴馬白宮100天
歐巴馬白宮100天
honan4108
 
一封E Mail背後的意義
一封E Mail背後的意義一封E Mail背後的意義
一封E Mail背後的意義
honan4108
 
做個聰明的老人
做個聰明的老人做個聰明的老人
做個聰明的老人
honan4108
 
投桃報李
投桃報李投桃報李
投桃報李
honan4108
 
長命百歲睡眠術
長命百歲睡眠術長命百歲睡眠術
長命百歲睡眠術
honan4108
 
快快樂樂
快快樂樂快快樂樂
快快樂樂
honan4108
 
Russian National Museum
Russian National MuseumRussian National Museum
Russian National Museum
honan4108
 
端午節快樂
端午節快樂端午節快樂
端午節快樂
honan4108
 
養生概念
養生概念養生概念
養生概念
honan4108
 
脂肪肝 Fatty Liver
脂肪肝   Fatty Liver脂肪肝   Fatty Liver
脂肪肝 Fatty Liver
honan4108
 
一位天才的告別
一位天才的告別一位天才的告別
一位天才的告別
honan4108
 
怒海狂濤
怒海狂濤怒海狂濤
怒海狂濤
honan4108
 
滅蚊方法
滅蚊方法滅蚊方法
滅蚊方法
honan4108
 
泰國出口人妖
泰國出口人妖泰國出口人妖
泰國出口人妖
honan4108
 
喜馬拉雅山下的香格里拉~不丹王國(上)
喜馬拉雅山下的香格里拉~不丹王國(上)喜馬拉雅山下的香格里拉~不丹王國(上)
喜馬拉雅山下的香格里拉~不丹王國(上)
honan4108
 

Plus de honan4108 (20)

活著的每一天…
活著的每一天…活著的每一天…
活著的每一天…
 
別活在後悔裏
別活在後悔裏別活在後悔裏
別活在後悔裏
 
100 道素菜
100 道素菜100 道素菜
100 道素菜
 
健康知識篇
健康知識篇健康知識篇
健康知識篇
 
歐巴馬白宮100天
歐巴馬白宮100天歐巴馬白宮100天
歐巴馬白宮100天
 
一封E Mail背後的意義
一封E Mail背後的意義一封E Mail背後的意義
一封E Mail背後的意義
 
做個聰明的老人
做個聰明的老人做個聰明的老人
做個聰明的老人
 
投桃報李
投桃報李投桃報李
投桃報李
 
長命百歲睡眠術
長命百歲睡眠術長命百歲睡眠術
長命百歲睡眠術
 
快快樂樂
快快樂樂快快樂樂
快快樂樂
 
Russian National Museum
Russian National MuseumRussian National Museum
Russian National Museum
 
端午節快樂
端午節快樂端午節快樂
端午節快樂
 
養生概念
養生概念養生概念
養生概念
 
脂肪肝 Fatty Liver
脂肪肝   Fatty Liver脂肪肝   Fatty Liver
脂肪肝 Fatty Liver
 
一位天才的告別
一位天才的告別一位天才的告別
一位天才的告別
 
怒海狂濤
怒海狂濤怒海狂濤
怒海狂濤
 
滅蚊方法
滅蚊方法滅蚊方法
滅蚊方法
 
泰國出口人妖
泰國出口人妖泰國出口人妖
泰國出口人妖
 
喜馬拉雅山下的香格里拉~不丹王國(上)
喜馬拉雅山下的香格里拉~不丹王國(上)喜馬拉雅山下的香格里拉~不丹王國(上)
喜馬拉雅山下的香格里拉~不丹王國(上)
 
Antlesso
AntlessoAntlesso
Antlesso
 

專訪李光耀