- TableLayout t = new TableLayout(this);
- TableRow r = new TableRow(this);
- r.setLayoutParams(new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
- if (even)
- r.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg, getTheme()));
+ skippingAccountName = null;
+ }
+
+ boolean is_hidden = cursor.getInt(1) == 1;
+
+ if (!showingHiddenAccounts && is_hidden) {
+ skippingAccountName = acc_name;
+ continue;
+ }
+
+ LinearLayout r = new AccountRowLayout(this, acc_name);
+ r.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+ r.setGravity(Gravity.CENTER_VERTICAL);
+ r.setPadding(getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), dp2px(3), getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), dp2px(4));
+ r.setMinimumHeight(rowHeight);
+
+ if (even) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ r.setBackgroundColor(
+ getResources().getColor(R.color.table_row_even_bg, getTheme()));
+ }
+ else {
+ r.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg));
+ }
+ }