X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2FAccountSummary.java;h=12436d5cc39c0af11f4d5a5f3d3188971b07f5d1;hp=8593430010bca00f3e51ae3c01cc5a244a6c8f3f;hb=e5f50a712c279e7c6ffb701ab3b0013ca4ad5e21;hpb=b9a1a49246efbddaa6f41256b5ea4dec0aef8e3c diff --git a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java index 85934300..12436d5c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java +++ b/app/src/main/java/net/ktnx/mobileledger/AccountSummary.java @@ -16,6 +16,7 @@ import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.util.TypedValue; +import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -204,6 +205,7 @@ public class AccountSummary extends AppCompatActivity { TableLayout t = new TableLayout(this); TableRow r = new TableRow(this); r.setLayoutParams(new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + r.setGravity(Gravity.CENTER_VERTICAL); r.setPadding(getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), dp2px(4), getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), dp2px(4)); if (even) r.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg, getTheme())); @@ -217,6 +219,7 @@ public class AccountSummary extends AppCompatActivity { TextView amt_tv = new TextView(this, null, R.style.account_summary_amounts); amt_tv.setLayoutParams(new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1f)); amt_tv.setTextAlignment(EditText.TEXT_ALIGNMENT_VIEW_END); + amt_tv.setGravity(Gravity.CENTER); amt_tv.setMinWidth(dp2px(40f)); StringBuilder amt_text = new StringBuilder(); try (Cursor cAmounts = db.rawQuery("SELECT currency, value FROM account_values WHERE account = ?", new String[]{acc_name})) {