Skip to content

Commit

Permalink
2.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Barashkov committed Jun 22, 2020
1 parent a5d8071 commit 4eaa23d
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 20 deletions.
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
<activity
android:name="com.handydev.financier.activity.BlotterActivity"
android:label="@string/blotter" />
<activity
android:name="com.handydev.financier.activity.BlotterActivity2"
android:label="@string/blotter" />

<activity
android:name="com.handydev.financier.activity.PlannerActivity"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/assets/whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
</head>
<body>

<p><b>2.0.10</b></p>
<p>
[*] Fixed parent category selection.<br/>
[*] Fixed missing checkbox in all selection dialogs.<br/>
[*] Optimized accounts list UI.<br/>
[*] Account Blotter code unified with main Blotter..<br/>
</p>

<p><b>2.0.9</b></p>
<p>
[*] Fixed back button issues.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.PopupMenu;
import android.widget.TextView;
Expand Down Expand Up @@ -545,7 +544,7 @@ protected void applyFilter() {
}

private void setScreenTitle(String title) {
((LinearLayout)findViewById(R.id.title_view)).setVisibility(View.VISIBLE);
findViewById(R.id.title_view).setVisibility(View.VISIBLE);
((TextView)findViewById(R.id.title_view_text)).setText(title);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.handydev.financier.activity

import android.os.Bundle
import androidx.fragment.app.FragmentActivity
import com.handydev.financier.R
import com.handydev.financier.fragments.BlotterFragment

class BlotterActivity2 : FragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.blotter2)
if (savedInstanceState == null) {
val blotter = BlotterFragment()
if(intent?.extras != null) {
blotter.arguments = intent.extras
}
supportFragmentManager
.beginTransaction()
.add(R.id.blotter_root_layout, BlotterFragment(), "blotter")
.commit()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ open class AccountsFragment: AbstractListFragment(R.layout.account_list) {
private fun showAccountTransactions(id: Long) {
val account = db?.getAccount(id)
if (account != null && activity != null) {
val intent = Intent(activity!!, BlotterActivity::class.java)
val intent = Intent(activity!!, BlotterActivity2::class.java)
Criteria.eq(BlotterFilter.FROM_ACCOUNT_ID, id.toString())
.toIntent(account.title, intent)
intent.putExtra(BlotterFilterActivity.IS_ACCOUNT_FILTER, true)
Expand All @@ -302,13 +302,6 @@ open class AccountsFragment: AbstractListFragment(R.layout.account_list) {
}
}

/* protected override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == AccountListActivity.VIEW_ACCOUNT_REQUEST || requestCode == AccountListActivity.PURGE_ACCOUNT_REQUEST) {
recreateCursor()
}
}*/

private fun purgeAccount() {
if(activity == null) {
return
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.handydev.financier.fragments

import android.app.Activity
import androidx.appcompat.app.AlertDialog
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
Expand All @@ -15,26 +14,27 @@ import android.view.View
import android.view.View.OnFocusChangeListener
import android.view.inputmethod.InputMethodManager
import android.widget.*
import greendroid.widget.QuickActionGrid
import greendroid.widget.QuickActionWidget
import greendroid.widget.QuickActionWidget.OnQuickActionClickListener
import androidx.appcompat.app.AlertDialog
import com.handydev.financier.R
import com.handydev.financier.activity.*
import com.handydev.financier.adapter.BlotterListAdapter
import com.handydev.financier.adapter.TransactionsListAdapter
import com.handydev.financier.base.AbstractListFragment
import com.handydev.financier.blotter.AccountTotalCalculationTask
import com.handydev.financier.blotter.BlotterFilter
import com.handydev.financier.blotter.BlotterTotalCalculationTask
import com.handydev.financier.blotter.TotalCalculationTask
import com.handydev.financier.dialog.TransactionInfoDialog
import com.handydev.financier.filter.WhereFilter
import com.handydev.financier.model.AccountType
import com.handydev.financier.protocol.IOTransactionDeleteListener
import com.handydev.financier.utils.IntegrityCheckRunningBalance
import com.handydev.financier.utils.MenuItemInfo
import com.handydev.financier.utils.MyPreferences
import com.handydev.financier.view.NodeInflater
import com.handydev.financier.base.AbstractListFragment
import com.handydev.financier.protocol.IOTransactionDeleteListener
import greendroid.widget.QuickActionGrid
import greendroid.widget.QuickActionWidget
import greendroid.widget.QuickActionWidget.OnQuickActionClickListener

open class BlotterFragment: AbstractListFragment(R.layout.blotter), IOTransactionDeleteListener {
companion object {
Expand Down Expand Up @@ -104,7 +104,7 @@ open class BlotterFragment: AbstractListFragment(R.layout.blotter), IOTransactio
intent.putExtra(BlotterFilterActivity.IS_ACCOUNT_FILTER, isAccountBlotter && blotterFilter.accountId > 0)
startActivityForResult(intent, FILTER_REQUEST)
}
totalText = view?.findViewById<TextView>(R.id.total)
totalText = view?.findViewById(R.id.total)
totalText!!.setOnClickListener { showTotals() }
val intent: Intent = activity!!.intent
blotterFilter = WhereFilter.fromIntent(intent)
Expand All @@ -125,7 +125,7 @@ open class BlotterFragment: AbstractListFragment(R.layout.blotter), IOTransactio
bTemplate!!.visibility = View.VISIBLE
bTemplate!!.setOnClickListener { createFromTemplate() }
}
bSearch = view?.findViewById<ImageButton>(R.id.bSearch)
bSearch = view?.findViewById(R.id.bSearch)
bSearch!!.setOnClickListener {
val searchText = view?.findViewById<EditText>(R.id.search_text)
val searchLayout = view?.findViewById<FrameLayout>(R.id.search_text_frame)
Expand Down Expand Up @@ -209,6 +209,11 @@ open class BlotterFragment: AbstractListFragment(R.layout.blotter), IOTransactio
}
}

private fun setScreenTitle(title: String) {
view?.findViewById<LinearLayout>(R.id.title_view)?.visibility = View.VISIBLE
view?.findViewById<TextView>(R.id.title_view_text)?.text = title
}

private fun onPopupMenuSelected(id: Int) {
if(activity == null) {
return
Expand Down Expand Up @@ -506,13 +511,13 @@ open class BlotterFragment: AbstractListFragment(R.layout.blotter), IOTransactio
}
val title = blotterFilter.title
if (title != null) {
//setScreenTitle(getString(R.string.blotter) + " : " + title)
setScreenTitle(getString(R.string.blotter) + " : " + title)
}
updateFilterImage()
}

/*private fun setScreenTitle(title: String) {
val container = view?.findViewById<LinearLayout>(R.id.title_view)
val lcontainer = view?.findViewById<LinearLayout>(R.id.title_view)
container?.visibility = if(title.isEmpty()) View.GONE else View.VISIBLE
view?.findViewById<TextView>(R.id.title_view_text)?.text = title
}*/
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/blotter2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/blotter_root_layout"
>
</FrameLayout>

0 comments on commit 4eaa23d

Please sign in to comment.