Glide (II) Request queue management

entrance The first part summarizes the life cycle management of Glide by using fm and an empty Fragment. Here we continue to see load & into. Don't talk about it // The first part analyzes with and continues to see load & into Glide.with(this).load("url").into(...); 1.1 load public RequestBuilder<Drawa ...

Posted by Pyrite on Sun, 31 May 2020 08:21:07 +0200

Android Serial 12 - Perfect news app content area

1. Write a class here to start an activity by first loading the news_we just created in the onCreateView() methodContent_The frag layout, which is unexplained, goes on to provide a refresh() method for displaying news titles and content on the interface.As you can see, here you get the title and content control of the news by the findViewById() ...

Posted by muthuraj_mr on Wed, 20 May 2020 19:19:36 +0200

react Reading Notes

Source Digging Booklet - react Actual: Design Patterns and Best Practices react design idea Property Expansion - Keep the props required by the current component and pass on other props var obj = {a: 1, b: 2, c: 3, d: 4, e: 5} const { a, ...other } = obj console.log(other) // {b: 2, c: 3, d: 4, e: 5} In react, the interface is entire ...

Posted by vulcant13 on Sat, 16 May 2020 21:57:03 +0200

Lazy loading of Fragment data

The usage scenario of Fragment lazy loading is that when a ViewPager manages multiple fragments, the "excellent" cache mechanism of ViewPager will display a Fragment and pre load some resources of two adjacent fragments (which will trigger the onCreate life cycle of adjacent fragments). Lazy loading allows u ...

Posted by nickadeemus2002 on Fri, 01 May 2020 13:46:07 +0200

onMeasure and onLayout of source code analysis of ViewPager

Reprinted from: https://www.jianshu.com/p/b0830f9b44bb We know that the ViewPager is a ViewGroup. When we customize the ViewGroup ourselves, in addition to writing at least two constructors, the onMeasure and onLayout functions basically have to be written. Today, I will study two functions of onMeasure and onLayout carefully~ onMeasure View ...

Posted by mikwit on Thu, 30 Apr 2020 18:56:28 +0200

Nested use of Card View layout in Fragment

Nested Card View layout in Fragment Look at the effect first: The layout file of Fragment is very simple, just a RecyclerView layout <android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_heigh ...

Posted by Serpent7 on Tue, 14 Apr 2020 18:52:52 +0200

The use of ref in React

Example: get the distance from the button element to the top of the page ref is written on html elements import React,{Component,Fragment} from 'react'; import Child from './Child'; class Counter extends Component{ constructor(props){ super(props); this.addCount=this.addCount.bind(this); this.state={ ...

Posted by Aebx on Tue, 14 Apr 2020 16:01:49 +0200

Simple demonstration of React component life cycle

The lifecycle of a component can be divided into three states: Mounting: real DOM insertedUpdating: being re renderedUnmounting: moved out of the real DOM   Life cycle approaches include:componentWillMount is invoked before rendering and the client is also on the server side.componentDidMount: call after the first rendering, only on the client ...

Posted by oaskedal on Tue, 14 Apr 2020 07:53:12 +0200

Props, State and render functions in React

Summary of core features of React 1. React: Declarative Development (JS or jQuery attribute command development) 2. Can coexist with other frameworks 3. Componentization 4. One-way data flow (A parent component can directly change the data of a child component, but a child component cannot directly change the data of a parent component)   Props ...

Posted by lukelee on Sun, 12 Apr 2020 19:29:20 +0200

mongoDB mongoDB cluster

mongoDB cluster introduce Solve data fragmentation and prevent data lossProduction environment needs to be deployed by scraping shards + replica sets Component route: provide entry, do not store data configserver: stores metadata information. It is recommended to use replica set shardserver: data storage service, store real data, maybe use re ...

Posted by phpjaco on Wed, 08 Apr 2020 10:17:52 +0200