Skip to main content

Posts

Showing posts from December, 2013

Featured post

Simple RecyclerView example with filter option in Android

Hi Guys, Maybe you all are expert in terms of using RecyclerView in android. This blog is simple example for using filter option with RecyclerView adapter. As for now you will instantiate RecyclerView and set the adapter to RecyclerView as following way. RecyclerView list = (RecyclerView) findViewById(R.id.list); list.setLayoutManager(new LinearLayoutManager(this)); list.setHasFixedSize(true); ArrayList&ltNumber&gt numbers = new ArrayList&lt&gt(); String ONEs[] = {"ZERO", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN"}; String TENs[] = {"ZERO", "TEN", "TWENTY", "THIRTY", "FOURTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY", "HUNDRED"}; String HUNDREDS[] = {"ZERO", "HUNDRED", "TWO HUND...

Using db4o in Android

db4o is a Object oriented database. This tutorial was written to get you started with db4o as quickly as possible. Before you start, please make sure that you have downloaded the latest db4o distribution from the db4objects website . In this tutorial I have used db4o-8.0.184.15484-all-java5.jar from dropbox.com Then kindly put the file in your project's lib folder and configure project's Build Path . Enough, Let us start !!! 1. Create a class to configure db4o. I named it as Db4oHelper. Code: Db4oHelper.java import java.io.IOException; import android.content.Context; import android.util.Log; import com.db4o.Db4oEmbedded; import com.db4o.ObjectContainer; import com.db4o.config.EmbeddedConfiguration; public class Db4oHelper { private static ObjectContainer oc = null; private Context context; /** * @param ctx */ public Db4oHelper(Context ctx) { context = ctx; } /** * Create, open and close the database */ public ObjectContainer db() { try { ...