Skip to content

Commit

Permalink
Merge pull request #34 from caseydavenport/google-drive
Browse files Browse the repository at this point in the history
Google Drive support
  • Loading branch information
Casey Davenport committed Jan 7, 2016
2 parents bbb66e6 + f566345 commit 6aac669
Show file tree
Hide file tree
Showing 19 changed files with 265 additions and 92 deletions.
8 changes: 6 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<manifest
package="com.biermacht.brews"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="19"
android:versionName="1.1.0">
android:versionCode="20"
android:versionName="1.1.1">

<uses-sdk
android:minSdkVersion="15"
Expand All @@ -26,6 +26,10 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.android.apps.drive.DRIVE_OPEN"/>
<data android:mimeType="application/vnd.google-apps.drive-sdk.1234567890"/>
</intent-filter>
</activity>
<activity
android:name=".frontend.DisplayRecipeActivity"
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ apply plugin: 'com.android.application'
dependencies {
compile "com.android.support:support-v4:22.2.0"
compile "com.android.support:appcompat-v7:21.0.+"
compile 'com.android.support:design:22.2.0'
compile "com.android.support:design:22.2.0"
compile "com.google.android.gms:play-services-drive:8.3.0"
compile files("libs/commons-lang3-3.4/commons-lang3-3.4.jar")
}

Expand Down
6 changes: 6 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<string name="calculate">Calculate</string>
<string name="export">Export</string>
<string name="cancel">Cancel</string>
<string name="browse">Browse</string>
<string name="done">Done</string>
<string name="ok">OK</string>
<string name="reset">Reset</string>
Expand Down Expand Up @@ -113,4 +114,9 @@
<string name="recipe_copied">1 Recipe Copied</string>
<string name="recipe_exported">1 Recipe Exported</string>

<!-- Alert Dialog Messages -->
<string name="import_recipes_title">Import Recipe(s) from XML</string>
<string name="import_recipes_msg">Select a BeerXML (.xml) or BeerSmith2 (.bsmx) file to import recipes.</string>
<string name="import_recipes_drive_button">GDrive</string>

</resources>
3 changes: 2 additions & 1 deletion res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

<!-- Settings for ContextActionBar -->
<item name="android:windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/context_action_bar_bg</item> (or)
<item name="actionModeBackground">@color/context_action_bar_bg</item>
(or)
<item name="android:actionModeBackground">@color/context_action_bar_bg</item>

<!-- Use custom AlertDialog theme -->
Expand Down
2 changes: 1 addition & 1 deletion src/com/biermacht/brews/database/DatabaseAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public class DatabaseAPI {

public static DatabaseInterface newDatabaseInterface(Context c) {
return new DatabaseInterface(c);
return new DatabaseInterface(c);
}

// Get all recipes in database, sorted
Expand Down
4 changes: 2 additions & 2 deletions src/com/biermacht/brews/frontend/DisplayRecipeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public void onPageScrollStateChanged(int state) {
}

/**
* TODO: This creates an entire new pager adapter adapter in order to update the UI. It would be nice
* if we could just update things in place, without having to create / destroy so many
* TODO: This creates an entire new pager adapter adapter in order to update the UI. It would be
* nice if we could just update things in place, without having to create / destroy so many
* objects.
*/
public void updatePagerAdater() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public void onCreate(Bundle savedInstanceState) {

// Set views
this.setViews(Arrays.asList(nameView,
amountView,
timeView,
formSpinner,
useSpinner,
alphaAcidView,
descriptionView));
amountView,
timeView,
formSpinner,
useSpinner,
alphaAcidView,
descriptionView));
if (! haveRecipe()) {
timeView.setVisibility(View.GONE);
amountView.setVisibility(View.GONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public void onCreate(Bundle savedInstanceState) {

// Set views
this.setViews(Arrays.asList(nameView,
formSpinner,
useSpinner,
alphaAcidView,
descriptionView));
formSpinner,
useSpinner,
alphaAcidView,
descriptionView));

// Set values for the given hop
setValues(hop);
Expand Down
Loading

0 comments on commit 6aac669

Please sign in to comment.