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 (c) 2012 Eddie Ringle <[email protected]> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without modification, are permitted | |
* provided that the following conditions are met: | |
* | |
* Redistributions of source code must retain the above copyright notice, this list of conditions | |
* and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions |
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
//TextureAtlas for andengine | |
// Billy Lindeman ([email protected]) | |
// 2011 Protozoa, LLC | |
//loads texture atlas from Zwoptex Generic plist file | |
//you pass it the name of the asset (without extension) | |
//it will load .plist as the coordinates and .png as the texture | |
//requires https://github.com/tenaciousRas/android-plist-parser | |
package org.anddev.andengine.opengl.texture.atlas; |
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.cyrilmottier.android.tests; | |
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* @author Cyril Mottier | |
*/ | |
public class ViewAdditions { |
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.webile.location; | |
import android.app.Activity; | |
import android.location.Location; | |
import android.location.LocationManager; | |
import android.location.LocationProvider; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import android.widget.Toast; |
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.example; | |
public abstract BaseActivity extends SherlockActivity { | |
private final ScopedBus scopedBus = new ScopedBus(); | |
protected ScopedBus getBus() { | |
return scopedBus; | |
} | |
@Override public void onPause() { |
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
/* Base fragment to ensure the parent activity implements a contract interface. */ | |
public abstract class ContractFragment<T> extends Fragment { | |
private T mContract; | |
@Override | |
public void onAttach(Activity activity) { | |
try { | |
mContract = (T)activity; | |
} catch (ClassCastException e) { | |
throw new IllegalStateException(activity.getClass().getSimpleName() |
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
/** | |
* Global one way asynchronous notification mechanism between parts of application based on Handler class. | |
* For example from service to activities. | |
* | |
* <p> | |
* Notification are always delivered to the UI thread. | |
* </p> | |
* | |
* <p> | |
* This class keep all listeners as weak reference so it is save to add whole activities as listeners, but do not use |
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 OnPageChangeListener mOnPageChangeListener = new OnPageChangeListener() { | |
@Override | |
public void onPageSelected(int position) { | |
// Do whatever you wan't to do. It's up to you ... not me :) | |
} | |
@Override | |
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { | |
// Do whatever you wan't to do. It's up to you ... not me :) | |
} |
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
@Override | |
public void onPageScrollStateChanged(int state) { | |
} | |
@Override | |
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { | |
} | |