Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #440 from intrications/master
Browse files Browse the repository at this point in the history
Update ActionBar-PullToRefresh to 0.7.2
  • Loading branch information
ginatrapani committed Sep 17, 2013
2 parents bf3bd46 + 64916d5 commit 3cd501b
Show file tree
Hide file tree
Showing 21 changed files with 1,378 additions and 1,369 deletions.
148 changes: 0 additions & 148 deletions dependencies/ActionBar-PullToRefresh-e8e6d2b58c/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.co.senab.actionbarpulltorefresh.extras.actionbarsherlock"
android:versionCode="050"
android:versionName="0.5">
package="uk.co.senab.actionbarpulltorefresh.extras.actionbarsherlock">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="18" />
<application />
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply plugin: 'android-library'

dependencies {
compile project(':library')
compile 'com.android.support:support-v4:18.0.+'
compile ('com.actionbarsherlock:actionbarsherlock:4.4.+@aar') {
// Need to specifically exclude this as it is specified in ActionBarSherlock pom
exclude group: 'com.google.android', module: 'support-v4'
}
}

android {
compileSdkVersion 18
buildToolsVersion '17.0.0'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
}
}
}

apply from: '../../maven_push.gradle'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=ActionBar-PullToRefresh Extras: ActionBarSherlock
POM_ARTIFACT_ID=extra-abs
POM_PACKAGING=aar

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* Copyright 2013 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package uk.co.senab.actionbarpulltorefresh.extras.actionbarsherlock;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.TypedValue;

import uk.co.senab.actionbarpulltorefresh.library.DefaultHeaderTransformer;

public class AbsDefaultHeaderTransformer extends DefaultHeaderTransformer {

@Override
protected Drawable getActionBarBackground(Context context) {
// Super handles ICS+ anyway...
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return super.getActionBarBackground(context);
}

// Need to get resource id of style pointed to from actionBarStyle
TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(R.attr.actionBarStyle, outValue, true);
// Now get action bar style values...
TypedArray abStyle = context.getTheme().obtainStyledAttributes(outValue.resourceId,
R.styleable.SherlockActionBar);
try {
return abStyle.getDrawable(R.styleable.SherlockActionBar_background);
} finally {
abStyle.recycle();
}
}

@Override
protected int getActionBarSize(Context context) {
// Super handles ICS+ anyway...
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return super.getActionBarSize(context);
}

TypedArray values = context.getTheme()
.obtainStyledAttributes(R.styleable.SherlockTheme);
try {
return values.getDimensionPixelSize(R.styleable.SherlockTheme_actionBarSize, 0);
} finally {
values.recycle();
}
}

@Override
protected int getActionBarTitleStyle(Context context) {
// Super handles ICS+ anyway...
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return super.getActionBarTitleStyle(context);
}

// Need to get resource id of style pointed to from actionBarStyle
TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(R.attr.actionBarStyle, outValue, true);
// Now get action bar style values...
TypedArray abStyle = context.getTheme().obtainStyledAttributes(outValue.resourceId,
R.styleable.SherlockActionBar);
try {
return abStyle.getResourceId(R.styleable.SherlockActionBar_titleTextStyle, 0);
} finally {
abStyle.recycle();
}
}

@Override
protected int getMinimumApiLevel() {
return Build.VERSION_CODES.ECLAIR_MR1;
}
}
Loading

0 comments on commit 3cd501b

Please sign in to comment.