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 org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.dbunit.IDatabaseTester; | |
import org.dbunit.PropertiesBasedJdbcDatabaseTester; | |
import org.dbunit.database.IDatabaseConnection; | |
import org.junit.Assert; | |
/** | |
* Base testCase for database testing.<br> | |
* Subclasses may override {@link #newDatabaseTester()} to plug-in a different |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copy the old update site for ADT plugins into a p2 repository that can be used as part of a tycho build or to handle | |
cases where Eclipse complains about the external site not being available. This will create a new P2 repository instead | |
of the old site.xml based repository which is deprecated. | |
The p2 repository will be in the target/site/p2 directory when finished. You can then use as a local p2 repository in | |
Eclipse or deploy it to a web server and use it company wide. | |
--> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" |
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.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.LinearGradient; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff.Mode; | |
import android.graphics.PorterDuffXfermode; | |
import android.graphics.Shader.TileMode; | |
import android.util.AttributeSet; |
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
// Place this in the setup method for any test that is failing to keep it from trying to start | |
ShadowApplication shadowApplication = Robolectric.shadowOf(Robolectric.application); | |
shadowApplication.declareActionUnbindable("com.google.android.gms.analytics.service.START"); |
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
<!-- Required for on Android TV to receive Boot Completed events --> | |
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | |
<!-- Need to Register the Recommendation Intent Service --> | |
<service android:name="us.nineworlds.serenity.core.services.OnDeckRecommendationIntentService" | |
android:enabled="true" android:exported="true"/> | |
<!-- The Receiver that actually responds to the Boot Completed event, needed | |
to start the recommendation service automatically when bootup has |
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
/** | |
* Make sure that the Dialog size adjusts when the softlkeyboard is displayed. | |
*/ | |
alertDialog.getWindow().setSoftInputMode( | |
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); | |
/** | |
* Over ride onCheckIsTextEditor to always make sure the Webview | |
* brings up the softkeyboard when in an input field. There | |
* are situations like in a Dialog where the Softkeyboard will |
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
/** | |
* This change should work in both the original Gallery code as well as in the vairous open source | |
* extensions and variations. | |
* | |
* Find the displatchLongPress method in the Gallery class file. and update it to the following. | |
* | |
* Make sure that longPressHandled is a field available to all the other methods. | |
* | |
*/ | |
boolean longPressHandled = false; |
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.SharedPreferences; | |
import android.graphics.Bitmap; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.TransitionDrawable; | |
import android.preference.PreferenceManager; | |
import android.view.View; | |
/** | |
* A runnable that transitions between a drawable and a bitmap. |
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
<!-- | |
Include the following snippet in a profile or as part of your standard build. | |
It will parse out the POM version number and then use it to update the | |
version number in your AndroidManfiest.xml. It will also increment the | |
versionCode based on the version number. | |
No more manually having to update the vesion number as part of a release!! Yipee! | |
--> | |
<plugin> |
OlderNewer