# ohos-parallax-recyclerview **Repository Path**: baijuncheng-open-source/ohos-parallax-recyclerview ## Basic Information - **Project Name**: ohos-parallax-recyclerview - **Description**: 一个条目滑动点击,点击按钮切换adpater,条目内容更换的库 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-01 - **Last Updated**: 2024-06-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ohos-parallax-recycleview ============================ the listcontainer with layoutmanger ,you can change adppter with other style items **Integration** ==== Gradle: ```gradle implementation 'com.gitee.baijuncheng-open-source:ohos-parallax-recyclerview:1.0.0' ``` **Preview** **USAGE** (Example project - https://gitee.com/baijuncheng-open-source/ohos-parallax-recyclerview) - Create your object list and pass it to the constructor of `ParallaxRecyclerAdapter` ```java List myContent = new ArrayList(); // or another object list ParallaxRecyclerAdapter adapter = new ParallaxRecyclerAdapter(content) { @Override public void onBindViewHolderImpl(ViewHolder viewHolder, ParallaxRecyclerAdapter adapter, int i) { // If you're using your custom handler (as you should of course) // you need to cast viewHolder to it. ((MyCustomViewHolder) viewHolder).textView.setText(myContent.get(i)); // your bind holder routine. } @Override public RecyclerView.ViewHolder onCreateViewHolderImpl(ComponentContainer viewGroup, final ParallaxRecyclerAdapter adapter, int i) { // Here is where you inflate your row and pass it to the constructor of your ViewHolder return new MyCustomViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.myRow, viewGroup, false)); } @Override public int getItemCountImpl(ParallaxRecyclerAdapter adapter) { // return the content of your array return myContent.size(); } }; ``` Changelog **v1.0.0** - add library ## License ``` Copyright (c) 2014 Pedro Oliveira Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```