Skip to content

Commit

Permalink
version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkil committed Apr 29, 2013
1 parent 5f19b09 commit 4d6bb01
Show file tree
Hide file tree
Showing 42 changed files with 425 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.devspark.progressfragment.sample"
android:versionCode="2"
android:versionName="1.0">
android:versionCode="3"
android:versionName="1.1">

<uses-sdk
android:minSdkVersion="4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

# Project target.
target=android-17
android.library.reference.1=../library
android.library.reference.1=../progressfragment

File renamed without changes
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.
File renamed without changes
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.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,59 +15,59 @@
** limitations under the License.
*/
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#eaeaea">
<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:padding="16dp"
android:gravity="center"
android:orientation="vertical"
android:padding="16dp"
android:visibility="gone">

<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:indeterminate="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
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"
android:text="@string/loading"/>
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/shadow">
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:shadowColor="#aa00"
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:drawableLeft="@drawable/emo_im_crying"
android:drawablePadding="8dp"
android:textColor="#a00"
android:textSize="18sp"
android:textStyle="bold|italic"/>
</FrameLayout>

</FrameLayout>
</RelativeLayout>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
** limitations under the License.
*/
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_action_refresh"
android:showAsAction="ifRoom"
android:title="@string/menu_refresh">
</item>
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_menu_refresh"
android:showAsAction="ifRoom"
android:title="@string/menu_refresh" />

</menu>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(getIntent().getStringExtra(EXTRA_TITLE));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
new ActionBarHelper().setDisplayHomeAsUpEnabled(true);
}
// Check what fragment is shown, replace if needed.
Fragment fragment = getSupportFragmentManager().findFragmentById(android.R.id.content);
Expand Down Expand Up @@ -75,4 +75,25 @@ public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
}
}

/**
* Helper for fix issue VerifyError on Android 1.6. On Android 1.6 virtual machine
* tries to resolve (verify) getActionBar function, and since there is no such function,
* Dalvik throws VerifyError.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private class ActionBarHelper {

/**
* Set whether home should be displayed as an "up" affordance.
* Set this to true if selecting "home" returns up by a single level in your UI
* rather than back to the top level or front page.
*
* @param showHomeAsUp true to show the user that selecting home will return one
* level up rather than to the top level of the app.
*/
private void setDisplayHomeAsUpEnabled(boolean showHomeAsUp) {
getActionBar().setDisplayHomeAsUpEnabled(showHomeAsUp);
}
}
}
Binary file added progressfragment-sample/web_hi_res_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.devspark.progressfragment"
android:versionCode="1"
android:versionName="1.0">
android:versionCode="2"
android:versionName="1.1">

<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="17"/>
</manifest>

</manifest>
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions progresssherlockfragment/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.devspark.progressfragment"
android:versionCode="2"
android:versionName="1.1">

<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="17"/>

</manifest>
16 changes: 16 additions & 0 deletions progresssherlockfragment/project.properties
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

android.library=true
# Project target.
target=android-17
android.library.reference.1=../../ActionBarSherlock/actionbarsherlock
58 changes: 58 additions & 0 deletions progresssherlockfragment/res/layout/fragment_progress.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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.
*/
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">

<ProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<TextView
android:id="@+id/progress_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dip"
android:singleLine="true"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceSmall"/>
</LinearLayout>

<FrameLayout
android:id="@+id/content_container"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"/>
</FrameLayout>

</FrameLayout>
Loading

0 comments on commit 4d6bb01

Please sign in to comment.