E
E
Eugene2019-10-05 09:49:26
Android
Eugene, 2019-10-05 09:49:26

Can't implement the Single Responsibility Principle correctly?

Good morning. Increasingly, I encounter the problem that I can not correctly determine the only responsibility of adapters and fragments. For example, there is an adapter for employees and an adapter for clients, it accepts different models, but their field filling is the same and therefore the same viewholders, and it seems that we can use 1 adapter viewholder and layout, but there may be such a situation that the design or business wants to change the employee or client, and then you need to rewrite. Same story with fragments. And I don't understand how to resolve this situation. Therefore, I make my own class for each entity, and I put something similar in the parent class, how much I don’t know correctly, can you judge?
I forgot to add, but business fragments have different logic.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
synapse_people, 2019-10-05
@synapse_people

interfaces will help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question