This file contains hidden or 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
| /* | |
| * Copyright (C) 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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.text.SimpleDateFormat; | |
| import java.util.Calendar; | |
| import java.util.Date; | |
| import java.util.Locale; | |
| import android.text.format.DateUtils; | |
| public class TimeUtils { | |
| public static final String DD_MM_YY_HH_MM = "dd-MMM-yy h:mm"; |
This file contains hidden or 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.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.content.res.Configuration; | |
| import android.graphics.Bitmap; | |
| import android.graphics.Canvas; | |
| import android.graphics.Matrix; | |
| import android.graphics.PointF; | |
| import android.graphics.RectF; | |
| import android.graphics.drawable.Drawable; | |
| import android.net.Uri; |
This file contains hidden or 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
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <ProgressBar | |
| android:id="@+id/progress_limit" | |
| style="?android:attr/progressBarStyleHorizontal" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" |
This file contains hidden or 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.preference.DialogPreference; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.widget.TimePicker; | |
| public class TimePreference extends DialogPreference { | |
| private int lastHour=0; | |
| private int lastMinute=0; |
This file contains hidden or 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
| <supports-screens | |
| android:largeScreens="true" | |
| android:normalScreens="true" | |
| android:smallScreens="true" | |
| android:resizeable="true" | |
| android:anyDensity="true" /> | |
| <uses-permission android:name="android.permission.VIBRATE" /> | |
| <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
| <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
| <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> |
This file contains hidden or 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); |
This file contains hidden or 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 hidden or 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 hidden or 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"; |