author | Xeli |
Tue, 09 Aug 2011 20:56:34 +0200 | |
branch | hedgeroid |
changeset 5514 | 294c92eea729 |
parent 5416 | 26a36326d199 |
child 5621 | ea796c83ea47 |
permissions | -rw-r--r-- |
5397 | 1 |
package org.hedgewars.mobile; |
2 |
||
5416
26a36326d199
Added a small example of the frontend still being worked but commited so the downloader now works
Xeli
parents:
5397
diff
changeset
|
3 |
import org.hedgewars.mobile.Downloader.DownloadActivity; |
26a36326d199
Added a small example of the frontend still being worked but commited so the downloader now works
Xeli
parents:
5397
diff
changeset
|
4 |
|
5397 | 5 |
import android.app.Activity; |
6 |
import android.content.Intent; |
|
7 |
import android.os.Bundle; |
|
8 |
import android.view.View; |
|
9 |
import android.view.View.OnClickListener; |
|
10 |
import android.widget.Button; |
|
11 |
||
12 |
public class MainActivity extends Activity { |
|
13 |
||
14 |
Button downloader, startGame; |
|
15 |
||
16 |
public void onCreate(Bundle sis){ |
|
17 |
super.onCreate(sis); |
|
18 |
setContentView(R.layout.main); |
|
19 |
||
20 |
downloader = (Button)findViewById(R.id.downloader); |
|
21 |
startGame = (Button)findViewById(R.id.startGame); |
|
22 |
||
23 |
downloader.setOnClickListener(downloadClicker); |
|
24 |
startGame.setOnClickListener(startGameClicker); |
|
25 |
} |
|
26 |
||
27 |
||
28 |
||
29 |
private OnClickListener downloadClicker = new OnClickListener(){ |
|
30 |
public void onClick(View v){ |
|
31 |
startActivityForResult(new Intent(getApplicationContext(), DownloadActivity.class), 0); |
|
32 |
} |
|
33 |
}; |
|
34 |
||
35 |
private OnClickListener startGameClicker = new OnClickListener(){ |
|
36 |
public void onClick(View v){ |
|
5416
26a36326d199
Added a small example of the frontend still being worked but commited so the downloader now works
Xeli
parents:
5397
diff
changeset
|
37 |
startActivity(new Intent(getApplicationContext(), StartGameActivity.class)); |
5397 | 38 |
} |
39 |
}; |
|
40 |
||
41 |
} |