Posts

Showing posts with the label appcompat-v7

Recycler view with OnClick Implementation with AppCompat

Image
In the Previous Post, We have create list of items with Recyclerview using appcompat. Now, we have implemented onclick event for each list item.. Clicking on the item , shows you a small toast with data. I have used the implementation in this project from the following link. // Implementation of onItemClick RecycleView // http://stackoverflow.com/questions/24471109/recyclerview-onclick/26196831#26196831 Please see the update Source code 

Recyclerview with Cards example in Android with AppCompat (V7)

Image
I have created a sample application to show RecyclerView and CardView in android with Latest Appcompat Library (V7 Library). Step 1: Import three Libary Project to the Eclipse 1) AppCompat 2) RecyclerView 3) CardView from the folder android-sdk\extras\android\support\v7 Step 2 : Create a new Project/download the Source from below,  and add the three Libary Projects to the MainProject as a Library Projects. CardViewActivity.java package com . pratap . cardviews1 ; import android.os.Bundle ; import android.support.v7.app.ActionBarActivity ; import android.support.v7.widget.LinearLayoutManager ; import android.support.v7.widget.RecyclerView ; import android.support.v7.widget.Toolbar ; import android.view.Menu ; import android.view.MenuItem ; import android.widget.Toast ; public class CardViewActivity extends ActionBarActivity { private Toolbar toolbar ; private RecyclerView mRecyclerView ; private RecyclerView . Adapter mAdapter ; private RecyclerView . LayoutManag