RecyclerView custom LayoutManager practice from 0 to 1

Most of the LayoutManagers involved in the RecyclerView page can basically be solved with the LinearLayoutManager and GridLayoutManager provided by the system, but in some special scenarios we still need to customize the LayoutManager. I have basically never written by myself before. I read various source codes and articles on the Internet. It took me […]

Can infinite scroll, supports automatic scrolling, and sets the LayoutManger to scroll for one screen time

LayoutManger that can scroll infinitely, supports automatic scrolling, and sets the scrolling time for one screen package com.trs.v7.home.toutiao_v2.provider.layout_manager; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.View; import android.view.ViewGroup; import androidx.recyclerview.widget.PagerSnapHelper; import androidx.recyclerview.widget.RecyclerView; import com.trs.news.R; public class LooperLayoutManager extends RecyclerView.LayoutManager {<!– –> private static final String TAG = “LooperLayoutManager”; private boolean looperEnable = true; private RecyclerView […]

UTM v4.3.5 – Elegant virtualization of Windows, Linux and macOS with QEMU on macOS

UTM v4.3.5 – Elegant virtualization of Windows, Linux and macOS with QEMU on macOS Virtualize Windows, Linux and Unix in iOS Please visit the original link: https://sysin.org/blog/utm-4/ to view the latest version. Original works, please keep the source for reprinting. Author homepage: sysin.org The bottom layer of UTM 4 is based on QEMU, which safely […]

Convert WGS_1984_UTM, WGS_1984_Mercator coordinates to latitude and longitude coordinates python

1. What are the PROJECTION of remote sensing images? There are many common projection types for remote sensing images, and which projection method to choose depends on the characteristics and usage requirements of the data. Some common remote sensing imagery projection types are listed below: UTM (Universal Transverse Mercator) projection: One of the most common […]

After understanding, you can basically master the custom LayoutManager

Function description: 1: Support caching; 2: Solve the problem of item dragging; 3: Custom Jiugongge pagination problem. /** * @Author chentao 0000668668 * @Time 2022/12/23 * @Description Custom implementation of horizontal and vertical scrolling LayoutManager with cache * <p> */ public class LinearLayoutManagerX extends RecyclerView. LayoutManager { @RecyclerView. Orientation protected int mOrientation; protected int mOffsetXY; […]

TabLayout+ViewPager2 (Fragment) encapsulation based on TabLayoutMediator

Realize function 1. TabLayout + ViewPager2 (Fragments) 2. Tab Layout ①. Dynamically set TabView (setTabViewResId), TextView dynamically set IdseTabViewTextResId(), and get TextView object ②. By default, all Fragmnet preloads, which can be controlled by setOffscreenPageLimit(boolean) ③. UserTabConfigurationStrategy monitors and obtains all TabView initialization objects ④, UserTabSelectedListener, get the callback when TabLayout is switched, including the […]

TabLayoutMediator realizes the binding sliding linkage of TabLayout+RecyclerView

Background After the release of ViewPager2, TabLayout added a very useful intermediate class — TabLayoutMediator to realize the binding and sliding linkage effect between TabLayout and ViewPager2. Today we imitate TabLayoutMediator to realize the anchor point positioning function of a TabLayout and RecyclerView. The effect is as follows: Complete code address: TabLayoutMediator2 General idea The […]

UTM 4.3 released: Elegant virtualization of Windows, Linux and macOS with QEMU on macOS

UTM 4.3 released: Elegant virtualization of Windows, Linux and macOS with QEMU on macOS Virtualize Windows, Linux and Unix in iOS Please visit the original link: https://sysin.org/blog/utm-4/ to view the latest version. Original works, please keep the source for reprinting. Author homepage: sysin.org The bottom layer of UTM 4 is based on QEMU, which safely […]