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
/** | |
* Unless I'm mistaken, this should never happen. If you deprecate a method | |
* to replace it with another, shouldn't the actual functionality be moved | |
* to the new method and the deprecated method be made to delegate to the | |
* replacement method? | |
*/ | |
public void setBackground(Drawable background) { | |
//noinspection deprecation | |
setBackgroundDrawable(background); | |
} |
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"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<ImageView | |
android:id="@+id/indicator" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_alignParentRight="true" |
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
private static GestureDetector GESTURE_DETECTOR; | |
private static final long HEADLINE_SCROLL_DELAY = 5000; | |
private Timer mAutoScroller; | |
private ViewPager mHeadlinePager; | |
private HeadlineAdapter mHeadlineAdapter; |
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
#!/usr/bin/python | |
''' | |
Copyright 2009, The Android Open Source Project | |
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 |
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
type mogrify >/dev/null 2>&1 || { echo >&2 "» This script requires mogrify. Please install ImageMagick first!"; exit 1; } | |
IOS_IMAGE_PATH="$1" | |
OUTPUT_PATH="$2" | |
mkdir -p $OUTPUT_PATH/res/drawable-hdpi $OUTPUT_PATH/res/drawable-mdpi $OUTPUT_PATH/res/drawable-xhdpi | |
echo " » Copy all resources to MDPI, this is" | |
echo " the same density as a non-retina iOS device" | |
find "${IOS_IMAGE_PATH}"/* -type f -exec cp {} ${OUTPUT_PATH}/res/drawable-mdpi/ \; |
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
#!/usr/local/bin/python | |
import sys | |
from lxml import html | |
from urlparse import urljoin | |
import urllib2 | |
import requests | |
import logging | |
visited_links = [] |
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
#! /bin/bash | |
# Batch Convert Script by StevenTrux | |
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility | |
# this script only convert necessary tracks if the video is already | |
# in H.264 format it won't convert it saving your time! | |
# Put all video files need to be converted in a folder! | |
# the name of files must not have " " Space! | |
# Rename the File if contain space |
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.ryanharter.android.util; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
/** | |
* Keeps track of the number of app launches, and days since first launch, and | |
* provides an easy way to determine whether you should show a rating prompt | |
* or not. | |
*/ |
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 Observable<Show> getShows() { | |
return authClient.getAuthString() | |
.flatMap(token -> contentApi.getShows(token, selectedMediaServer)) | |
.flatMap(shows -> Observable.from(shows.getShows())) | |
.flatMap(this::getImdbId); | |
} | |
public Observable<Show> getImdbId(Show show) { | |
return omdbApi.searchByTitle(show.getTitle()) | |
.flatMap(movie -> { |
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.ryanharter.mediaroute.widgets; | |
import android.content.Context; | |
import android.support.v7.app.MediaRouteActionProvider; | |
import android.support.v7.app.MediaRouteButton; | |
/** | |
* A MediaRouteActionProvider that allows the use of a ThemeableMediaRouteButton. | |
*/ | |
public class ThemeableMediaRouteActionProvider extends MediaRouteActionProvider { |
OlderNewer