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
| <!-- 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 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
| /** | |
| * 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 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 LeanbackUtil { | |
| /** | |
| * Returns true if the Leanback System feature is available otherwise false | |
| * | |
| * Can be used to help determine if running on an android tv device with the leanback launcher. | |
| */ | |
| public static boolean isLeanbackSupported(Context context) { | |
| final PackageManager pm = context.getPackageManager(); | |
| return pm.hasSystemFeature("android.software.leanback"); | |
| } |
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 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 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
| /* | |
| * Verifies that an activities runOnUiThread method is called and that | |
| * appropriate class is called. In most cases we don't care about | |
| * actually executing the runOnUiThread, just that it got called. | |
| * By mocking out the Activity, we can use Mockito's verify method to | |
| * make sure the method was called, with the expected Runnable class implementation | |
| * passed into it. | |
| * | |
| * By doing this we avoid having to pause Robolectrics's UIScheduler and BackgroundSchedulers | |
| * and then kick off the task. Since in this case it isn't actually necessary to run the code as it |
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.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 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
| <!-- | |
| 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> |
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
| /** | |
| * The MIT License (MIT) | |
| * Copyright (c) 2014 David Carver | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files (the | |
| * "Software"), to deal in the Software without restriction, including | |
| * without limitation the rights to use, copy, modify, merge, publish, | |
| * distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to | |
| * the following conditions: |
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) 2013 Embark Mobile | |
| # Modified to work with Eclipse HIPP instance by David Carver | |
| # Licensed under the MIT License. | |
| # https://github.com/embarkmobile/android-sdk-installer | |
| set +e | |
| #detecting os | |
| os=linux | |
| if [[ `uname` == 'Darwin' ]]; then |
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
| Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); | |
| intent.addCategory(Intent.CATEGORY_OPENABLE); | |
| intent.setType("*/*"); | |
| intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); | |
| // In code that handles the result returned to process the files: | |
| ClipData clipData = intent.getClipData(); |