(Download the source code of the navigation bar on the top of an Android qq like chat interface, a view holder about testing, and this kind of view is about returning a view. Since this view has no other logic management except presentation, it only passes a LayoutInflator
In the actual use process, you can pass the required parameters, the width of the peripheral frame, that is, the width of coverImg, based on your specific conditions. Because coverImg needs to wrap the itemImg and itemName, that is, it is made strictly according to the size of the data map produced by the artist. When the left gap interval of the final element is greater than 0, the right gap interval of the screen is made. TODO makes the cover move to the specified index position, Then check whether monitoring events are set. If so, execute the logic of monitoring events)