Skip to content

Commit

Permalink
Update android:foregroundInsidePadding attribute to be app specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawnnypoo committed Jun 19, 2017
1 parent ec4f817 commit 009b9c6
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 83 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ android:
components:
- platform-tools
- tools
- build-tools-25.0.0
- build-tools-25.0.3
- android-25
- extra-android-m2repository

before_script:
- chmod +x gradlew

script: "./gradlew build"
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
buildToolsVersion "25.0.3"

defaultConfig {
applicationId "com.commit451.foregroundviews.sample"
minSdkVersion 15
targetSdkVersion 24
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -25,9 +25,8 @@ android {

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':foregroundviews')
}

This file was deleted.

12 changes: 6 additions & 6 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:scaleType="centerCrop"
android:foreground="?attr/selectableItemBackgroundBorderless"/>
android:foreground="?attr/selectableItemBackgroundBorderless"
android:scaleType="centerCrop"/>

<com.commit451.foregroundviews.ForegroundLinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -93,21 +93,21 @@
<com.commit451.foregroundviews.ForegroundButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:layout_margin="16dp"
android:clickable="true"
android:background="?attr/colorAccent"
android:clickable="true"
android:foreground="?attr/selectableItemBackground"
android:padding="16dp"
android:text="This is a foreground button"/>

<com.commit451.foregroundviews.ForegroundTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:layout_margin="16dp"
android:clickable="true"
android:background="?attr/colorAccent"
android:clickable="true"
android:foreground="?attr/selectableItemBackground"
android:padding="16dp"
android:text="This is a foreground text view"/>

</LinearLayout>
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -16,6 +16,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}

Expand Down
7 changes: 3 additions & 4 deletions foregroundviews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
buildToolsVersion "25.0.3"

defaultConfig {
minSdkVersion 15
targetSdkVersion 24
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -24,8 +24,7 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:appcompat-v7:25.4.0'
}

apply from: 'https://raw.githubusercontent.com/Commit451/gradle-android-javadocs/1.0.0/gradle-android-javadocs.gradle'

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void init(Context context, AttributeSet attrs, int defStyle, int defStyle
}

mForegroundInPadding = a.getBoolean(
R.styleable.ForegroundView_android_foregroundInsidePadding, true);
R.styleable.ForegroundView_foregroundInsidePadding, true);

a.recycle();
}
Expand Down
6 changes: 3 additions & 3 deletions foregroundviews/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="ForegroundView">
<attr name="android:foreground" />
<attr name="android:foregroundInsidePadding" />
<attr name="android:foregroundGravity" />
<attr name="android:foreground"/>
<attr name="android:foregroundGravity"/>
<attr name="foregroundInsidePadding" format="boolean"/>
</declare-styleable>
</resources>

This file was deleted.

4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Sep 09 12:19:51 CDT 2016
#Mon Jun 19 13:52:25 CDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip

0 comments on commit 009b9c6

Please sign in to comment.