AAdapter

Additional

Language
Java
Version
v1.0.2 (May 19, 2017)
Created
May 18, 2017
Updated
May 19, 2017 (Retired)
Owner
Mohamed Hamdan (mnayef95)
Contributor
Mohamed Hamdan (mnayef95)
1
Activity
Badge
Generate
Download
Source code

AAdapter

Add footer and header & item click listener to recyclerview

Project-level build.gradle (<project>/build.gradle):

repositories {
 ...
 maven { url 'https://jitpack.io' }
}

App-level build.gradle (<project>/<app-module>/build.gradle):

compile 'com.github.mnayef:AAdapter:v1.0.1'

JAVA :

recycler = (RecyclerView) findViewById(R.id.recycler);
footer = LayoutInflater.from(this).inflate(R.layout.footer, null);
header = LayoutInflater.from(this).inflate(R.layout.header, null);

aAdapter = new AAdapter(new TestAdapter());
aAdapter.addFooter(footer);
aAdapter.addHeader(header);

recycler.setLayoutManager(new LinearLayoutManager(this));
recycler.setAdapter(aAdapter);