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.xxxx.xxxx.xxx; | |
import android.text.TextUtils; | |
import com.google.api.client.auth.oauth2.Credential; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.http.InputStreamContent; | |
import com.google.api.client.http.javanet.NetHttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.jackson2.JacksonFactory; |
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
// create a class member variable. | |
WifiManager.WifiLock mWifiLock = null; | |
/*** | |
* Calling this method will aquire the lock on wifi. This is avoid wifi | |
* from going to sleep as long as <code>releaseWifiLock</code> method is called. | |
**/ | |
private void holdWifiLock() { | |
WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); |
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 carlos.munoz.sports.domain; | |
import android.content.Context; | |
import android.location.Address; | |
import android.location.Geocoder; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.Locale; |
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
ContentResolver cr = getActivity().getContentResolver(); | |
Cursor c = cr.query( | |
ContactsContract.Data.CONTENT_URI, | |
new String[] { | |
ContactsContract.Data.CONTACT_ID, | |
Contacts.DISPLAY_NAME, | |
Contacts.PHOTO_ID, | |
Contacts._ID | |
ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME, |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 23 | |
buildToolsVersion "23.0.2" | |
lintOptions { | |
disable "MissingTranslation" | |
disable "ExtraTranslation" | |
} |
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
<resources> | |
<style name="AppBaseTheme" parent="android:Theme.Holo.Light"> | |
<item name="android:dropDownListViewStyle">@style/MyDropDownListView</item> | |
</style> | |
<style name="MyDropDownListView" parent="android:style/Widget.Holo.ListView.DropDown"> | |
<item name="android:listSelector">@drawable/ad_selectable_background</item> | |
</style> | |
</resources> |
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 RoundedImageView extends ImageView { | |
public RoundedImageView(Context context) { | |
super(context); | |
// TODO Auto-generated constructor stub | |
} | |
public RoundedImageView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |