-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
2,269 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.devspark.progressfragment.sample" | ||
android:versionCode="6" | ||
android:versionName="1.4.0"> | ||
|
||
<uses-sdk | ||
android:minSdkVersion="14" | ||
android:targetSdkVersion="19"/> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:icon="@drawable/ic_launcher" | ||
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
|
||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".ProgressActivity"/> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apply plugin: 'android' | ||
|
||
dependencies { | ||
compile project(':progressfragment-native') | ||
} | ||
|
||
android { | ||
compileSdkVersion 19 | ||
buildToolsVersion '19.0.3' | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 19 | ||
} | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
res.srcDirs = ['res'] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.devspark.progressfragment</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>1.4.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>progressfragment-native-sample</artifactId> | ||
<packaging>apk</packaging> | ||
|
||
<name>Android ProgressFragment (Sample)</name> | ||
|
||
<dependencies> | ||
<!-- Library --> | ||
<dependency> | ||
<groupId>com.devspark.progressfragment</groupId> | ||
<artifactId>progressfragment-native</artifactId> | ||
<version>${project.version}</version> | ||
<type>apklib</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>src</sourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.jayway.maven.plugins.android.generation2</groupId> | ||
<artifactId>android-maven-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<executions> | ||
<execution> | ||
<id>runLint</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>lint</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system edit | ||
# "ant.properties", and override values to adapt the script to your | ||
# project structure. | ||
# | ||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): | ||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt | ||
|
||
# Project target. | ||
target=android-19 | ||
android.library.reference.1=../progressfragment-native | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+717 Bytes
progressfragment-native-sample/res/drawable-hdpi/ic_menu_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+481 Bytes
progressfragment-native-sample/res/drawable-mdpi/ic_menu_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+214 Bytes
progressfragment-native-sample/res/drawable-nodpi/background_card.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+920 Bytes
progressfragment-native-sample/res/drawable-xhdpi/ic_menu_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
progressfragment-native-sample/res/drawable-xxhdpi/ic_menu_refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions
73
progressfragment-native-sample/res/layout/fragment_custom_progress.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* Copyright 2013, Evgeny Shishkin | ||
** | ||
** 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. | ||
*/ | ||
--> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="#eaeaea"> | ||
|
||
<LinearLayout | ||
android:id="@+id/progress_container" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
android:padding="16dp" | ||
android:visibility="gone"> | ||
|
||
<ProgressBar | ||
style="?android:attr/progressBarStyleHorizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:indeterminate="true"/> | ||
|
||
<TextView | ||
android:id="@+id/progress_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="4dp" | ||
android:text="@string/loading" | ||
android:textSize="14sp" | ||
android:textStyle="bold"/> | ||
</LinearLayout> | ||
|
||
<FrameLayout | ||
android:id="@+id/content_container" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_margin="16dp" | ||
android:background="@drawable/background_card"> | ||
|
||
<TextView | ||
android:id="@android:id/empty" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:drawableLeft="@drawable/emo_im_crying" | ||
android:drawablePadding="8dp" | ||
android:gravity="center" | ||
android:padding="8dp" | ||
android:shadowColor="#aa00" | ||
android:shadowDx="2" | ||
android:shadowDy="2" | ||
android:shadowRadius="4" | ||
android:textColor="#a00" | ||
android:textSize="18sp" | ||
android:textStyle="bold|italic"/> | ||
</FrameLayout> | ||
|
||
</RelativeLayout> |
52 changes: 52 additions & 0 deletions
52
progressfragment-native-sample/res/layout/view_content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* Copyright 2013, Evgeny Shishkin | ||
** | ||
** 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. | ||
*/ | ||
--> | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<LinearLayout | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="8dp"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:singleLine="true" | ||
android:ellipsize="marquee" | ||
android:paddingBottom="8dp" | ||
android:textSize="18sp" | ||
android:textStyle="bold" | ||
android:text="@string/title"/> | ||
|
||
<ImageView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:adjustViewBounds="true" | ||
android:src="@drawable/new_york"/> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="8dp" | ||
android:textSize="14sp" | ||
android:text="@string/description"/> | ||
|
||
</LinearLayout> | ||
</ScrollView> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* Copyright 2013, Evgeny Shishkin | ||
** | ||
** 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. | ||
*/ | ||
--> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item | ||
android:id="@+id/menu_refresh" | ||
android:icon="@drawable/ic_menu_refresh" | ||
android:showAsAction="ifRoom" | ||
android:title="@string/menu_refresh"/> | ||
|
||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* Copyright 2013, Evgeny Shishkin | ||
** | ||
** 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. | ||
*/ | ||
--> | ||
<resources> | ||
|
||
<string name="app_name">Android-ProgressFragment-Native</string> | ||
<string name="menu_refresh">Refresh</string> | ||
<string name="title">New York City</string> | ||
<string name="description">New York is the most populous city in the United States and the center of the New York | ||
Metropolitan Area, one of the most populous urban agglomerations in the world. The city is referred to as New | ||
York City or the City of New York to distinguish it from the State of New York, of which it is a part. A global | ||
power city, New York exerts a significant impact upon commerce, finance, media, art, fashion, research, | ||
technology, education, and entertainment. The home of the United Nations Headquarters, New York is an important | ||
center for international diplomacy and has been described as the cultural capital of the world. | ||
</string> | ||
<string name="empty">No Data</string> | ||
<string name="loading">Loading…</string> | ||
|
||
<string-array name="sweets"> | ||
<item>Apple Pie</item> | ||
<item>Banana Bread</item> | ||
<item>Cupcake</item> | ||
<item>Donut</item> | ||
<item>Eclair</item> | ||
<item>Froyo</item> | ||
<item>Gingerbread</item> | ||
<item>Honeycomb</item> | ||
<item>Ice Cream Sandwich</item> | ||
<item>Jelly Bean</item> | ||
<item>KitKat</item> | ||
</string-array> | ||
|
||
|
||
</resources> |
Oops, something went wrong.