diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f317630..05dd1702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ###Version: 0.11.4 +- ```new``` Small UI improvements on home screen. - ```fix``` Fixed account balance calculation. - ```fix``` In categories report instead of 0% when rounded down now there is <1% diff --git a/financius/src/main/java/com/code44/finance/ui/overview/OverviewFragment.java b/financius/src/main/java/com/code44/finance/ui/overview/OverviewFragment.java index 0ba8a0d1..f95739b2 100644 --- a/financius/src/main/java/com/code44/finance/ui/overview/OverviewFragment.java +++ b/financius/src/main/java/com/code44/finance/ui/overview/OverviewFragment.java @@ -1,14 +1,12 @@ package com.code44.finance.ui.overview; import android.database.Cursor; -import android.os.Build; import android.os.Bundle; import android.support.v4.app.LoaderManager; import android.support.v4.content.Loader; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.view.ViewTreeObserver; import com.code44.finance.R; import com.code44.finance.adapters.NavigationAdapter; @@ -74,24 +72,10 @@ public static OverviewFragment newInstance() { accounts_V = (AccountsView) view.findViewById(R.id.accounts_V); // Setup + newTransaction_FAB.setColorFilter(getResources().getColor(R.color.dark_transparent)); newTransaction_FAB.setOnClickListener(this); overviewGraph_V.setOnClickListener(this); accounts_V.setOnClickListener(this); - - // Animate - if (savedInstanceState == null) { - view.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { - @Override public void onGlobalLayout() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - view.getViewTreeObserver().removeOnGlobalLayoutListener(this); - } else { - //noinspection deprecation - view.getViewTreeObserver().removeGlobalOnLayoutListener(this); - } - animateIn(); - } - }); - } } @Override public void onActivityCreated(Bundle savedInstanceState) { @@ -158,23 +142,6 @@ public static OverviewFragment newInstance() { getLoaderManager().restartLoader(LOADER_TRANSACTIONS, null, this); } - private void animateIn() { - // Prepare for animation - overviewGraphContainer_V.setTranslationY(-overviewGraph_V.getHeight()); - newTransaction_FAB.setScaleX(0.0f); - newTransaction_FAB.setScaleY(0.0f); - container_V.setAlpha(0.0f); - - // Animation constants - final long startDelay = 500; - final long duration = 250; - - // Animate - overviewGraphContainer_V.animate().translationY(0).setDuration(duration).setStartDelay(startDelay).start(); - newTransaction_FAB.animate().scaleX(1).scaleY(1).rotation(360).setDuration(duration).setStartDelay(startDelay).start(); - container_V.animate().alpha(1).setDuration(duration).setStartDelay(startDelay).start(); - } - private void onTransactionsLoaded(Cursor cursor) { final Map expenses = new HashMap<>(); if (cursor.moveToFirst()) { diff --git a/financius/src/main/res/layout/fragment_overview.xml b/financius/src/main/res/layout/fragment_overview.xml index db58132a..2d6f24c2 100644 --- a/financius/src/main/res/layout/fragment_overview.xml +++ b/financius/src/main/res/layout/fragment_overview.xml @@ -58,6 +58,8 @@ android:layout_marginRight="@dimen/keyline" android:layout_marginTop="@dimen/btn_fab_half_negative" android:elevation="@dimen/elevation_fab" + android:scaleType="centerInside" android:src="@drawable/ic_action_new" - tools:ignore="RtlHardcoded,UnusedAttribute" /> + tools:ignore="RtlHardcoded,UnusedAttribute" + tools:tint="@color/dark_transparent" /> \ No newline at end of file diff --git a/financius/src/main/res/values/colors.xml b/financius/src/main/res/values/colors.xml index df6e5a9f..1687272c 100644 --- a/financius/src/main/res/values/colors.xml +++ b/financius/src/main/res/values/colors.xml @@ -8,6 +8,7 @@ #8fcddc39 #afb42b #8fafb42b + #8f000000 #f0f0f0 #fafafa