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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Add this as a debug manifest so the permissions won't be required by your production app --> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <uses-permission android:name="android.permission.WAKE_LOCK" /> | |
| <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | |
| </manifest> |
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
| <receiver | |
| android:name=".DownloadBroadcastReceiver" | |
| android:exported="true"> | |
| <intent-filter> | |
| <action android:enabled="true" android:name="android.intent.action.DOWNLOAD_COMPLETE" /> | |
| </intent-filter> | |
| </receiver> |
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
| apply plugin: 'com.android.library' | |
| android { | |
| compileSdkVersion 'Google Inc.:Google APIs:22' | |
| Properties localProps = new Properties() | |
| localProps.load(new FileInputStream(file('../local.properties'))) | |
| def buildToolVer = file("${localProps['sdk.dir']}/build-tools/").listFiles().sort().reverse().first().name; | |
| buildToolsVersion buildToolVer; |
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
| class SoccerTeam { | |
| private static int numWins; | |
| private static int numLosses; | |
| private static int numTies; | |
| //these 2 variables are for the modified version | |
| private static int numGames=0; | |
| private static int numGoals=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
| // This list of "buy aliases" is used by the AutoBuy system. | |
| // The system begins with the first alias in the list, and attempts to purchase it. | |
| // If a primary weapon is successfully purchased, all later primary weapon aliases are skipped. | |
| // Similarly, secondary weapon buy alias are skipped once a seconary weapon has been purchased. | |
| // You can customize this file to reflect your weapon and equipment preferences and priorities. | |
| // | |
| // Attempting to purchase a weapon that shares a slot with another weapon on that team | |
| // (like the m4a1 and m4a1_silencer), will purchase the weapon currently equipped in that slot if possible. | |
| // | |
| // The console command for autobuy is "autobuy" |
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.os.Parcel; | |
| import android.os.Parcelable; | |
| public class ParcelableHelper { | |
| /** | |
| * There is not always a guarantee that Parcelable values will be immediately written out and | |
| * read back in. For data data that mutable (its own issue), this can be a problem. This is | |
| * for the times when it would be great to have confidence that you will be working with a copy | |
| * of that data. |
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
| // A member variable | |
| private boolean userIsInteracting; | |
| /* | |
| Beginning with API level 3 you can use onUserInteraction() on an Activity with a boolean to determine if the user is interacting with the device. | |
| http://developer.android.com/reference/android/app/Activity.html#onUserInteraction() | |
| */ | |
| @Override | |
| public void onUserInteraction() { |
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
| tag:^((?!CoreMetrics|InputEventConsistency|memalloc|Adreno200-EGLSUB|Resources|global|TaggingRequest|Facade[B|U]|dalvik|skia|KeyCharacterMap|BackStackEntry|FragmentManager|ServiceRunnable|ServiceLocator|BaseHttpRequest|szipinf|APACHE).)*$ | |
| // In Android Studio you do not include the leading "tag:" but you must "edit a filter configuration" in order to use this. It does not appear that the in-line search field supports RegEx. | |
| // This line would remove any log line that included the words: StringMode, System.err or GAV4 | |
| ^((?!StrictMode|System.err|GAV4).)*$ |
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 SomeClass { | |
| someMethod(String className) { | |
| // I see this more often | |
| if (!TextUtils.isEmpty(className)) { // We have to ensure that className isn't null before calling equals() | |
| if (className.equals(SomeClass.class.getName()) { | |
| // do something | |
| } | |
| } | |
| } |
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
| package com.example.helloworld.ui.adapters; | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.ImageView; | |
| import android.widget.TextView; | |
| import com.exacttarget.etpushsdk.adapter.CloudPageListAdapter; |
NewerOlder