project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/StartGameActivity.java
equal
deleted
inserted
replaced
54 private ImageView themeIcon, mapPreview, teamCount; |
54 private ImageView themeIcon, mapPreview, teamCount; |
55 |
55 |
56 public void onCreate(Bundle savedInstanceState){ |
56 public void onCreate(Bundle savedInstanceState){ |
57 super.onCreate(savedInstanceState); |
57 super.onCreate(savedInstanceState); |
58 |
58 |
59 SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); |
|
60 boolean firstTime = sharedPref.getBoolean("firstTime", true); |
|
61 //Copy all the xml files to the device TODO only do first time launch of the app... |
|
62 if(firstTime){ |
|
63 sharedPref.edit().putBoolean("firstTime", false).commit(); |
|
64 |
|
65 Utils.resRawToFilesDir(this,R.array.schemes, Scheme.DIRECTORY_SCHEME); |
|
66 Utils.resRawToFilesDir(this, R.array.weapons, Weapon.DIRECTORY_WEAPON); |
|
67 Utils.resRawToFilesDir(this, R.array.teams, Team.DIRECTORY_TEAMS); |
|
68 } |
|
69 |
|
70 Scheme.parseBasicFlags(this); |
59 Scheme.parseBasicFlags(this); |
71 config = new GameConfig(); |
60 config = new GameConfig(); |
72 |
61 |
73 setContentView(R.layout.starting_game); |
62 setContentView(R.layout.starting_game); |
74 |
63 |