From: Damyan Ivanov Date: Tue, 16 Apr 2019 17:43:16 +0000 (+0300) Subject: drop unused code X-Git-Tag: v0.10.0~109 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=ad9d5f1bd733759a41b0acc9841900e8a901553d drop unused code --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 40bf49c6..3b14b422 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -697,31 +697,6 @@ public class MainActivity extends ProfileThemedActivity { .startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate_180_back)); profileListHeadMore.setVisibility(View.GONE); } - public void onProfileRowClicked(View v) { - Data.setCurrentProfile((MobileLedgerProfile) v.getTag()); - } - public void enableProfileModifications() { - profileModificationEnabled = true; - ViewGroup profileList = findViewById(R.id.nav_profile_list); - for (int i = 0; i < profileList.getChildCount(); i++) { - View aRow = profileList.getChildAt(i); - aRow.findViewById(R.id.profile_list_edit_button).setVisibility(View.VISIBLE); - aRow.findViewById(R.id.profile_list_rearrange_handle).setVisibility(View.VISIBLE); - } - // FIXME enable rearranging - - } - public void disableProfileModifications() { - profileModificationEnabled = false; - ViewGroup profileList = findViewById(R.id.nav_profile_list); - for (int i = 0; i < profileList.getChildCount(); i++) { - View aRow = profileList.getChildAt(i); - aRow.findViewById(R.id.profile_list_edit_button).setVisibility(View.GONE); - aRow.findViewById(R.id.profile_list_rearrange_handle).setVisibility(View.INVISIBLE); - } - // FIXME disable rearranging - - } public void onAccountSummaryRowViewClicked(View view) { ViewGroup row; if (view.getId() == R.id.account_expander) row = (ViewGroup) view.getParent().getParent(); diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/dummy/DummyContent.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/dummy/DummyContent.java deleted file mode 100644 index d0d1a6a1..00000000 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/dummy/DummyContent.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright © 2019 Damyan Ivanov. - * This file is part of MoLe. - * MoLe is free software: you can distribute it and/or modify it - * under the term of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your opinion), any later version. - * - * MoLe is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License terms for details. - * - * You should have received a copy of the GNU General Public License - * along with MoLe. If not, see . - */ - -package net.ktnx.mobileledger.ui.profiles.dummy; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Helper class for providing sample content for user interfaces created by - * Android template wizards. - *

- * TODO: Replace all uses of this class before publishing your app. - */ -public class DummyContent { - - /** - * An array of sample (dummy) items. - */ - public static final List ITEMS = new ArrayList(); - - /** - * A map of sample (dummy) items, by ID. - */ - public static final Map ITEM_MAP = new HashMap(); - - private static final int COUNT = 25; - - static { - // Add some sample items. - for (int i = 1; i <= COUNT; i++) { - addItem(createDummyItem(i)); - } - } - - private static void addItem(DummyItem item) { - ITEMS.add(item); - ITEM_MAP.put(item.id, item); - } - - private static DummyItem createDummyItem(int position) { - return new DummyItem(String.valueOf(position), "Item " + position, makeDetails(position)); - } - - private static String makeDetails(int position) { - StringBuilder builder = new StringBuilder(); - builder.append("Details about Item: ").append(position); - for (int i = 0; i < position; i++) { - builder.append("\nMore details information here."); - } - return builder.toString(); - } - - /** - * A dummy item representing a piece of content. - */ - public static class DummyItem { - public final String id; - public final String content; - public final String details; - - public DummyItem(String id, String content, String details) { - this.id = id; - this.content = content; - this.details = details; - } - - @Override - public String toString() { - return content; - } - } -}