+
+ LinearLayoutManager llm = new LinearLayoutManager(this);
+
+ llm.setOrientation(RecyclerView.VERTICAL);
+ root.setLayoutManager(llm);
+
+ profileListHeadMore.setOnClickListener((v) -> mProfileListAdapter.flipEditingProfiles());
+ profileListHeadCancel.setOnClickListener((v) -> mProfileListAdapter.flipEditingProfiles());
+ profileListHeadMoreAndCancel
+ .setOnClickListener((v) -> mProfileListAdapter.flipEditingProfiles());
+
+ drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
+ @Override
+ public void onDrawerClosed(View drawerView) {
+ super.onDrawerClosed(drawerView);
+ collapseProfileList();
+ }
+ });
+ }
+ private void updateLastUpdateDisplay() {
+ TextView v = findViewById(R.id.transactions_last_update);
+ Date date = Data.lastUpdateDate.get();
+ if (date == null) {
+ v.setText(R.string.transaction_last_update_never);
+ Log.d("main", "no last update date :(");
+ }
+ else {
+ final String text = DateFormat.getDateTimeInstance().format(date);
+ v.setText(text);
+ Log.d("main", String.format("Date formatted: %s", text));
+ }
+ }
+ private void profileThemeChanged() {
+ setupProfileColors();
+
+ Bundle bundle = new Bundle();
+ onSaveInstanceState(bundle);
+ // restart activity to reflect theme change
+ finish();
+ Intent intent = new Intent(this, this.getClass());
+ intent.putExtra(BUNDLE_SAVED_STATE, bundle);
+ startActivity(intent);
+ }
+ public void startEditProfileActivity(MobileLedgerProfile profile) {
+ Intent intent = new Intent(this, ProfileDetailActivity.class);
+ Bundle args = new Bundle();
+ if (profile != null) {
+ int index = Data.getProfileIndex(profile);
+ if (index != -1) intent.putExtra(ProfileDetailFragment.ARG_ITEM_ID, index);
+ }
+ intent.putExtras(args);
+ startActivity(intent, args);