diff --git a/.gitignore b/.gitignore index 8b9c2806..7a02cd95 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.gradle +build +.idea assets bin gen diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..8b792765 --- /dev/null +++ b/build.gradle @@ -0,0 +1,26 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:0.5.+' + } +} +apply plugin: 'android' + +repositories { + mavenCentral() +} + +android { + compileSdkVersion 17 + buildToolsVersion "17.0.0" + + + dependencies { + compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' + compile fileTree(dir: 'libs', include: '*.jar') + } +} + + diff --git a/promo/180x120.png b/promo/180x120.png new file mode 100644 index 00000000..e7dcf81f Binary files /dev/null and b/promo/180x120.png differ diff --git a/promo/180x120.xcf b/promo/180x120.xcf new file mode 100644 index 00000000..1fd91ac6 Binary files /dev/null and b/promo/180x120.xcf differ diff --git a/promo/940x180.png b/promo/940x180.png new file mode 100644 index 00000000..ef7dff58 Binary files /dev/null and b/promo/940x180.png differ diff --git a/promo/940x180.xcf b/promo/940x180.xcf new file mode 100644 index 00000000..486d0e66 Binary files /dev/null and b/promo/940x180.xcf differ diff --git a/AndroidManifest.xml b/src/main/AndroidManifest.xml similarity index 98% rename from AndroidManifest.xml rename to src/main/AndroidManifest.xml index 97c4c052..91f367be 100644 --- a/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -3,8 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" package="org.ligi.ticketviewer" android:installLocation="auto" - android:versionCode="17" - android:versionName="1.7"> + android:versionCode="18" + android:versionName="1.8"> + diff --git a/src/org/ligi/ticketviewer/FullscreenImageActivity.java b/src/main/java/org/ligi/ticketviewer/FullscreenImageActivity.java similarity index 100% rename from src/org/ligi/ticketviewer/FullscreenImageActivity.java rename to src/main/java/org/ligi/ticketviewer/FullscreenImageActivity.java diff --git a/src/org/ligi/ticketviewer/FullscreenMapActivity.java b/src/main/java/org/ligi/ticketviewer/FullscreenMapActivity.java similarity index 100% rename from src/org/ligi/ticketviewer/FullscreenMapActivity.java rename to src/main/java/org/ligi/ticketviewer/FullscreenMapActivity.java diff --git a/src/org/ligi/ticketviewer/HelpDialog.java b/src/main/java/org/ligi/ticketviewer/HelpDialog.java similarity index 100% rename from src/org/ligi/ticketviewer/HelpDialog.java rename to src/main/java/org/ligi/ticketviewer/HelpDialog.java diff --git a/src/org/ligi/ticketviewer/ImportAsyncTask.java b/src/main/java/org/ligi/ticketviewer/ImportAsyncTask.java similarity index 100% rename from src/org/ligi/ticketviewer/ImportAsyncTask.java rename to src/main/java/org/ligi/ticketviewer/ImportAsyncTask.java diff --git a/src/org/ligi/ticketviewer/LocationsMapFragment.java b/src/main/java/org/ligi/ticketviewer/LocationsMapFragment.java similarity index 100% rename from src/org/ligi/ticketviewer/LocationsMapFragment.java rename to src/main/java/org/ligi/ticketviewer/LocationsMapFragment.java diff --git a/src/org/ligi/ticketviewer/PassExportTask.java b/src/main/java/org/ligi/ticketviewer/PassExportTask.java similarity index 100% rename from src/org/ligi/ticketviewer/PassExportTask.java rename to src/main/java/org/ligi/ticketviewer/PassExportTask.java diff --git a/src/org/ligi/ticketviewer/PassbookParser.java b/src/main/java/org/ligi/ticketviewer/PassbookParser.java similarity index 100% rename from src/org/ligi/ticketviewer/PassbookParser.java rename to src/main/java/org/ligi/ticketviewer/PassbookParser.java diff --git a/src/org/ligi/ticketviewer/PreferenceActivity.java b/src/main/java/org/ligi/ticketviewer/PreferenceActivity.java similarity index 78% rename from src/org/ligi/ticketviewer/PreferenceActivity.java rename to src/main/java/org/ligi/ticketviewer/PreferenceActivity.java index d9dc5c8b..5412114a 100644 --- a/src/org/ligi/ticketviewer/PreferenceActivity.java +++ b/src/main/java/org/ligi/ticketviewer/PreferenceActivity.java @@ -1,21 +1,8 @@ package org.ligi.ticketviewer; -import android.accounts.AccountManager; -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.preference.CheckBoxPreference; + import android.preference.Preference; -import android.preference.PreferenceScreen; import com.actionbarsherlock.app.SherlockPreferenceActivity; -import com.google.api.client.extensions.android.http.AndroidHttp; -import com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential; -import com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException; -import com.google.api.client.http.FileContent; -import com.google.api.client.json.gson.GsonFactory; -import com.google.api.services.drive.Drive; -import com.google.api.services.drive.DriveScopes; -import com.google.api.services.drive.model.File; import java.io.IOException; @@ -25,7 +12,11 @@ import java.io.IOException; * Time: 6:31 PM */ public class PreferenceActivity extends SherlockPreferenceActivity implements Preference.OnPreferenceChangeListener { - + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { + return false; //To change body of implemented methods use File | Settings | File Templates. + } +/* private static final int REQUEST_ACCOUNT_PICKER = 1; private static final int REQUEST_AUTHORIZATION = 2; private static Drive service; @@ -37,13 +28,11 @@ public class PreferenceActivity extends SherlockPreferenceActivity implements Pr PreferenceScreen root = getPreferenceManager().createPreferenceScreen(this); root.setPersistent(true); - /* // UI section - PreferenceCategory uiPrefCat = new PreferenceCategory(this); - uiPrefCat.setTitle(R.string.screen); - root.addPreference(uiPrefCat); + //PreferenceCategory uiPrefCat = new PreferenceCategory(this); + //uiPrefCat.setTitle(R.string.screen); + //root.addPreference(uiPrefCat); - */ sync2driveCheckBoxPref = new CheckBoxPreference(this); sync2driveCheckBoxPref.setKey("DRIVE_BACKUP"); @@ -74,11 +63,11 @@ public class PreferenceActivity extends SherlockPreferenceActivity implements Pr GoogleAccountCredential credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE_FILE); startActivityForResult(credential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER); } - /* - * if ((preference==sgf_path_pref)||(preference==sgf_fname_pref) - * ||(preference==boardSkinPref)|| (preference==stoneSkinPref)|| - * (preference==aiLevelPref)) preference.setSummary((String)newValue); - */ + // + // if ((preference==sgf_path_pref)||(preference==sgf_fname_pref) + // ||(preference==boardSkinPref)|| (preference==stoneSkinPref)|| + // (preference==aiLevelPref)) preference.setSummary((String)newValue); + return true; // return that we are OK with preferences } @@ -130,8 +119,8 @@ public class PreferenceActivity extends SherlockPreferenceActivity implements Pr //service.files(); File file = service.files().insert(body, mediaContent).execute(); if (file != null) { - /*showToast("Photo uploaded: " + file.getTitle()); - startCameraIntent();*/ + //showToast("Photo uploaded: " + file.getTitle()); + //startCameraIntent(); } } catch (UserRecoverableAuthIOException e) { startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION); @@ -142,4 +131,5 @@ public class PreferenceActivity extends SherlockPreferenceActivity implements Pr }); t.start(); } + */ } diff --git a/src/org/ligi/ticketviewer/TicketDefinitions.java b/src/main/java/org/ligi/ticketviewer/TicketDefinitions.java similarity index 100% rename from src/org/ligi/ticketviewer/TicketDefinitions.java rename to src/main/java/org/ligi/ticketviewer/TicketDefinitions.java diff --git a/src/org/ligi/ticketviewer/TicketImportActivity.java b/src/main/java/org/ligi/ticketviewer/TicketImportActivity.java similarity index 100% rename from src/org/ligi/ticketviewer/TicketImportActivity.java rename to src/main/java/org/ligi/ticketviewer/TicketImportActivity.java diff --git a/src/org/ligi/ticketviewer/TicketListActivity.java b/src/main/java/org/ligi/ticketviewer/TicketListActivity.java similarity index 100% rename from src/org/ligi/ticketviewer/TicketListActivity.java rename to src/main/java/org/ligi/ticketviewer/TicketListActivity.java diff --git a/src/org/ligi/ticketviewer/TicketViewActivity.java b/src/main/java/org/ligi/ticketviewer/TicketViewActivity.java similarity index 100% rename from src/org/ligi/ticketviewer/TicketViewActivity.java rename to src/main/java/org/ligi/ticketviewer/TicketViewActivity.java diff --git a/src/org/ligi/ticketviewer/TicketViewActivityBase.java b/src/main/java/org/ligi/ticketviewer/TicketViewActivityBase.java similarity index 100% rename from src/org/ligi/ticketviewer/TicketViewActivityBase.java rename to src/main/java/org/ligi/ticketviewer/TicketViewActivityBase.java diff --git a/src/org/ligi/ticketviewer/UnzipPasscodeDialog.java b/src/main/java/org/ligi/ticketviewer/UnzipPasscodeDialog.java similarity index 100% rename from src/org/ligi/ticketviewer/UnzipPasscodeDialog.java rename to src/main/java/org/ligi/ticketviewer/UnzipPasscodeDialog.java diff --git a/src/org/ligi/ticketviewer/helper/ApplicationContext.java b/src/main/java/org/ligi/ticketviewer/helper/ApplicationContext.java similarity index 100% rename from src/org/ligi/ticketviewer/helper/ApplicationContext.java rename to src/main/java/org/ligi/ticketviewer/helper/ApplicationContext.java diff --git a/src/org/ligi/ticketviewer/helper/BarcodeHelper.java b/src/main/java/org/ligi/ticketviewer/helper/BarcodeHelper.java similarity index 100% rename from src/org/ligi/ticketviewer/helper/BarcodeHelper.java rename to src/main/java/org/ligi/ticketviewer/helper/BarcodeHelper.java diff --git a/src/org/ligi/ticketviewer/helper/FileHelper.java b/src/main/java/org/ligi/ticketviewer/helper/FileHelper.java similarity index 100% rename from src/org/ligi/ticketviewer/helper/FileHelper.java rename to src/main/java/org/ligi/ticketviewer/helper/FileHelper.java diff --git a/src/org/ligi/ticketviewer/helper/PassbookVisualisationHelper.java b/src/main/java/org/ligi/ticketviewer/helper/PassbookVisualisationHelper.java similarity index 100% rename from src/org/ligi/ticketviewer/helper/PassbookVisualisationHelper.java rename to src/main/java/org/ligi/ticketviewer/helper/PassbookVisualisationHelper.java diff --git a/res/drawable-hdpi/ic_launcher.png b/src/main/res/drawable-hdpi/ic_launcher.png similarity index 100% rename from res/drawable-hdpi/ic_launcher.png rename to src/main/res/drawable-hdpi/ic_launcher.png diff --git a/res/drawable-hdpi/ic_menu_refresh.png b/src/main/res/drawable-hdpi/ic_menu_refresh.png similarity index 100% rename from res/drawable-hdpi/ic_menu_refresh.png rename to src/main/res/drawable-hdpi/ic_menu_refresh.png diff --git a/res/drawable-ldpi/ic_launcher.png b/src/main/res/drawable-ldpi/ic_launcher.png similarity index 100% rename from res/drawable-ldpi/ic_launcher.png rename to src/main/res/drawable-ldpi/ic_launcher.png diff --git a/res/drawable-ldpi/ic_menu_refresh.png b/src/main/res/drawable-ldpi/ic_menu_refresh.png similarity index 100% rename from res/drawable-ldpi/ic_menu_refresh.png rename to src/main/res/drawable-ldpi/ic_menu_refresh.png diff --git a/res/drawable-mdpi/ic_launcher.png b/src/main/res/drawable-mdpi/ic_launcher.png similarity index 100% rename from res/drawable-mdpi/ic_launcher.png rename to src/main/res/drawable-mdpi/ic_launcher.png diff --git a/res/drawable-mdpi/ic_menu_refresh.png b/src/main/res/drawable-mdpi/ic_menu_refresh.png similarity index 100% rename from res/drawable-mdpi/ic_menu_refresh.png rename to src/main/res/drawable-mdpi/ic_menu_refresh.png diff --git a/res/drawable-xhdpi/ic_launcher.png b/src/main/res/drawable-xhdpi/ic_launcher.png similarity index 100% rename from res/drawable-xhdpi/ic_launcher.png rename to src/main/res/drawable-xhdpi/ic_launcher.png diff --git a/res/drawable-xhdpi/ic_menu_refresh.png b/src/main/res/drawable-xhdpi/ic_menu_refresh.png similarity index 100% rename from res/drawable-xhdpi/ic_menu_refresh.png rename to src/main/res/drawable-xhdpi/ic_menu_refresh.png diff --git a/res/layout-land/activity_ticket_view.xml b/src/main/res/layout-land/activity_ticket_view.xml similarity index 100% rename from res/layout-land/activity_ticket_view.xml rename to src/main/res/layout-land/activity_ticket_view.xml diff --git a/res/layout/activity_ticket_view.xml b/src/main/res/layout/activity_ticket_view.xml similarity index 100% rename from res/layout/activity_ticket_view.xml rename to src/main/res/layout/activity_ticket_view.xml diff --git a/res/layout/activity_ticket_view_base.xml b/src/main/res/layout/activity_ticket_view_base.xml similarity index 100% rename from res/layout/activity_ticket_view_base.xml rename to src/main/res/layout/activity_ticket_view_base.xml diff --git a/res/layout/fullscreen_image.xml b/src/main/res/layout/fullscreen_image.xml similarity index 100% rename from res/layout/fullscreen_image.xml rename to src/main/res/layout/fullscreen_image.xml diff --git a/res/layout/fullscreen_map.xml b/src/main/res/layout/fullscreen_map.xml similarity index 100% rename from res/layout/fullscreen_map.xml rename to src/main/res/layout/fullscreen_map.xml diff --git a/res/layout/pass_list_item.xml b/src/main/res/layout/pass_list_item.xml similarity index 100% rename from res/layout/pass_list_item.xml rename to src/main/res/layout/pass_list_item.xml diff --git a/res/menu/activity_ticket_list_view.xml b/src/main/res/menu/activity_ticket_list_view.xml similarity index 97% rename from res/menu/activity_ticket_list_view.xml rename to src/main/res/menu/activity_ticket_list_view.xml index 29ff74e2..32f968e5 100644 --- a/res/menu/activity_ticket_list_view.xml +++ b/src/main/res/menu/activity_ticket_list_view.xml @@ -11,11 +11,11 @@ android:orderInCategory="100" android:showAsAction="ifRoom|withText" android:title="@string/help_label" android:icon="@android:drawable/ic_menu_help"/> - + \ No newline at end of file diff --git a/res/menu/activity_ticket_view.xml b/src/main/res/menu/activity_ticket_view.xml similarity index 100% rename from res/menu/activity_ticket_view.xml rename to src/main/res/menu/activity_ticket_view.xml diff --git a/res/menu/map_item.xml b/src/main/res/menu/map_item.xml similarity index 100% rename from res/menu/map_item.xml rename to src/main/res/menu/map_item.xml diff --git a/src/main/res/values/analytics.xml b/src/main/res/values/analytics.xml new file mode 100644 index 00000000..6e8de8c6 --- /dev/null +++ b/src/main/res/values/analytics.xml @@ -0,0 +1,12 @@ + + + + UA-38359849-1 + + + true + + + true + + \ No newline at end of file diff --git a/res/values/dimen.xml b/src/main/res/values/dimen.xml similarity index 100% rename from res/values/dimen.xml rename to src/main/res/values/dimen.xml diff --git a/res/values/strings.xml b/src/main/res/values/strings.xml similarity index 100% rename from res/values/strings.xml rename to src/main/res/values/strings.xml diff --git a/res/values/styles.xml b/src/main/res/values/styles.xml similarity index 100% rename from res/values/styles.xml rename to src/main/res/values/styles.xml