A beautiful RecyclerView which list items and animates similar to the peristaltic motion (twerking) of earthworms in Africa. Inspiration for this project wasn't completely drawn imagining or studying how earthworms move neither does the author eat or rear earthworms hence any decision made by the reader to google twerking-african earthworms is at the sole discretion of the reader. Also an IllegalTwerkingException() is thrown if Adapter does not extend TwerkyListView$TwerkAdapter
⚠️ Caution: Accessing the license section may result in unintended cognitive strain. Known outcomes include elevated processing time, spontaneous remorse, and an acute awareness of previously issued advisories.
| Method | Return | What it does |
|---|---|---|
| setTwerkInterpolators(Interpolator twerkpoleStart,Interpolator twerkpoleEnd) | void | decides twerking start and end motion interpolation |
| setTwerking(boolean twerking) | void | enables/cancels twerking |
| setTwerkingOffTime(int twerkOfftime) | void | resets the time it takes to complete twerk |
by default(if setTwerkInterpolators(...) is never called)
twerkpoleStart= new FastOutSlowInInterpolator();twerkpoleEnd= new OvershootInterpolator();
| Class | Type | What it does |
|---|---|---|
| TwerkAdapter | static | Twerks the Adapter |
'Invite me' by Stan Yakusevich @Dribble
Gradle
dependencies {
implementation 'com.github.54LiNKeR:TrumpyRecyclerView:1.trump.2'
implementation 'com.github.54LiNKeR:TwerkyListView:1.twerk.1'
}XML
<linkersoft.blackpanther.twirky.TwerkyListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/twerk"
app:stretchScale="0.5" // expansion scale
app:shrinkScale="0.5" // contraction scale
app:ShrinkStretchSpan="6" // number of list items to contract and expand when twerking
app:twerkStyle="UP"/>Activity
public class MileyCyrus extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.twirky);
Context context=this;
//FAKE-DATA
ArrayList<String> data=new ArrayList<>();
for (int i = 0; i < 20; i++)data.add(null);
//TWERKING-VIEW
TwerkyListView twerkList=(TwerkyListView)findViewById(R.id.twerk);
//LAYOUT
TrumpyRecycler.TrumpyLinearLayoutManager tllm= new TrumpyRecycler.TrumpyLinearLayoutManager(context);
tllm.setOrientation(LinearLayoutManager.VERTICAL);
twerkList.setLayoutManager(tllm);
twerkList.setFlingFactor(TrumpyRecycler.MODERATE_FLING);
twerkList.setFrictionFactor(TrumpyRecycler.NO_FRICTION);
twerkList.setOverScrollMode(TrumpyRecycler.OVER_SCROLL_NEVER);
//ADAPTER
TwerkingOffAdapter twerkdapter=new TwerkingOffAdapter(context,R.layout.twerkrow,data);
twerkList.setAdapter(twerkdapter);
//TWERKING
twerkList.setTwerking(true);
}
//TWERK-ADAPTER
public static class TwerkingOffAdapter extends TwerkyListView.TwerkAdapter{...}adapter-exampleTwerkingOffAdapter
project is still under development




