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 android.support.v4.app; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.view.ContextMenu; | |
import android.view.ContextMenu.ContextMenuInfo; | |
import android.view.Gravity; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.View.OnCreateContextMenuListener; |
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 se.fnord.android.layout; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* ViewGroup that arranges child views in a similar way to text, with them laid | |
* out one line at a time and "wrapping" to the next line as needed. |
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
final int defaultFlag = PackageManager.MATCH_DEFAULT_ONLY; | |
Intent[] explicitIntents; | |
//see an example here http://stackoverflow.com/questions/2662531/launching-google-maps-directions-via-an-intent-on-android | |
private Intent[] getExplicitIntents() { | |
if(explicitIntents == null) { | |
PackageManager currentPM = getPackageManager(); | |
explicitIntents = new Intent[]{ | |
new Intent("android.intent.action.navigon.START_PUBLIC"), //navigon with public intent | |
currentPM.getLaunchIntentForPackage("com.navigon.navigator"), //navigon without public intent |
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 java.io.InputStream; | |
import roboguice.inject.InjectExtra; | |
import android.app.Activity; | |
import android.content.ContentResolver; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.net.Uri; | |
import android.util.DisplayMetrics; |
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 roboguice.activity.event.OnPauseEvent; | |
import roboguice.activity.event.OnResumeEvent; | |
import roboguice.event.EventManager; | |
import roboguice.event.Observes; | |
import android.hardware.Sensor; | |
import android.hardware.SensorEvent; | |
import android.hardware.SensorEventListener; | |
import android.hardware.SensorManager; | |
import com.google.inject.Inject; |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="net.vvakame.polkodotter" android:versionCode="1" | |
android:versionName="1.0"> | |
<uses-sdk android:minSdkVersion="7" /> | |
<application android:icon="@drawable/icon" android:label="@string/app_name" | |
android:name=".MyApplication" android:debuggable="true"> | |
<activity android:name=".MainActivity" android:label="@string/app_name"> | |
<intent-filter> |
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.database.Cursor; | |
import android.support.v4.content.AsyncTaskLoader; | |
/** | |
* Used to write apps that run on platforms prior to Android 3.0. When running | |
* on Android 3.0 or above, this implementation is still used; it does not try | |
* to switch to the framework's implementation. See the framework SDK | |
* documentation for a class overview. | |
* |
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
// Copyright 2012 Square, Inc. | |
package com.squareup.widgets; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** Maintains an aspect ratio based on either width or height. Disabled by default. */ | |
public class AspectRatioImageView extends ImageView { |
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 de.greenrobot.util; | |
import java.util.concurrent.Executor; | |
import android.os.AsyncTask; | |
import android.os.Build; | |
/** | |
* Uses level 11 APIs when possible to use parallel/serial executors and falls back to standard execution if API level | |
* is below 11. |
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.squareup.widgets; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.ViewAnimator; | |
/** ViewAnimator helper which allows setting the selected child by ID rather than index. */ | |
public class SquareViewAnimator extends ViewAnimator { | |
public SquareViewAnimator(Context context) { |
OlderNewer