Skip to content

Commit

Permalink
Fixed bug in ReaderTagTable that caused tbl_tag_updates to always ove…
Browse files Browse the repository at this point in the history
…rwrite the existing row when updating a date column
  • Loading branch information
nbradbury committed Jul 25, 2014
0 parents commit 78b8325
Show file tree
Hide file tree
Showing 45 changed files with 3,884 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# generated files
build/

# Local configuration file (sdk path, etc)
local.properties
tools/deploy-mvn-artifact.conf

# Intellij project files
*.iml
*.ipr
*.iws
.idea/

# Gradle
.gradle/
gradle.properties

# Idea
.idea/workspace.xml
*.iml

# OS X
.DS_Store

# dependencies
55 changes: 55 additions & 0 deletions WordPressUtils/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'

repositories {
mavenCentral()
maven { url 'http://wordpress-mobile.github.io/WordPress-Android' }
}

dependencies {
compile 'commons-lang:commons-lang:2.6'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.github.castorflex.smoothprogressbar:library:0.4.0'
compile 'org.wordpress:pulltorefresh-main:+@aar' // org.wordpress version includes some fixes
compile 'com.android.support:support-v13:19.0.+'
}

android {
defaultPublishConfig 'debug'

compileSdkVersion 19
buildToolsVersion "19.1.0"

defaultConfig {
applicationId "org.wordpress.android.util"
versionName "1.0.2"
versionCode 1
minSdkVersion 14
targetSdkVersion 19
}
}

uploadArchives {
repositories {
mavenDeployer {
def repo_url = ""
if (project.hasProperty("repository")) {
repo_url = project.repository
}
repository(url: repo_url)
pom.version = android.defaultConfig.versionName
pom.groupId = "org.wordpress"
pom.artifactId = "wordpress-utils"
}
}
}
1 change: 1 addition & 0 deletions WordPressUtils/gradle.properties-example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repository=file:///Users/max/work/automattic/WordPress-Android-gh-pages/
5 changes: 5 additions & 0 deletions WordPressUtils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.wordpress.android.util">

</manifest>
101 changes: 101 additions & 0 deletions WordPressUtils/src/main/java/org/wordpress/android/util/AlertUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*
* Copyright (C) 2011 wordpress.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.wordpress.android.util;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;

public class AlertUtil {
/**
* Show Alert Dialog
* @param context
* @param titleId
* @param messageId
*/
public static void showAlert(Context context, int titleId, int messageId) {
Dialog dlg = new AlertDialog.Builder(context)
.setTitle(titleId)
.setPositiveButton(android.R.string.ok, null)
.setMessage(messageId)
.create();

dlg.show();
}

/**
* Show Alert Dialog
* @param context
* @param titleId
* @param messageId
*/
public static void showAlert(Context context, int titleId, String message) {
Dialog dlg = new AlertDialog.Builder(context)
.setTitle(titleId)
.setPositiveButton(android.R.string.ok, null)
.setMessage(message)
.create();

dlg.show();
}

/**
* Show Alert Dialog
* @param context
* @param titleId
* @param messageId
* @param positiveButtontxt
* @param positiveListener
* @param negativeButtontxt
* @param negativeListener
*/
public static void showAlert(Context context, int titleId, int messageId,
CharSequence positiveButtontxt, DialogInterface.OnClickListener positiveListener,
CharSequence negativeButtontxt, DialogInterface.OnClickListener negativeListener) {
Dialog dlg = new AlertDialog.Builder(context)
.setTitle(titleId)
.setPositiveButton(positiveButtontxt, positiveListener)
.setNegativeButton(negativeButtontxt, negativeListener)
.setMessage(messageId)
.setCancelable(false)
.create();

dlg.show();
}

/**
* Show Alert Dialog
* @param context
* @param titleId
* @param messageId
* @param positiveButtontxt
* @param positiveListener
*/
public static void showAlert(Context context, int titleId, String message,
CharSequence positiveButtontxt, DialogInterface.OnClickListener positiveListener) {
Dialog dlg = new AlertDialog.Builder(context)
.setTitle(titleId)
.setPositiveButton(positiveButtontxt, positiveListener)
.setMessage(message)
.setCancelable(false)
.create();

dlg.show();
}
}

0 comments on commit 78b8325

Please sign in to comment.