Skip to content

Commit

Permalink
Remove CSV accounts exports from the UI - only transactions will be e…
Browse files Browse the repository at this point in the history
…xported
  • Loading branch information
codinguser committed Jun 4, 2018
1 parent 5764f86 commit 6788412
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public class ExportFormFragment extends Fragment implements
@BindView(R.id.radio_ofx_format) RadioButton mOfxRadioButton;
@BindView(R.id.radio_qif_format) RadioButton mQifRadioButton;
@BindView(R.id.radio_xml_format) RadioButton mXmlRadioButton;
@BindView(R.id.radio_csv_accounts_format) RadioButton mCsvAccountsRadioButton;
@BindView(R.id.radio_csv_transactions_format) RadioButton mCsvTransactionsRadioButton;

@BindView(R.id.radio_separator_comma_format) RadioButton mSeparatorCommaButton;
Expand Down Expand Up @@ -219,15 +218,9 @@ private void onRadioButtonClicked(View view){
mCsvOptionsLayout.setVisibility(View.GONE);
break;

case R.id.radio_csv_accounts_format:
mExportFormat = ExportFormat.CSVA;
mExportWarningTextView.setText("");
mExportDateLayout.setVisibility(View.GONE);
mCsvOptionsLayout.setVisibility(View.VISIBLE);
break;
case R.id.radio_csv_transactions_format:
mExportFormat = ExportFormat.CSVT;
mExportWarningTextView.setText("");
mExportWarningTextView.setText("Exports registered transactions as CSV");
mExportDateLayout.setVisibility(View.GONE);
mCsvOptionsLayout.setVisibility(View.VISIBLE);
break;
Expand All @@ -254,8 +247,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
bindViewListeners();

String[] export_format_strings = getResources().getStringArray(R.array.export_formats);
mCsvAccountsRadioButton.setText(export_format_strings[3]);
mCsvTransactionsRadioButton.setText(export_format_strings[4]);
mCsvTransactionsRadioButton.setText(export_format_strings[3]);

return view;
}
Expand Down Expand Up @@ -506,7 +498,6 @@ public void onClick(View view) {
mOfxRadioButton.setOnClickListener(radioClickListener);
mQifRadioButton.setOnClickListener(radioClickListener);
mXmlRadioButton.setOnClickListener(radioClickListener);
mCsvAccountsRadioButton.setOnClickListener(radioClickListener);
mCsvTransactionsRadioButton.setOnClickListener(radioClickListener);

mSeparatorCommaButton.setOnClickListener(radioClickListener);
Expand All @@ -518,7 +509,6 @@ public void onClick(View view) {
case QIF: mQifRadioButton.performClick(); break;
case OFX: mOfxRadioButton.performClick(); break;
case XML: mXmlRadioButton.performClick(); break;
case CSVA: mCsvAccountsRadioButton.performClick(); break;
case CSVT: mCsvTransactionsRadioButton.performClick(); break;
}

Expand Down
9 changes: 2 additions & 7 deletions app/src/main/res/layout/fragment_export_form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:gravity="center_vertical"
android:orientation="vertical">
android:orientation="horizontal">

<RadioButton android:id="@+id/radio_qif_format"
android:layout_width="wrap_content"
Expand All @@ -93,16 +93,11 @@
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:text="XML"/>
<RadioButton android:id="@+id/radio_csv_accounts_format"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:text="CSV-acc"/>
<RadioButton android:id="@+id/radio_csv_transactions_format"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:text="CSV-trans"/>
android:text="CSV"/>
</RadioGroup>
</LinearLayout>
<LinearLayout
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@
<item>QIF</item>
<item>OFX</item>
<item>XML</item>
<item>CSV-accounts</item>
<item>CSV-transactions</item>
<item>CSV</item>
</string-array>
<!-- Default title for color picker dialog [CHAR LIMIT=30] -->
<string name="color_picker_default_title">Select a Color</string>
Expand Down

0 comments on commit 6788412

Please sign in to comment.