apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
}
}
}
task install(dependsOn: uploadArchives)
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
TypedValue tv = new TypedValue(); | |
context.getTheme().resolveAttribute(android.R.attr.colorBackground, tv, true); | |
if (tv.type >= TypedValue.TYPE_FIRST_COLOR_INT && tv.type <= TypedValue.TYPE_LAST_COLOR_INT) { | |
// windowBackground is a color | |
setBackgroundColor(tv.data); | |
} else { | |
// windowBackground is not a color, probably a drawable | |
setBackgroundDrawable(getResources().getDrawable(tv.resourceId)); | |
} |
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"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_pressed="true"> | |
<shape> | |
<solid android:color="#1A000000"/> | |
</shape> | |
</item> | |
<item android:state_focused="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
package util; | |
import android.animation.Animator; | |
import android.animation.AnimatorListenerAdapter; | |
import android.animation.ObjectAnimator; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.os.Build; | |
import android.view.Gravity; | |
import android.view.LayoutInflater; |
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.comalia.gesicamobile.util; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.content.res.Resources; | |
import android.net.Uri; | |
import android.os.Looper; | |
import android.util.DisplayMetrics; | |
import android.util.TypedValue; |
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
int titleId = getResources().getIdentifier("action_bar_title", "id", | |
"android"); | |
TextView yourTextView = (TextView) findViewById(titleId); | |
yourTextView.setTypeface(TypefaceUtil.getTypeFace(this, "fonts/Roboto-Light.ttf")); | |
yourTextView.setTextAppearance(this, R.style.TextAppearance_GesicaManager_Title); |
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.comalia.gesicamobile.manager.widget; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.text.TextUtils; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.widget.TextView; | |
import com.comalia.gesicamobile.manager.R; |
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.comalia.gesicamobile.test; | |
import com.actionbarsherlock.app.ActionBar; | |
import org.fest.assertions.api.ANDROID; | |
public class MyANDROID extends ANDROID { | |
public static SupportActionBarAssert assertThat(ActionBar actionBar) { | |
return new SupportActionBarAssert(actionBar); |
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
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/repositories/snapshots/" | |
} | |
} | |
dependencies { | |
classpath 'com.novoda:gradle-android-test-plugin:0.9.7-SNAPSHOT' | |
} |