Skip to content

Commit 997544b

Browse files
committed
Merge branch 'release/1.2'
2 parents 9108387 + 0a0c0b1 commit 997544b

File tree

18 files changed

+845
-14
lines changed

18 files changed

+845
-14
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,9 @@ local.properties
3030
proguard.cfg
3131
proguard-project.txt
3232

33+
#Gradle
34+
.gradle
35+
build
36+
3337
#Other
3438
.DS_Store

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ Change Log
22
==========
33

44

5+
Version 1.2 *(2013-07-13)*
6+
----------------------------
7+
* Implemented `GridFragment` & `SherlockGridFragment`.
8+
* Add Gradle build.
9+
* Fix: `NullPointerException` in `ProgressActivity`.
10+
11+
512
Version 1.1 *(2013-04-29)*
613
----------------------------
7-
* Implement of ProgressSherlockFragment.
14+
* Implemented `SherlockProgressFragment`.
815
* Fix: Failed build for minSdkVersion=4.
916

1017

build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'com.android.tools.build:gradle:0.5.+'
7+
}
8+
}

progressfragment-sample/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.devspark.progressfragment.sample"
44
android:versionCode="3"
5-
android:versionName="1.1">
5+
android:versionName="1.2">
66

77
<uses-sdk
88
android:minSdkVersion="4"

progressfragment-sample/build.gradle

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apply plugin: 'android'
2+
3+
dependencies {
4+
compile project(':progressfragment')
5+
}
6+
7+
android {
8+
compileSdkVersion 17
9+
buildToolsVersion '17.0.0'
10+
11+
sourceSets {
12+
main {
13+
manifest.srcFile 'AndroidManifest.xml'
14+
java.srcDirs = ['src']
15+
res.srcDirs = ['res']
16+
}
17+
}
18+
}

progressfragment-sample/src/com/devspark/progressfragment/sample/ProgressActivity.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.devspark.progressfragment.sample;
1818

1919
import android.annotation.TargetApi;
20+
import android.app.ActionBar;
2021
import android.os.Build;
2122
import android.os.Bundle;
2223
import android.support.v4.app.Fragment;
@@ -93,7 +94,10 @@ private class ActionBarHelper {
9394
* level up rather than to the top level of the app.
9495
*/
9596
private void setDisplayHomeAsUpEnabled(boolean showHomeAsUp) {
96-
getActionBar().setDisplayHomeAsUpEnabled(showHomeAsUp);
97+
ActionBar actionBar = getActionBar();
98+
if (actionBar != null) {
99+
actionBar.setDisplayHomeAsUpEnabled(showHomeAsUp);
100+
}
97101
}
98102
}
99103
}

progressfragment/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.devspark.progressfragment"
4-
android:versionCode="2"
5-
android:versionName="1.1">
4+
android:versionCode="3"
5+
android:versionName="1.2">
66

77
<uses-sdk
88
android:minSdkVersion="4"

progressfragment/build.gradle

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apply plugin: 'android-library'
2+
3+
dependencies {
4+
compile fileTree(dir: 'libs', include: '*.jar')
5+
}
6+
7+
android {
8+
compileSdkVersion 17
9+
buildToolsVersion '17.0.0'
10+
11+
sourceSets {
12+
main {
13+
manifest.srcFile 'AndroidManifest.xml'
14+
java.srcDirs = ['src']
15+
res.srcDirs = ['res']
16+
}
17+
}
18+
}
19+
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/* Copyright 2013, Evgeny Shishkin
4+
**
5+
** Licensed under the Apache License, Version 2.0 (the "License");
6+
** you may not use this file except in compliance with the License.
7+
** You may obtain a copy of the License at
8+
**
9+
** http://www.apache.org/licenses/LICENSE-2.0
10+
**
11+
** Unless required by applicable law or agreed to in writing, software
12+
** distributed under the License is distributed on an "AS IS" BASIS,
13+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
** See the License for the specific language governing permissions and
15+
** limitations under the License.
16+
*/
17+
-->
18+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:layout_width="match_parent"
20+
android:layout_height="match_parent">
21+
22+
<LinearLayout
23+
android:id="@+id/progress_container"
24+
android:layout_width="match_parent"
25+
android:layout_height="match_parent"
26+
android:gravity="center"
27+
android:orientation="vertical"
28+
android:visibility="gone">
29+
30+
<ProgressBar
31+
style="?android:attr/progressBarStyleLarge"
32+
android:layout_width="wrap_content"
33+
android:layout_height="wrap_content"/>
34+
35+
<TextView
36+
android:id="@+id/progress_text"
37+
android:layout_width="wrap_content"
38+
android:layout_height="wrap_content"
39+
android:paddingTop="4dip"
40+
android:singleLine="true"
41+
android:textAppearance="?android:attr/textAppearanceSmall"
42+
android:visibility="gone"/>
43+
</LinearLayout>
44+
45+
<FrameLayout
46+
android:id="@+id/grid_container"
47+
android:layout_width="match_parent"
48+
android:layout_height="match_parent">
49+
50+
<GridView
51+
android:id="@+id/grid"
52+
android:layout_width="match_parent"
53+
android:layout_height="match_parent"/>
54+
55+
<TextView
56+
android:id="@android:id/empty"
57+
android:layout_width="match_parent"
58+
android:layout_height="match_parent"
59+
android:gravity="center"
60+
android:textAppearance="?android:attr/textAppearanceLarge"/>
61+
</FrameLayout>
62+
63+
</FrameLayout>

0 commit comments

Comments
 (0)