Skip to main content

Posts

Showing posts from 2013

Swipe or OnFling Event Android

This  is a simple application Demonstrating Swipe or onFling() event on ListView. you can download the source code of this project from  google drive   https://drive.google.com/folderview?id=0BySLpWhqmbbdSVB4M0hXb0VxcU0&usp=sharing click on the above link ->sign into  your  google account ->add this to your google drive -> open it in google drive and download it. 1. Following is the MainActivity (DemoSwipe.java) of the application package com.arun.demolistviewswipe; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.GestureDetector; import android.view.GestureDetector.SimpleOnGestureListener; import android.view.Menu; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Toast; public class DemoSwipe extends Activity { ListView lvCountry; String[] country = { "In

Android List View using Custom Adapter and SQLite

following is a simple applicaton to create ListView using  Custom adapter.screenshot of the application  is like this . ListView is not used in android Anymore . We use  RecyclerView  and  CardView   in Android RecyclerView Demo is available on the following link http://androidtuts4u.blogspot.in/2017/04/android-recyclerview-example.html RecyclerView with Cardview Example is available on the following link http://androidtuts4u.blogspot.in/2017/09/android-card-view-example.html The ListView below the submit button is populated using Custom Adapter.Data is stored and retrieved using SQLite databsase. you can download the source code of this project from  google drive   https://drive.google.com/folderview?id=0BySLpWhqmbbdUXE5aTNhazludjQ&usp=sharing click on the above link ->sign into  your  google account ->add this to your google drive -> open it in google drive and download it. To create a simple application like this 1.  Create a class which extends  

Android Shared Preference Tutorial

The sharedPreferernce  provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types. You can use sharedPreferences   to save any primitive data: booleans, floats, ints, longs, and strings. This data will persist across user sessions (even if your application is killed). to know more about   Refer   sharedPreference you can download the source code of this project from  google drive  https://drive.google.com/folderview?id=0BySLpWhqmbbdRXZxd0ZveHllcG8&usp=sharing click on the above link ->sign into  your  google account ->add this to your google drive -> open it in google drive and download it. Following is the demo application using SharedPrefence. This application is just used to set and get name.Value that you set will be persistent even if you close the application. the value is saved in a xml file. you can view this file in eclipse . open  DDMS go to   FileExplore there is folder data. Open data->data-