author | Xeli |
Sun, 21 Aug 2011 18:13:11 +0200 | |
branch | hedgeroid |
changeset 5623 | df23b477609d |
parent 5621 | ea796c83ea47 |
child 5671 | ba4c3a4c8b09 |
permissions | -rw-r--r-- |
5621 | 1 |
/* |
2 |
* Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game |
|
3 |
* Copyright (c) 2011 Richard Deurwaarder <xeli@xelification.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
17 |
*/ |
|
18 |
||
5397 | 19 |
package org.hedgewars.mobile; |
20 |
||
5416
26a36326d199
Added a small example of the frontend still being worked but commited so the downloader now works
Xeli
parents:
5397
diff
changeset
|
21 |
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
|
22 |
|
5397 | 23 |
import android.app.Activity; |
24 |
import android.content.Intent; |
|
25 |
import android.os.Bundle; |
|
26 |
import android.view.View; |
|
27 |
import android.view.View.OnClickListener; |
|
28 |
import android.widget.Button; |
|
29 |
||
30 |
public class MainActivity extends Activity { |
|
31 |
||
32 |
Button downloader, startGame; |
|
33 |
||
34 |
public void onCreate(Bundle sis){ |
|
35 |
super.onCreate(sis); |
|
36 |
setContentView(R.layout.main); |
|
37 |
||
38 |
downloader = (Button)findViewById(R.id.downloader); |
|
39 |
startGame = (Button)findViewById(R.id.startGame); |
|
40 |
||
41 |
downloader.setOnClickListener(downloadClicker); |
|
42 |
startGame.setOnClickListener(startGameClicker); |
|
43 |
} |
|
44 |
||
45 |
||
46 |
||
47 |
private OnClickListener downloadClicker = new OnClickListener(){ |
|
48 |
public void onClick(View v){ |
|
49 |
startActivityForResult(new Intent(getApplicationContext(), DownloadActivity.class), 0); |
|
50 |
} |
|
51 |
}; |
|
52 |
||
53 |
private OnClickListener startGameClicker = new OnClickListener(){ |
|
54 |
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
|
55 |
startActivity(new Intent(getApplicationContext(), StartGameActivity.class)); |
5397 | 56 |
} |
57 |
}; |
|
58 |
||
59 |
} |