Skip to content

Commit 2136375

Browse files
committed
Updated version numbers for 1.2.7 release
Fixed: Export format always defaults to QIF, ignoring user preference - closes #127 Improved: Better responsiveness of add transaction and add account buttons
1 parent 7ffd2d6 commit 2136375

11 files changed

Lines changed: 69 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Change Log
22
===============================================================================
3+
Version 1.2.7 *(2013-12-18)*
4+
----------------------------
5+
* Fixed: Export format always defaults to QIF, ignoring user preference
6+
* Improved: Better responsiveness of add transaction and add account buttons
7+
* Improved: Russian translation
8+
39
Version 1.2.6 *(2013-12-06)*
410
----------------------------
511
* Feature: Support for QIF export format

app/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1919
package="org.gnucash.android"
20-
android:versionCode="21"
21-
android:versionName="1.2.6" >
20+
android:versionCode="22"
21+
android:versionName="1.2.7" >
2222

2323
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15"/>
2424

app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<description>Gnucash Android companion application</description>
2323

2424
<parent>
25-
<version>1.2.6-SNAPSHOT</version>
25+
<version>1.2.7-SNAPSHOT</version>
2626
<groupId>org.gnucash.android</groupId>
2727
<artifactId>gnucash-android-parent</artifactId>
2828
</parent>

app/src/org/gnucash/android/export/ExportDialogFragment.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public void onClick(View v) {
9797
exportParameters.setExportTarget(position == 0 ? ExportParams.ExportTarget.SHARING : ExportParams.ExportTarget.SD_CARD);
9898
exportParameters.setDeleteTransactionsAfterExport(mDeleteAllCheckBox.isChecked());
9999

100+
dismiss();
101+
100102
Log.i(TAG, "Commencing async export of transactions");
101103
new ExporterTask(getActivity()).execute(exportParameters);
102-
103-
dismiss();
104104
}
105105

106106
}
@@ -126,9 +126,9 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
126126
@Override
127127
public void onActivityCreated(Bundle savedInstanceState) {
128128
super.onActivityCreated(savedInstanceState);
129+
bindViews();
129130
mFilePath = getActivity().getExternalFilesDir(null) + "/" + buildExportFilename(mExportFormat);
130131
getDialog().setTitle(R.string.title_export_dialog);
131-
bindViews();
132132
}
133133

134134
/**
@@ -164,6 +164,7 @@ public void onClick(View v) {
164164
mSaveButton.setOnClickListener(new ExportClickListener());
165165

166166
String defaultExportFormat = sharedPrefs.getString(getString(R.string.key_default_export_format), ExportFormat.QIF.name());
167+
mExportFormat = ExportFormat.valueOf(defaultExportFormat);
167168
View.OnClickListener clickListener = new View.OnClickListener() {
168169
@Override
169170
public void onClick(View view) {

app/src/org/gnucash/android/export/ExporterTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ protected Boolean doInBackground(ExportParams... params) {
125125
*/
126126
@Override
127127
protected void onPostExecute(Boolean exportResult) {
128-
mProgressDialog.dismiss();
129128

130129
if (!exportResult){
131130
Toast.makeText(mContext,
@@ -176,6 +175,8 @@ protected void onPostExecute(Boolean exportResult) {
176175
alertFragment.show(fragmentManager, "transactions_delete_confirmation_dialog");
177176
}
178177

178+
mProgressDialog.dismiss();
179+
179180
}
180181

181182

app/src/org/gnucash/android/receivers/TransactionAppWidgetProvider.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ public void onUpdate(Context context, AppWidgetManager appWidgetManager,
5353
WidgetConfigurationActivity.updateWidget(context, appWidgetId, accountId);
5454
}
5555
}
56-
57-
@Override
56+
57+
@Override
58+
public void onEnabled(Context context) {
59+
super.onEnabled(context);
60+
WidgetConfigurationActivity.updateAllWidgets(context);
61+
}
62+
63+
@Override
5864
public void onDeleted(Context context, int[] appWidgetIds) {
5965
super.onDeleted(context, appWidgetIds);
6066
Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit();

app/src/org/gnucash/android/ui/accounts/AccountsListFragment.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import android.content.DialogInterface;
2525
import android.content.Intent;
2626
import android.database.Cursor;
27+
import android.graphics.Rect;
2728
import android.os.AsyncTask;
2829
import android.os.Bundle;
2930
import android.support.v4.app.DialogFragment;
@@ -36,6 +37,7 @@
3637
import android.text.TextUtils;
3738
import android.util.Log;
3839
import android.view.LayoutInflater;
40+
import android.view.TouchDelegate;
3941
import android.view.View;
4042
import android.view.ViewGroup;
4143
import android.widget.*;
@@ -666,9 +668,9 @@ public void bindView(View v, Context context, Cursor cursor) {
666668
subAccountTextView.setVisibility(View.GONE);
667669

668670
// add a summary of transactions to the account view
669-
TextView summary = (TextView) v
671+
TextView accountBalanceTextView = (TextView) v
670672
.findViewById(R.id.transactions_summary);
671-
new AccountBalanceTask(summary, getActivity()).execute(accountId);
673+
new AccountBalanceTask(accountBalanceTextView, getActivity()).execute(accountId);
672674

673675
boolean isPlaceholderAccount = mAccountsDbAdapter.isPlaceholderAccount(accountId);
674676

@@ -705,6 +707,25 @@ public View getView(int position, View convertView, ViewGroup parent) {
705707
secondaryText.setTextColor(getResources().getColor(android.R.color.secondary_text_light_nodisable));
706708
}
707709

710+
711+
//increase the touch target area for the add new transaction button
712+
713+
final View addTransactionButton = convertView.findViewById(R.id.btn_new_transaction);
714+
final View parentView = convertView;
715+
parentView.post(new Runnable() {
716+
@Override
717+
public void run() {
718+
final android.graphics.Rect hitRect = new Rect();
719+
float extraPadding = getResources().getDimension(R.dimen.edge_padding);
720+
addTransactionButton.getHitRect(hitRect);
721+
hitRect.right += extraPadding;
722+
hitRect.bottom += extraPadding;
723+
hitRect.top -= extraPadding;
724+
hitRect.left -= extraPadding;
725+
parentView.setTouchDelegate(new TouchDelegate(hitRect, addTransactionButton));
726+
}
727+
});
728+
708729
return convertView;
709730
}
710731
}

app/src/org/gnucash/android/ui/settings/TransactionsPreferenceFragment.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,15 @@
1616

1717
package org.gnucash.android.ui.settings;
1818

19-
import com.actionbarsherlock.app.SherlockFragmentActivity;
20-
import org.gnucash.android.R;
21-
2219
import android.content.SharedPreferences;
2320
import android.os.Bundle;
2421
import android.preference.Preference;
2522
import android.preference.Preference.OnPreferenceChangeListener;
2623
import android.preference.PreferenceFragment;
2724
import android.preference.PreferenceManager;
28-
2925
import com.actionbarsherlock.app.ActionBar;
3026
import com.actionbarsherlock.app.SherlockPreferenceActivity;
31-
import org.gnucash.android.ui.transactions.TransactionsDeleteConfirmationDialog;
27+
import org.gnucash.android.R;
3228

3329
/**
3430
* Fragment for displaying transaction preferences

app/src/org/gnucash/android/ui/transactions/TransactionsListFragment.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import android.app.Activity;
2020
import android.content.Context;
2121
import android.database.Cursor;
22+
import android.graphics.Rect;
2223
import android.os.Bundle;
2324
import android.support.v4.app.DialogFragment;
2425
import android.support.v4.app.Fragment;
@@ -31,6 +32,7 @@
3132
import android.util.Log;
3233
import android.util.SparseBooleanArray;
3334
import android.view.LayoutInflater;
35+
import android.view.TouchDelegate;
3436
import android.view.View;
3537
import android.view.ViewGroup;
3638
import android.widget.CheckBox;
@@ -402,6 +404,24 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
402404
checkbox.setChecked(false);
403405
}
404406

407+
//increase the touch target area for the add new transaction button
408+
409+
final View checkBoxView = checkbox;
410+
final View parentView = view;
411+
parentView.post(new Runnable() {
412+
@Override
413+
public void run() {
414+
float extraPadding = getResources().getDimension(R.dimen.edge_padding);
415+
final android.graphics.Rect hitRect = new Rect();
416+
checkBoxView.getHitRect(hitRect);
417+
hitRect.right += extraPadding;
418+
hitRect.bottom += 3*extraPadding;
419+
hitRect.top -= extraPadding;
420+
hitRect.left -= 2*extraPadding;
421+
parentView.setTouchDelegate(new TouchDelegate(hitRect, checkBoxView));
422+
}
423+
});
424+
405425
return view;
406426
}
407427

integration-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1818
<modelVersion>4.0.0</modelVersion>
1919
<parent>
20-
<version>1.2.6-SNAPSHOT</version>
20+
<version>1.2.7-SNAPSHOT</version>
2121
<groupId>org.gnucash.android</groupId>
2222
<artifactId>gnucash-android-parent</artifactId>
2323
</parent>

0 commit comments

Comments
 (0)