Tag:Adapter

  • Well written adapter mode, decoration mode

    Time:2021-3-14

    I hope you can enjoy it preface There are three typesFactory modelIn addition to factory mode, there are other modes of interview, which I will talk about this timeAdapter mode,Decoration modeIt’s still the old rule. Put it in theIt’s in. JavaCopy and serve Adapter mode Adapter modes are divided intoClass Adapter andobject adapter . The […]

  • Basic problems of Java

    Time:2021-2-22

    1、long(8) and float(4)Who is the largest value range? becauselongyes8Bytes,floatyes4It’s a byte. As a rule, we can’t move up. But becausefloatIt is a floating-point type, and its calculation method is different from that of shaping ⅠFirst of alllongCan be automatically converted tofloat; For example: Long number=88888;//88888 Float newNumber=number;//88888.0 Ⅱ、longRange of values indicated:2^63-1 floatRange of values indicated:3.4 […]

  • Android serial 11 – excellent practice of news app

    Time:2021-2-11

    1、 A best practice of using fragmentation is that we write a news app 1. First, create a news class   package com.example.fragmentbestpractice; ​ public class News { private String title; private String content; ​ public String getTitle() { return title; } ​ public void setTitle(String title) { this.title = title; } ​ public String […]

  • Adapter pattern of design pattern

    Time:2021-1-22

    Adapter pattern of design pattern Intro Adapter mode(Adapter)To adapt the interface of a class to what users expect. An adaptation allows classes that usually cannot work together because of incompatible interfaces to work together by wrapping their own interfaces in an existing class. Also known as wrapper mode. Usually, this class is external and cannot […]

  • Introduction to Android | Tangram dynamic page (2)

    Time:2021-1-3

    This series of articles mainly introduces the experience and principle of using the open source Tangram framework of tmall teamTangramThe bottom layer is based on vlayout, so it will be explained briefly. This series will be introduced according to the following outline: Demand background Introduction to Tangram and vlayout Use of Tangram Vlayout principle Tangram […]

  • The way of Android | Tangram dynamic page (4) vlayout principle

    Time:2020-12-31

    This series of articles mainly introduces the experience and principle of using the open source Tangram framework of tmall teamTangramThe bottom layer is based on vlayout, so it will be explained briefly. This series will be introduced according to the following outline: Demand background Introduction to Tangram and vlayout Use of Tangram Vlayout principle Tangram […]

  • Android | Tangram dynamic page Road (5) Tangram principle

    Time:2020-12-19

    This series of articles mainly introduces the use experience and principle of the open source Tangram framework of tmall teamTangramThe bottom layer is based on vlaayout, so it will also be explained briefly. This series will be introduced according to the following outline: Demand background Introduction to Tangram and vlayout Use of Tangram Vlayout principle […]

  • PHP design pattern adapter mode code examples (10)

    Time:2020-12-15

    objective By converting the interface of one class to another for compatibility, the adapter enables classes that could not be used together because of different interfaces to work together. The adapter provides a compatible interface to the user by converting the original interface. example Client database adapter Use multiple different network services and adapters to […]

  • Rendering Vue to an embedded LCD screen

    Time:2020-12-9

    preface I saw sprite’s rendering of react to embedded LCD screen. I thought it was very interesting. React can be rendered to embedded LCD. Is Vue OK? So what we have to do in this paper is: As the title shows, the Vue is rendered to an embedded LCD screen. The LCD screen used here […]

  • EasyToLearnDesignPattern

    Time:2020-12-8

    Easy to use design mode GITHUB:https://github.com/Fisher-Joe/EasyToLearnDesignPattern This article aims to use the simplest language, the simplest code to let people learn design patterns (at least me) explain: All the contents of this paper are based on the re collation of the cited articles, and the subsequent versions will be expanded and enriched on this basis; […]

  • PHP design pattern

    Time:2020-12-8

    Three basic design modes Factory pattern: factory methods or classes generate objects rather than new directly in code Singleton mode: allows only one object of a class to be created and provides a global access Registration mode: global shared and interactive objects Adapter mode Adapter pattern: you can encapsulate disparate function interfaces into a unified […]

  • Using kotlin to develop Android application (11) – viewpager of sliding view

    Time:2020-12-6

    Viewpager of sliding view Slide view allows you to navigate between sibling screens, such as tabs, by horizontal finger gestures or swiping. This navigation mode is also known as horizontal paging. Use here androidx.viewpager2 . widget.ViewPager2 A brief case The layout of tablayout + viewpager2 is as follows: <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical”> <com.google.android.material.tabs.TabLayout android:id=”@+id/tab_layout” […]