diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-04-11 16:02:11 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-04-11 16:02:11 +0300 |
commit | 37d0ed3d820fe97ffb6ddf20778d08eb9c545de2 (patch) | |
tree | b5d7a27a914f3e16d9f22bd27e6c5df29cfd2de1 /app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java | |
parent | 69b2337db8f02ce60fe60b82ea50b302b9ee1771 (diff) |
#317 Adjust theme for each account
EditTexts
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java index 34aebb529..cbb6e53f3 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/comments/CardCommentsFragment.java @@ -13,17 +13,20 @@ import androidx.fragment.app.Fragment; import java.util.Date; +import it.niedermann.nextcloud.deck.Application; import it.niedermann.nextcloud.deck.databinding.FragmentCardEditTabCommentsBinding; import it.niedermann.nextcloud.deck.model.ocs.comment.DeckComment; import it.niedermann.nextcloud.deck.persistence.sync.SyncManager; import static android.view.View.GONE; import static android.view.View.VISIBLE; +import static it.niedermann.nextcloud.deck.ui.BrandedActivity.applyBrandToEditText; +import static it.niedermann.nextcloud.deck.ui.BrandedActivity.applyBrandToFAB; import static it.niedermann.nextcloud.deck.ui.card.CardAdapter.BUNDLE_KEY_ACCOUNT_ID; import static it.niedermann.nextcloud.deck.ui.card.CardAdapter.BUNDLE_KEY_CAN_EDIT; import static it.niedermann.nextcloud.deck.ui.card.CardAdapter.BUNDLE_KEY_LOCAL_ID; -public class CardCommentsFragment extends Fragment implements CommentEditedListener { +public class CardCommentsFragment extends Fragment implements Application.Branded, CommentEditedListener { private FragmentCardEditTabCommentsBinding binding; private SyncManager syncManager; @@ -110,4 +113,22 @@ public class CardCommentsFragment extends Fragment implements CommentEditedListe public void onCommentEdited(Long id, String comment) { syncManager.updateComment(accountId, localId, id, comment); } + + @Override + public void onResume() { + super.onResume(); + Application.registerBrandedComponent(requireContext(), this); + } + + @Override + public void onPause() { + Application.deregisterBrandedComponent(this); + super.onPause(); + } + + @Override + public void applyBrand(int mainColor, int textColor) { + applyBrandToEditText(mainColor, textColor, binding.message); + applyBrandToFAB(mainColor, textColor, binding.fab); + } } |