X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Fprofiles%2FProfileDetailFragment.java;h=46a0ea6e6abbe7dcd3c9dca6e24e81f5db89f4a9;hp=ee01017e792eac8fc26d3fdbaf24a7797c34b347;hb=90a2528c5da0a524701fade91d1a2a45e0fccdc5;hpb=236e4419be011caf7f533edaa9cc1d607f70f523 diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java index ee01017e..46a0ea6e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java @@ -82,7 +82,6 @@ public class ProfileDetailFragment extends Fragment { private MobileLedgerProfile mProfile; private TextView url; private TextView defaultCommodity; - private View defaultCommodityLayout; private boolean defaultCommoditySet; private TextInputLayout urlLayout; private LinearLayout authParams; @@ -94,11 +93,9 @@ public class ProfileDetailFragment extends Fragment { private TextView profileName; private TextInputLayout profileNameLayout; private TextView preferredAccountsFilter; - private TextInputLayout preferredAccountsFilterLayout; private View huePickerView; private View insecureWarningText; private TextView futureDatesText; - private View futureDatesLayout; private TextView apiVersionText; private boolean syncingModelFromUI = false; /** @@ -238,14 +235,14 @@ public class ProfileDetailFragment extends Fragment { urlLayout = context.findViewById(R.id.url_layout); - defaultCommodityLayout = context.findViewById(R.id.default_commodity_layout); - defaultCommodityLayout.setOnClickListener(v -> { - CurrencySelectorFragment cpf = CurrencySelectorFragment.newInstance( - CurrencySelectorFragment.DEFAULT_COLUMN_COUNT, false); - cpf.setOnCurrencySelectedListener(model::setDefaultCommodity); - final AppCompatActivity activity = (AppCompatActivity) v.getContext(); - cpf.show(activity.getSupportFragmentManager(), "currency-selector"); - }); + context.findViewById(R.id.default_commodity_layout) + .setOnClickListener(v -> { + CurrencySelectorFragment cpf = CurrencySelectorFragment.newInstance( + CurrencySelectorFragment.DEFAULT_COLUMN_COUNT, false); + cpf.setOnCurrencySelectedListener(model::setDefaultCommodity); + final AppCompatActivity activity = (AppCompatActivity) v.getContext(); + cpf.show(activity.getSupportFragmentManager(), "currency-selector"); + }); Switch showCommodityByDefault = context.findViewById(R.id.profile_show_commodity); showCommodityByDefault.setOnCheckedChangeListener( @@ -269,7 +266,6 @@ public class ProfileDetailFragment extends Fragment { defaultCommodity = context.findViewById(R.id.default_commodity_text); - futureDatesLayout = context.findViewById(R.id.future_dates_layout); futureDatesText = context.findViewById(R.id.future_dates_text); context.findViewById(R.id.future_dates_layout) .setOnClickListener(v -> { @@ -359,8 +355,6 @@ public class ProfileDetailFragment extends Fragment { preferredAccountsFilter.setText(text); }); hookTextChangeSyncRoutine(preferredAccountsFilter, model::setPreferredAccountsFilter); - preferredAccountsFilterLayout = - context.findViewById(R.id.preferred_accounts_accounts_filter_layout); insecureWarningText = context.findViewById(R.id.insecure_scheme_text);