Skip to content

Commit

Permalink
升级gradle到24
Browse files Browse the repository at this point in the history
  • Loading branch information
shark0017 committed Sep 27, 2016
1 parent 4165f64 commit 51974bb
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 10 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.2"

defaultConfig {
applicationId "kale.commonadapter"
minSdkVersion 11
targetSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
Expand All @@ -25,8 +25,8 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'

compile project(':adapter')
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ public AdapterItem createItem(Object type) {
header.setText("Header");
header.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 300));

Button footer = new Button(this);
final Button footer = new Button(this);
footer.setText("footer");

wrapper.setHeaderView(header);
wrapper.setFooterView(footer);

recyclerView.setAdapter(wrapper);

Expand All @@ -106,6 +105,8 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
public void run() {
data.clear();
data.addAll(DataManager.loadData(getBaseContext(), 10));
// View view = LayoutInflater.from(getBaseContext()).inflate(R.layout.list_footer, null);
wrapper.setFooterView(footer);
}
}, 1000);
}
Expand Down
38 changes: 38 additions & 0 deletions app/src/main/res/layout/list_footer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>

<data>

</data>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>

<ProgressBar
android:id="@+id/loading_pb"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_gravity="center"
android:layout_marginBottom="12dp"
android:layout_marginTop="12dp"
android:gravity="center"
android:visibility="visible"
tools:visibility="visible"
/>

<TextView
android:id="@+id/hint_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="12dp"
android:layout_marginTop="12dp"
android:visibility="visible"
tools:text="msg"
/>

</FrameLayout>
</layout>
2 changes: 1 addition & 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.1.0'
classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
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 @@
#Wed Apr 10 15:27:10 PDT 2013
#Mon Sep 26 17:43:00 CST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

0 comments on commit 51974bb

Please sign in to comment.