Skip to content

Commit

Permalink
Update gradle and fix some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
emilsjolander committed Jun 19, 2014
1 parent 40edcc6 commit d56ba35
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 30 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.android.tools.build:gradle:0.11.+'
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=emilsjolander
POM_DEVELOPER_NAME=Emil Sjolander
POM_DEVELOPER_EMAIL[email protected]
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'android-library'

android {
compileSdkVersion 19
buildToolsVersion '19.0.3'
buildToolsVersion '19.1.0'

sourceSets {
main {
Expand All @@ -13,4 +13,4 @@ android {
}
}

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/eaa6b5404b7594e6c23b884fdc5795f545db55dd/gradle-mvn-push.gradle'
apply from: 'https://raw.github.com/shamanland/gradle-mvn-push/cc18d56549cdea03f744b6fff27911569394073e/gradle-mvn-push.gradle'
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {

android {
compileSdkVersion 19
buildToolsVersion '19.0.3'
buildToolsVersion '19.1.0'

sourceSets {
main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
Expand All @@ -26,7 +25,7 @@
public class TestActivity extends ActionBarActivity implements
AdapterView.OnItemClickListener, StickyListHeadersListView.OnHeaderClickListener,
StickyListHeadersListView.OnStickyHeaderOffsetChangedListener,
StickyListHeadersListView.OnStickyHeaderChangedListener, View.OnTouchListener {
StickyListHeadersListView.OnStickyHeaderChangedListener {

private TestBaseAdapter mAdapter;
private DrawerLayout mDrawerLayout;
Expand Down Expand Up @@ -76,7 +75,6 @@ public void run() {
stickyList.setDrawingListUnderStickyHeader(true);
stickyList.setAreHeadersSticky(true);
stickyList.setAdapter(mAdapter);
stickyList.setOnTouchListener(this);

mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerToggle = new ActionBarDrawerToggle(
Expand Down Expand Up @@ -108,9 +106,6 @@ public void run() {
drawBehindCheckBox.setOnCheckedChangeListener(checkBoxListener);
fastScrollCheckBox = (CheckBox) findViewById(R.id.fast_scroll_checkBox);
fastScrollCheckBox.setOnCheckedChangeListener(checkBoxListener);


stickyList.setStickyHeaderTopOffset(100);
}

@Override
Expand All @@ -131,7 +126,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}

return super.onOptionsItemSelected(item);
}

Expand Down Expand Up @@ -175,17 +169,13 @@ public void onClick(View view) {
};

@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
Toast.makeText(this, "Item " + position + " clicked!",
Toast.LENGTH_SHORT).show();
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(this, "Item " + position + " clicked!", Toast.LENGTH_SHORT).show();
}

@Override
public void onHeaderClick(StickyListHeadersListView l, View header,
int itemPosition, long headerId, boolean currentlySticky) {
Toast.makeText(this, "Header " + headerId + " currentlySticky ? " + currentlySticky,
Toast.LENGTH_SHORT).show();
public void onHeaderClick(StickyListHeadersListView l, View header, int itemPosition, long headerId, boolean currentlySticky) {
Toast.makeText(this, "Header " + headerId + " currentlySticky ? " + currentlySticky, Toast.LENGTH_SHORT).show();
}

@Override
Expand All @@ -197,16 +187,9 @@ public void onStickyHeaderOffsetChanged(StickyListHeadersListView l, View header
}

@Override
public void onStickyHeaderChanged(StickyListHeadersListView l, View header,
int itemPosition, long headerId) {
Toast.makeText(this, "Sticky Header Changed to " + headerId,
Toast.LENGTH_SHORT).show();
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onStickyHeaderChanged(StickyListHeadersListView l, View header, int itemPosition, long headerId) {
header.setAlpha(1);
}

@Override
public boolean onTouch(View v, MotionEvent event) {
Toast.makeText(this, "OnTouch works", Toast.LENGTH_SHORT).show();
v.setOnTouchListener(null);
return false;
}
}

0 comments on commit d56ba35

Please sign in to comment.