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
Android solves the overlapping problem of Fragment using replace method
Android solves the overlapping problem of Fragment using replace method
Today, when using Fragment for replace switching, I found that there was no response:The layout is like this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
...
Posted by mgason on Mon, 06 Apr 2020 05:46:04 +0200
ReactNative: ReactContext!=Activity
In the project, there is a bookshelf View provided to react native for use. It monitors the corresponding life cycle of react native to refresh the interface. The code is as follows
//ViewManager
public class BookShelfManager extends SimpleViewManager<BookShelfView> {
private BookShelfView mBookShelfView;
@Override
...
Posted by rinjani on Fri, 03 Apr 2020 10:46:41 +0200
Solutions to conflicts when Android Scrollview nesting ViewPager + Fragment
Start with the final rendering (the image is not very clear):
The top ad uses ConvenientBanner, which has little to do with this article. Only show the effect.
In fact, we use NestedScrollView to achieve the above effect. There are several problems when nesting viewpagers with NestedScrollView:
1. Fragment s in vi ...
Posted by Bikkebakke on Fri, 03 Apr 2020 00:03:51 +0200
Removing fragmentation of mongodb fragmentation cluster
Refer to official documents: http://www.mongoing.com/docs/tutorial/remove-shards-from-cluster.html'>http://www.mongoing.com/docs/tutorial/remove-shards-from-cluster.html
1. Check whether balancer is on
mongos> sh.getBalancerState()
true
2. Find fragment id to delete
mongos> sh.status()
--- Sharding Status ---
s ...
Posted by Idri on Thu, 02 Apr 2020 01:50:13 +0200
Customize your own dynamic application authority Library
Why to customize your own dynamic application authority Library
After Android 6.0, Android system requires dynamic application for sensitive permissions. This user brings great convenience, but also brings greater challenges to developers. The official API is provided for developers to use, but it's a bit cumbersome to use. There are also many ...
Posted by run2web on Sun, 29 Mar 2020 17:54:24 +0200