This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nhaarman.test; | |
import android.animation.ObjectAnimator; | |
import android.animation.ValueAnimator; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.RadialGradient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.ImageView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
public class AspectImageView extends ImageView { | |
private static final int DEFAULT_XRATIO = 1; | |
private static final int DEFAULT_YRATIO = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
import android.net.ConnectivityManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class ConnectivityBroadcastReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
String action = intent.getAction(); | |
if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION) | |
|| mListening == false) { | |
Log.w(TAG, "onReceived() called with " + mState.toString() | |
+ " and " + intent); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import android.util.Log; | |
public class DBHelper extends SQLiteOpenHelper { | |
public static final int DB_VERSION = 1; | |
public static final String DB_NAME = "TestDB"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AddContact{ | |
public static void addContact(){ | |
String DisplayName = "XYZ"; | |
String MobileNumber = "123456"; | |
String HomeNumber = "1111"; | |
String WorkNumber = "2222"; | |
String emailID = "email@nomail.com"; | |
String company = "bad"; | |
String jobTitle = "abcd"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.content.ContentResolver; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.provider.ContactsContract; | |
import android.widget.TextView; | |
public class FetchContactActivity extends Activity { | |
public TextView outputText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ContactsActivity extends Activity { | |
List<Contact> contacts; | |
ContactsAdapter contactsAdapter; | |
ListView contactsList; | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |