Are android adapters an example of an adapter design pattern?

Do Android adapters use an adapter? The GoF Design Pattern Book describes the adapter design pattern as

An adapter template transforms a class interface into another interface that clients expect. The adapter allows classes to work together, otherwise incompatible interfaces.

There is a target interface that the adapter implements, and the client uses (expects), and there is an adaptable adapter to which the adapter delegates all requests made by the client.

I understand that his theory and the interfaces of the real-world interface adapter are not quite similar to him, but still I can’t understand which android adapters are adapting (which target interface) and to which requests actually made for are adapted.

I checked this , this and this . But not one of them explains how the Android adapter adapts to the adapter design. The 1st and 2nd answers are, in fact, somewhat controversial.

Can someone explain this?

+4
source share
2 answers

, . GoF , , , . - , . , , , , JSONObject. , ( , ).

Android, ListView RecyclerView, . . MVP.

, GoF, (, State State Machine). , , , GoF.

+7

Android- GoF. . : - , , . 3rp .

ListView Android . , , Android-. , .

+1

Source: https://habr.com/ru/post/1666679/


All Articles