長時間のlurker初めてのポスター単純なAndroidプロジェクトをXcodeで実行するように変換する
私はiOS上で動作するように求められている簡単なアンドロイドプロジェクトを持っています。私はすべてのプログラマ、タスクのためにボランティアを迅速にあるネットワークだけの男ではないよ...
だから、これは私が(Eclipseプロジェクトに)オフ動作するように与えられているものです:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Add Click listeners for all buttons
View firstButton = findViewById(R.id.button1);
firstButton.setOnClickListener(this);
View secondButton = findViewById(R.id.button2);
secondButton.setOnClickListener(this);
View thirdButton = findViewById(R.id.button3);
thirdButton.setOnClickListener(this);
View fourthButton = findViewById(R.id.button4);
fourthButton.setOnClickListener(this);
View fifthButton = findViewById(R.id.button5);
fifthButton.setOnClickListener(this);
}
// Process the button click events
public void onClick(View v) {
//based on the button clicked display associated html file
//html files are located under the assets folder
switch(v.getId()){
case R.id.button1:
Intent j = new Intent(this, Webscreen.class);
j.putExtra(Webscreen.URL, "file:///android_asset/deliver.html");
startActivity(j);
break;
case R.id.button2:
Intent k = new Intent(this, Webscreen.class);
k.putExtra(Webscreen.URL, "file:///android_asset/return.html");
startActivity(k);
break;
case R.id.button3:
Intent l = new Intent(this, Webscreen.class);
l.putExtra(Webscreen.URL, "file:///android_asset/updating.html");
startActivity(l);
break;
case R.id.button4:
Intent m = new Intent(this, Webscreen.class);
m.putExtra(Webscreen.URL, "file:///android_asset/repair.html");
startActivity(m);
break;
case R.id.button5:
Intent n = new Intent(this, Webscreen.class);
n.putExtra(Webscreen.URL, "file:///android_asset/vendor.html");
startActivity(n);
break;
}
これはすべて画面上の5つのボタンを表示し、クリックするとローカルのHTMLファイルを開きます。
誰かがXcodeで何か似たようなことをする良い例がありますか?私はWebビューで作業しようとしていますが、あまりにも多くの運がまだありません。私はスコアボードを使って何かを手に入れることができましたが、このアプリは以前のバージョンのiOSでは価値があり、5.0でなくてはなりません。
ありがとうございました/すべてのヘルプ!