OneItem
Simple implementation for one item selected RecyclerView. This makes it easier to use arbitrary VideoView (such as MediaPlayer) in RecyclerView. This library includes RecyclerView.LayoutManager and Recyclerview.OnScrollListener.
Install / Use
/learn @tbrand/OneItemREADME
OneItem
Simple implementation for one item selected RecyclerView. This makes it easier to use arbitrary VideoView (such as MediaPlayer) in RecyclerView. This library includes RecyclerView.LayoutManager and Recyclerview.OnScrollListener.
You can realize auto-playing Video View like Facebook, Instagram, Twitter or other famous single column SNS by this library.
Sample
<img src="https://raw.githubusercontent.com/tbrand/OneItem/master/imgs/sample.gif" />Usage
Install
In your top level build.gradle, add
allprojects {
repositories {
...
maven { url "http://tbrandlib.bintray.com/maven" }
}
}
In your application level build.gradle, add
dependencies {
compile 'com.tbrandlib.oneitem:oneitem:0.1.0'
}
In java code
Implement OneItemListener in you RecyclerView.Adapter.
MainAdapter extends RecyclerView.Adapter implements OneItemListener{
/// This method is called when the item at the position is selected as the one item
@Override
public void selectItemAt(int position) {
}
// This method is called when the item at the position is unselected
@Override
public void unSelectItemAt(int position) {
}
}
Setup OneItem with your RecyclerView.
//MainAdapter implements OneItemListener
MainAdapter adapter = new MainAdapter(this);
RecyclerView recyclerView = (RecyclerView)findViewById(R.id.main_recycler_view);
recyclerView.setAdapter(adapter);
//You can setup one item manager like this
OneItemManager.setup(this, adapter, recyclerView);
Now you can get callback from OneItem to #selectItemAt and #unSelectItemAt.
Related Skills
qqbot-channel
351.8kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.6k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
351.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
project-overview
FlightPHP Skeleton Project Instructions This document provides guidelines and best practices for structuring and developing a project using the FlightPHP framework. Instructions for AI Coding A
