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 class AnimatedActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
//opening transition animations | |
overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale); | |
} | |
@Override | |
protected 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cyrilmottier.android.anapp"> | |
<!-- ... --> | |
<application | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/config_app_name" | |
android:theme="@style/Theme.AnApp" > |
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
apply plugin: 'android' | |
apply plugin: 'android-apt' | |
def AAVersion = 'X.X.X' | |
apt { | |
arguments { | |
androidManifestFile variant.processResources.manifestFile | |
resourcePackageName 'com.package.example.app' | |
// If you're using Android NBS flavors you should use the following line instead of hard-coded packageName |
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.androidannotations.annotations.sharedpreferences.DefaultInt; | |
import org.androidannotations.annotations.sharedpreferences.DefaultString; | |
import org.androidannotations.annotations.sharedpreferences.SharedPref; | |
@SharedPref(value = SharedPref.Scope.APPLICATION_DEFAULT) | |
public interface PrefsUtil { | |
/** | |
* Example int preference, with default value 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
Ion.with(imageView) | |
.placeholder(R.drawable.placeholder_image) | |
.error(R.drawable.error_image) | |
.animateLoad(spinAnimation) | |
.animateIn(fadeInAnimation) | |
.load("http://example.com/image.png"); |
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
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
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.Paint; | |
import android.graphics.Typeface; | |
import android.text.TextPaint; | |
import android.text.style.TextAppearanceSpan; | |
/** | |
* Created by bgorkowy on 2014-05-21. | |
*/ | |
public class CustomTypefaceStyleSpan extends TextAppearanceSpan { |
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 onCompleted(Exception e, JsonObject result) { | |
try { | |
if (e != null) { | |
throw e; | |
} else { | |
// zapis do bazy | |
// EventBus.post (new onSomeDataDownloadedEvent()) | |
} | |
} catch (Exception ex) { |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:id="@android:id/background" | |
android:drawable="@drawable/progress_bar_bg" /> | |
<item android:id="@android:id/progress"> | |
<scale android:scaleWidth="100%" | |
android:drawable="@drawable/progress_bar_progress" /> | |
</item> | |
</layer-list> |
OlderNewer