Skip to content

Commit

Permalink
Merge pull request #26 from AlessandroLazzari/androdi-l-dev
Browse files Browse the repository at this point in the history
Release alpha1
  • Loading branch information
AlessandroLazzari committed Feb 25, 2015
2 parents 01059fc + 6704d4c commit 93c6df1
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 30 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ android {
applicationId "com.money.manager.ex"
minSdkVersion 16
targetSdkVersion 21
versionCode 602
versionName '2.0.0-alpha0'
versionCode 603
versionName '2.0.0-alpha1'
}

sourceSets {
Expand Down
89 changes: 89 additions & 0 deletions res/layout-sw600dp-land/merge_header_fragment_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2012-2014 Alessandro Lazzari
~
~ This program is free software; you can redistribute it and/or
~ modify it under the terms of the GNU General Public License
~ as published by the Free Software Foundation; either version 2
~ of the License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal">

<com.money.manager.ex.view.RobotoTextView
style="@style/Money.TextView.Body2.Inverse"
android:layout_width="128dp"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="2dp"
android:ellipsize="end"
android:gravity="right"
android:paddingLeft="6dp"
android:singleLine="true"
android:text="@string/account_balance"/>

<com.money.manager.ex.view.RobotoTextView
android:id="@+id/textViewAccountBalance"
style="@style/Money.TextView.Body2.Inverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:singleLine="true"
android:textStyle="bold"/>

<com.money.manager.ex.view.RobotoTextView
style="@style/Money.TextView.Body2.Inverse"
android:layout_width="128dp"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="2dp"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/account_reconciled_balance"/>

<com.money.manager.ex.view.RobotoTextView
android:id="@+id/textViewAccountReconciled"
style="@style/Money.TextView.Body2.Inverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:singleLine="true"
android:textStyle="bold"/>

<com.money.manager.ex.view.RobotoTextView
style="@style/Money.TextView.Body2.Inverse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_weight="1"
android:text="@string/difference"
android:textSize="@dimen/money_text_view_size_micro"
android:visibility="gone"/>

<com.money.manager.ex.view.RobotoTextView
android:id="@+id/textViewDifference"
style="@style/Money.TextView.Body2.Inverse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_marginLeft="2dp"
android:layout_weight="1"
android:textSize="@dimen/money_text_view_size_micro"
android:textStyle="bold"
android:visibility="gone"/>

</LinearLayout>
4 changes: 2 additions & 2 deletions res/raw/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
-->

<changelog bulletedList="true">
<changelogversion changeDate="February 23, 2014" versionName="2.0.0-alpha0">
<changelogtext>Introduced the material layout design</changelogtext>
<changelogversion changeDate="Feb 24, 2015" versionName="2.0.0-alpha1">
<changelogtext>Introduced the material layout design</changelogtext>
<changelogtext>Added the type of account Credit Card</changelogtext>
<changelogtext>Added function duplicates transaction</changelogtext>
<changelogtext>Added calculator on amount dialog</changelogtext>
Expand Down
11 changes: 11 additions & 0 deletions res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,15 @@
<string name="bank_accounts">Conti bancari</string>
<string name="term_accounts">Conti a termine</string>
<string name="credit_card_accounts">Carte di credito</string>
<string name="locale_hu">Ungherese</string>
<string name="montly_last_days">Mensile (ultimo giorno)</string>
<string name="montly_last_bussines_day">Mensile (ultimo giorno lavorativo)</string>
<string name="locale_de">Tedesco</string>
<string name="locale_ja">Giapponese</string>
<string name="locale_nl">Olandese</string>
<string name="locale_pl">Polacco</string>
<string name="transaction_cancel_confirm">Sei sicuro di che voler eliminare questa transazione?</string>
<string name="keep_editing">Mantenere la modifica</string>
<string name="discard">Abbandona</string>
<string name="invalid_expression">Espressione non valida</string>
</resources>
6 changes: 3 additions & 3 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,11 @@
<string name="term_accounts">Term Accounts</string>
<string name="credit_card_accounts">Credit Card Accounts</string>
<string name="locale_hu">Hungarian</string>
<string name="montly_last_days">Montly (last day)</string>
<string name="montly_last_bussines_day">Montly (last business day)</string>
<string name="montly_last_days">Monthly (last day)</string>
<string name="montly_last_bussines_day">Monthly (last business day)</string>
<string name="locale_de">German</string>
<string name="locale_ja">Japanese</string>
<string name="locale_nl">Ducth</string>
<string name="locale_nl">Dutch</string>
<string name="locale_pl">Polish</string>
<string name="transaction_cancel_confirm">Are you sure you want to discard this transaction?</string>
<string name="keep_editing">Keep editing</string>
Expand Down
2 changes: 1 addition & 1 deletion src/com/money/manager/ex/fragment/AccountFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
if (mAccountList == null) {
mAccountList = MoneyManagerOpenHelper.getInstance(getActivity()).getTableAccountList(mAccountId);
}
ViewGroup header = (ViewGroup) inflater.inflate(R.layout.account_header_fragment, container, false);
ViewGroup header = (ViewGroup) inflater.inflate(R.layout.account_header_fragment, null, false);
// take reference textview from layout
txtAccountBalance = (TextView) header.findViewById(R.id.textViewAccountBalance);
txtAccountReconciled = (TextView) header.findViewById(R.id.textViewAccountReconciled);
Expand Down
11 changes: 8 additions & 3 deletions src/com/money/manager/ex/fragment/AllDataFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
}
}
});

// set adapter
setListAdapter(adapter);
// if header is not null add to listview
if (mListHeader != null)
getListView().addHeaderView(mListHeader);
// set adapter
setListAdapter(adapter);

// register context menu
registerForContextMenu(getListView());

Expand Down Expand Up @@ -495,6 +495,8 @@ public boolean onActionItemClicked(ActionMode mode, android.view.MenuItem item)
SparseBooleanArray positionChecked = getListView().getCheckedItemPositions();
for (int i = 0; i < getListView().getCheckedItemCount(); i++) {
int position = positionChecked.keyAt(i);
if (getListHeader() != null)
position--;
if (cursor.moveToPosition(position)) {
transIds.add(cursor.getInt(cursor.getColumnIndex(QueryAllData.ID)));
}
Expand Down Expand Up @@ -575,6 +577,9 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)

@Override
public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) {
if (getListHeader() != null)
position--;

if (getListAdapter() != null && getListAdapter() instanceof AllDataAdapter) {
AllDataAdapter adapter = (AllDataAdapter) getListAdapter();
adapter.setPositionChecked(position, checked);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import android.animation.LayoutTransition;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
Expand Down Expand Up @@ -57,11 +56,6 @@ public abstract class BaseExpandableListFragment extends ExpandableListFragment
public void onCreate(Bundle savedInstanceState) {
// set theme
Core core = new Core(getActivity());
if (core.isTablet()) {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
try {
getActivity().setTheme(core.getThemeApplication());
} catch (Exception e) {
Expand Down
7 changes: 1 addition & 6 deletions src/com/money/manager/ex/fragment/BaseFragmentActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ protected void onCreate(Bundle savedInstance) {

String locale = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString(getString(PreferencesConstant.PREF_LOCALE), "");
core.changeLocaleApp(locale);
// set orietation
if (core.isTablet()) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}

try {
this.setTheme(core.getThemeApplication());
} catch (Exception e) {
Expand Down
7 changes: 0 additions & 7 deletions src/com/money/manager/ex/fragment/BaseListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.money.manager.ex.fragment;

import android.animation.LayoutTransition;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
Expand Down Expand Up @@ -61,12 +60,6 @@ public abstract class BaseListFragment extends AbsListFragment {
public void onCreate(Bundle savedInstanceState) {
// set theme
Core core = new Core(getActivity());
// set orietation
if (core.isTablet()) {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
try {
getActivity().setTheme(core.getThemeApplication());
} catch (Exception e) {
Expand Down

0 comments on commit 93c6df1

Please sign in to comment.