8. Developers Summit 2013 Summer
Summit
Developers
8
This data by Google on July 8, 2013
ICS
JB
Eclair
Froyo
Gingerbread
Honeycomb
OSのバージョン分布
9. Developers Summit 2013 Summer
Summit
Developers
9
画面サイズと画面密度
This data by Google on July 8, 2013
Normal
Small
Xlarge
Large
hdpi
xhdpi
ldpi
mdpi
xxhdpi
tvdpi
27. Developers Summit 2013 Summer
Summit
Developers
27
“Lazy loading”の利用例
public
abstract
class
NotificationUtilAbstract
{
public
static
NotificationUtilAbstract
newInstance()
{
NotificationUtilAbstract
instance
=
null;
if
(Integer.parseInt(Build.VERSION.SDK)>=
16)
{
instance
=
new
NotificationUtilJB();
}
else
{
instance
=
new
NotificationUtilDefault();
}
return
instance;
}
public
abstract
void
showCaller;
}
1st step
マルチバージョン対応
28. Developers Summit 2013 Summer
Summit
Developers
28
public
class
NotificationUtilJB
extends
NotificationUtilAbstract{
@Override
public
void
showCaller(){
//
Code
by
Jelly
Bean
(API
16)
}
}
public
class
NotificationUtilDefault
extends
NotificationUtilAbstract{
@Override
public
void
showCaller(){
//
Code
by
Old
API
}
}
1.6でもOK
2nd step
マルチバージョン対応