Upload
ukayare
View
156
Download
3
Embed Size (px)
DESCRIPTION
LTのやつ
Citation preview
WindowsPhoneアプリをAndroidに
移植しようとした
@ukayare
WindowsPhone
It is Very Exciting Device
But
The Problem is ...
So a few!!
The Problem is ...
I want you to use my application!!
I want Money!!
Android sharing is ...
About 160 Times
So, let the android development
My WindowsPhone Application
Dominion selector
C# on Android(iPhone)
Xamarin
Xamarin Advantage
● Creating Android Project by C#○ Can use LINQ and lambda○ Using delegate, your coding smart.
● XamarinStudio(IDE) is cool!!● Can Use VisualStudio.(by pay plan)
Xamarin Disadvantage
● Free plan is so poor function.● Pay Plan is so expensive
Xamarin...
For the rich man's Product
Porting
Convert
I think ...
Problem 1
Can't use default and named arguments.
public void calc(){ sum(x: 3, y: 2, z: 1);//6 sum(x: 3, z: 1);//4 sum();//0 sum(z: 1);//1}
public int sum(int x = 0,int y = 0,int z = 0){ return x + y + z;}
Care of
Using HashMap?
public void calc(){ HashMap<String, int> map = new HashMap<String, int> map.putInt("x", 10); sum(map);//10}public int sum(HashMap<String, int> map){ if(map == null) return 0; int x = map.put("x") == null ? 0 : map.put("x"); int y = map.put("y") == null ? 0 : map.put("y"); int z = map.put("z") == null ? 0 : map.put("z"); return x + y + z;}
Problem 2
Can't use Lambda and Predicate(LINQ).-List filtering-
public class Point{ public x { get: set:} public y { get: set:}
public Point(int x, int y){ this.x = x; this.y = y; }}
public void hoge(){ var list = new List<Point>(); list.Add(new Point(1,2)) list.Add(new Point(-1,2)) list.Add(new Point(1,-2)) list.Where(point p => p.x > 0);}
Care of
Using inner Interface?
public class PointList extends ArrayList<Point>{ public PointList where(FilterInterface filter){ reutrn filter.filter(this); } public interface FilterInterface{ public PointList filter(PointList target); }}
implements
public void hoge(){ PointList list = new PointList(); list.Add(new Point(1,2)); list.Add(new Point(-1,2)); list.Add(new Point(1,-2)); list.where(new PointList.FilterInterface(){ @Override public PointList filter(PointList target){ PointList flist = new PointList();
for(Point p : target) if(p.x > 0) flist.add(p); return flist; } });}
Problem 3
VisualStudio is better than Eclipse or AndroidStudio
Care of
Please Use Xamarin!!
The Last of ...
Lunch Time is
Dominion Time!!
I have participated
wait for everyone!!